Subject: RE: [xsl] Using a pre-processor for dynamic inputs From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Fri, 24 Sep 2004 11:20:07 +0100 |
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: [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@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> > --+--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using a pre-processor for, David Adams | Thread | Re: [xsl] Using a pre-processor for, David Adams |
Re: [xsl] Reading the values of ele, David Adams | Date | Re: [xsl] Reading the values of ele, David Carlisle |
Month |