Subject: Re: AW: [xsl] simple conditional looping From: "Keyur K" <kkeyur@xxxxxxxxxxx> Date: Mon, 16 Aug 2004 13:03:52 +0000 |
my xml code is as follows: <orders> <order id="1">ABC</order> <order id="2">XYZ</order> <order id="3">QWE</order> </orders>
ORDERS: 1. ABC 2. XYZ 3. QWE 4. ________ 5. ________ 6. ________ . . . . 50. _______
Regards, Keyur
From: David Carlisle <davidc@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: AW: [xsl] simple conditional looping Date: Mon, 16 Aug 2004 12:19:24 +0100
> > maybe a silly question, but why exactly do you need the ()? something > like //* with a predicate [] should be enough or not?
A predicate in an axis step just filters that step.
//*[position() < 50]
is /descendent-or-self::node/child::*[position() < 50]
so it gives you all element nodes in the document that have fewer than 49 older siblings.
On the other hand
(//*)[position() < 50]
is (/descendent-or-self::node/child::*)[position() < 50]
which gives you the first 49 element nodes in the document.
David
________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: AW: [xsl] simple conditional lo, Wendell Piez | Thread | Re: AW: [xsl] simple conditional lo, David Carlisle |
[xsl] ANN: XSLT 2.0, regex exemplar, David . Pawson | Date | Re: AW: [xsl] simple conditional lo, David Carlisle |
Month |