|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








