This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: get immediat preceeding node, if it is a comment
What about preceding vs. following ;-)
But the result is the same.
Joerg
David Carlisle wrote:
Sure. But aren't they both the same (they select the same node)?
No.
If you are in <a/> in
<x>
<a/><b>b</b><!--x--><c/>
</x>
preceding-sibling::node()[normalize-space()][self::comment()][1]
selects the comment <!--x--> as that is the first node that is
non empty string value and is a comment.
preceding-sibling::node()[normalize-space()][1][self::comment()]
selects the empty node set as the first node with non empty string value
is not a comment.
David
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
VIRBUS hat jetzt als erster deutscher Softwarehersteller die Zertifizierung
für den 3D Secure-Authentifizierungsstandard "Verified by Visa" erhalten.
Details unter
http://www.virbus.de/de/press/pressemitteilung/20020828_verified_by_VISA.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list