This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: testing node type
How about :
<xsl:when test="following-sibling::node()[1] =
following-sibling::comment()[1]">
Not a very generic solution but it may help.
This also seems to work :
<xsl:template match="node()">
<xsl:choose>
<xsl:when test="self::comment()">
A comment :
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
Not a comment
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
Nick Browne
Slipstone Ltd
Sebastian Rahtz wrote:
> Am I being dense, or is there no obvious way to test a node type?
>
> I want to see if
>
> following-sibling::node()[1]
>
> is a comment or not. is there way to test that?
>
> sebastian
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list