[xsl] Easy way to identify node type?

Subject: [xsl] Easy way to identify node type?
From: yguaba@xxxxxxxxxxxx
Date: Thu, 04 Dec 2003 14:23:16 -0200
Is there an easy way (or any way at all) to identify the type of the  
node being processed? Suppose, for instance, that you wanted to 
produce different output for different node types, as in the 
*fictitious* example below:

<xsl:template match="root">
	<xsl:for-each select="node()">
			<xsl:when test="node-type() = 'ELEMENT'">
				<xsl:text>blah, blah</xsl:text>
			<xsl:when test="node-type() = 'TEXT'">
				<xsl:value-of select="."/>

Is there a way to do that?

Thanks in advance for your input,


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread