Re: [xsl] get immediat preceeding node, if it is a comment

Subject: Re: [xsl] get immediat preceeding node, if it is a comment
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Fri, 04 Oct 2002 14:14:06 +0200
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@xxxxxxxxx
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



Current Thread