Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

XSLT: Namespace does not contain any functions

$
0
0

I am trying to do a transformation with the following code (VBA excel 2013):

' Load data.
 source.async = False
 source.validateOnParse = False
 source.resolveExternals = True
 source.setProperty "AllowXsltScript", True
 source.Load sourceFile

' Load style sheet.
 StyleSheet.async = False
 StyleSheet.validateOnParse = False
 StyleSheet.resolveExternals = True
 StyleSheet.setProperty "AllowXsltScript", True
 StyleSheet.Load stylesheetFile

If (source.parseError.ErrorCode <> 0) Then
    MsgBox ("Error loading source document: " & source.parseError.reason)
    Else
 If (StyleSheet.parseError.ErrorCode <> 0) Then
       MsgBox ("Error loading stylesheet document: " & StyleSheet.parseError.reason)
    Else
       ' Do the transform.
       source.transformNodeToObject StyleSheet, result
       result.Save resultFile
 End If
 End If

But every time it gets to the transformation, I get the error "Namespace 'urn:my:' does not contain any functions".

The stylesheet refers to a number of functions, a sample here:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
               xmlns:exsl="http://exslt.org/common"
               xmlns:set="http://exslt.org/sets"
               xmlns:str="http://exslt.org/strings"
               xmlns:my="urn:my:"
               extension-element-prefixes="exsl set str my"><xsl:output method="text" encoding="ASCII" /><xsl:include href="lib.xsl" /><xsl:include href="package-param.xsl" />

The lib.xls and package-param.xsl sheets include the functions, and also have similar include statements for other files.  This works just fine with a standard DOS based XSLT processor, but I can't get it to work in this environment for some reason. I'm rather a newbie at XSLT.  Any help appreciated.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>