[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: testing node type

Subject: Re: testing node type
From: Nick Browne <NickBrowne@xxxxxxxxxxxxxxx>
Date: Fri, 22 Sep 2000 13:47:16 +0100
xsl test 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.