[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] using variables in functions
Subject: [xsl] using variables in functions From: "trevor paterson \(RI\)" <trevor.paterson@xxxxxxxxxxx> Date: Wed, 13 Jul 2005 12:51:04 +0100 |
I have no trouble passing variables (initialized as strings using select="expression") as $variable into some XSLT functions (e.g. translate() ), but functions seem to throw a typing error (e.g. escape-uri(), and replace() ). I am using Java5 parsers etc: a typical xslt call is <xsl:variable name="a" select="string(./rdfs:label)" /> <xsl:variable name="b" select="replace($a, '%', '%25') /> ( {$a} doesnt work either ) a typical error reported by the java program is: Could not compile stylesheet Error checking type of the expression 'funcall(replace [variable-ref(a/string), literal-expr(%), literalexpr(%25)]) ' . ' this works for translate($a, '%', '%25') : what's the difference? if I could get escape-uri to work it must be the cool function to avoid all the horrible nested substring/replacements to url-encode. thanks anybody Trevor Paterson Scotland
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XmlSpy [OT], David Carlisle | Thread | RE: [xsl] How to insert DOCTYPE in , tomas.vanek |
Re: [xsl] XmlSpy [OT], David Carlisle | Date | Re: [xsl] How to insert DOCTYPE in , G. Ken Holman |
Month |
Keywords