Subject: Re: [xsl] ordered selection of child elements From: "Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 8 Mar 2018 07:06:40 -0000 |
Am 08.03.2018 um 07:36 schrieb Dr. Patrik Stellmann patrik.stellmann@xxxxxxxxx:You can move to XPath/XSLT 3 and use the "!" operator
Hi,
a question more motivated by curiosity than by a real problem:
With
<xsl:sequence select=ba, bb/>
I will get first element a and second element b b no matter of the order within the input document.
But with
<xsl:sequence select=broot/(a, b)b/>
I will get the elements a and b in document order. So this behaves identical to
B B B B B B B B B B B <xsl:sequence select=broot/(a | b)b/>
Why?
Of course I could write
<xsl:sequence select=broot/a, root/bb/>
To ensure a specific order. But sometimes the expression of brootb is much more complex so Ibd like to avoid writing it twice or putting it in a variableb&
B root!(a, b)
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <-list/225679> (by email <>)
-- Gerrit Imsieke GeschC$ftsfC<hrer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke@xxxxxxxxx, http://www.le-tex.de
Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930
GeschC$ftsfC<hrer / Managing Directors: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] ordered selection of chil, Martin Honnen martin | Thread | AW: [xsl] ordered selection of chil, Dr. Patrik Stellmann |
Re: [xsl] ordered selection of chil, Martin Honnen martin | Date | AW: [xsl] ordered selection of chil, Dr. Patrik Stellmann |
Month |