[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Passing variables into XSLT via parameters ... can
> $parameters is defined as a string passed in from the processor, and my > understanding was that I needed to coerce to a node set explicitly; you can't siumply coerce from a string to a node set you need to parse the string with an XML parser. xx:node-set() does not take a string as an input it takes a result tree fragment (which is more or less the same thing as a node set in any case, and in XSLT2 _is_ the same thing, so xx:node-set() is no longer needed in XSLT2) > This may not be the ideal way to do it; What I was hoping to achieve was > a way to pass in arbitrary variables without having to hardcode variable > names into the stylesheet and preferably avoiding having to make 2 That's fine but you need to pass in a node set (ie a parsed document0 not a string. > I haven't seen any way to pass a parsed document node into libxslt, You can always just pass in the file name as a string parameter and then use select="document($filename)/whatever" David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|