[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

using variables in functions

Subject: using variables in functions
From: "trevor paterson \(RI\)" <trevor.paterson@xxxxxxxxxxx>
Date: Wed, 13 Jul 2005 12:51:04 +0100
trevor patterson
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.