|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Parameters query
David Pratt wrote:
Thanks for reply. Am interested in passing in xml - just didn't know if any limits or what you could pass and couldn't find much on it from the standard.
If you want to pass XML, and *expect* it to be handled as XML, you'll probably be disappointed: as I already said, the spec defines no special handling for this, in particular, if you pass a string resembling some XML (with markup) to the processor, no processor will parse it by default and provide you with a tree in the XSL style sheet. To be more explicit: if you pass
<foo><bar>stuff</bar></foo>
to parameter "foo",
you can't do this:
<xsl:param name="foo"/>
...
<xsl:value-of select="$foo/bar"/>
because $foo evaluates to the *string*
"<foo><bar>stuff</bar></foo>"
and not to the tree
foo
+- bar
+- "stuff"Some processors have extension functions which allow you to parse the string into a tree from within the XSLT. For other processors, you can parse the string into a DOM before calling the XSL transformer and pass the DOM object as parameter (instead of the string). None of this in in any way standardized, look into your processor's docs for what you can do. J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








