This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: comment() node test


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]