Subject: RE: [xsl] Traversing a XML tree multiple times From: "Chris Bayes" <chris@xxxxxxxxxxx> Date: Sun, 30 Sep 2001 18:58:11 +0100 |
Jeroen, I'm not sure exactly what you want to do without a specific example but you can easily transform the same tree multiple times. Say the top level element of your xml is "root" <xsl:apply-templates select="/root" /> ...do something <xsl:apply-templates select="/root" /> You said you want to make a different selection the second time <xsl:apply-templates select="/root/*[some predicate]" /> ...do something <xsl:apply-templates select="/root/*[some other predicate]" /> You can also use modes <xsl:apply-templates select="/root" /> ...do something <xsl:apply-templates select="/root" mode="createIndex"> So that only templates with the createIndex mode attribute are selected. The posibilities are many. Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Jeroen Benckhuijsen > Sent: 30 September 2001 17:54 > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Traversing a XML tree multiple times > > > Hi, > > I've been playing around with XML and XSLT lately and i > really don't have any clue how to solve this problem. I want > to transform an XML document using XSL. However i nedd to > traverse the tree multiple times. The first time i want to > make a selection, the second a different selection (based on > the results of the first selection), etc. Is this possible in > 1 xsl document? > > TIA > > -- > Jeroen Benckhuijsen > > Software Engineer > Phoenix Software > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Traversing a XML tree multipl, Jeroen Benckhuijsen | Thread | Re: [xsl] Traversing a XML tree mul, Paul Tyson |
[xsl] Traversing a XML tree multipl, Jeroen Benckhuijsen | Date | Re: [xsl] Traversing a XML tree mul, Paul Tyson |
Month |