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

Re: Parameters query

Subject: Re: Parameters query
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Sat, 27 Sep 2003 12:04:12 +0200
xslt query parameter
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.

There isn't anything in the XSLT spec because it's out of scope for it. The correct place to look for limits would be your processor's documentation or customer support (user mailing list).

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



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.