Firstly, the term "node-set" can be confusing. The parameter value will
generally be a node-set containing a single node; but XSLT 1.0 only has
"node-set" as a data-type, not "node". What you typically want to do is to
iterate through the children of that node, which you can do using path
expressions in the normal way, e.g. xsl:for-each
select="$param/params/param[name="size"]/value".
It's useful when you have multiple trees to have a variable pointing to the
root of each one. Set the global variable <xsl:variable name="root"
select="/"/>, and remember to use $root/xxx where you might otherwise have
used /xxx.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: David Adams [mailto:dpadams(_at_)gmail(_dot_)com]
Sent: 24 September 2004 10:55
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Using a pre-processor for dynamic inputs
Once I've properly supplied the XSLT processor with a node-set (by
passing in a reference or a document that gets parsed, etc.), what is
the best approach for iterating through the node-set that is a
parameter. Is this no different than working with the nodes of the
source XML? I'm really curious how people support dynamically sized
inputs without pre-processing the stylesheet.
--
---------------------------------------------
David Adams
dpadams(_at_)gmail(_dot_)com
Bermagui 2546 NSW
---------------------------------------------
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--