This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: comment() node test
- To: xsl-list at mulberrytech dot com
- Subject: Re: comment() node test
- From: Mike Brown <mike at skew dot org>
- Date: Thu, 10 Aug 2000 19:32:58 -0600 (MDT)
- Reply-To: xsl-list at mulberrytech dot com
Evan Lenz wrote:
> "preceding-sibling::node()[not(self::text())][1][self::comment()]"
>
> This worked just as well.
Here you are getting the set of non-text preceding siblings, taking the
first node in that set, and testing it to see if it's a comment. If the
first non-text preceding sibling is not a comment, this would fail, I
believe.
Isn't "preceding-sibling::comment()[1]" what you want? i.e. from among the
preceding siblings that are comments, the ones (one) for which the context
position is 1?
- Mike
____________________________________________________________________
Mike J. Brown, software engineer at My XML/XSL resources:
webb.net in Denver, Colorado, USA http://www.skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list