Subject: Re: testing node type From: Nick Browne <NickBrowne@xxxxxxxxxxxxxxx> Date: Fri, 22 Sep 2000 13:47:16 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: testing node type, Tobias Grundmann | Thread | ANN: 4Suite 0.9.0, uche . ogbuji |
RE: testing node type, Linda van den Brink | Date | RE: ancestor counting, Kay Michael |
Month |