[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Using a pre-processor for dynamic inputs
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@xxxxxxxxx] > Sent: 24 September 2004 10:55 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: 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@xxxxxxxxx > 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@xxxxxxxxxxxxxxxxxxxxxx> > --+--
|
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
|