Subject: comment() node test From: "Evan Lenz" <elenz@xxxxxxxxxxx> Date: Thu, 10 Aug 2000 16:45:05 -0700 |
I'm trying to display the value of the previous sibling if it is a comment. What's wrong with my XPath expression? It won't display anything. <xsl:for-each select="element"> <xsl:value-of select="preceding-sibling::node()[1][self::comment()]"/> </xsl:for-each> I've confirmed that the parser I'm using passes comments to the XSLT processor (Instant Saxon), as the comment() node test works in other cases, such as the following: <xsl:for-each select="comment()"> <xsl:value-of select="."/> </xsl:for-each> Thanks, Evan Lenz elenz@xxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Special characters and XML-to-W, Mike Brown | Thread | Re: comment() node test, Gary L Peskin |
Special characters and XML-to-WML p, Michael J. Hudson | Date | Re: Is there an elegant way to copy, Mike Brown |
Month |