Subject: Re: Preceding siblings test
From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx>
Date: Thu, 16 Sep 2010 21:50:36 +0200
|
> note that the supplied solution only works for a and b elements
> _between_ item elements (exactly as you asked). A and B elements before
> the first item will be ignored.
No, Martin's and my solution do report "<a/>" before the first
<item>, see output taken from my last posting on this.
Perhaps that output shuld have been printed out in order
"<a/><item>...</item>" to avoid the confusion.
$ xsltproc pre.xsl list.xml
<item>...</item><a/>
<item>...</item><b/><b/><a/>
<item>...</item>
<item>...</item><a/><a/>
$
Mit besten Gruessen / Best wishes,
Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
Fixpack team lead
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
From: Ruud Grosmann <r.grosmann@xxxxxx>
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Date: 09/16/2010 03:12 PM
Subject: Re: Preceding siblings test
On 09/14/10 19:28, Hintz, David wrote:
> Thanks, Martin and Hermann. That looks like it will do the trick. I
forgot to state that we're using XSLT 2.
>
Hi David,
note that the supplied solution only works for a and b elements
_between_ item elements (exactly as you asked). A and B elements before
the first item will be ignored.
regards, Ruud
|