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

RE: Why don't this work?

Subject: RE: Why don't this work?
From: Jonathan Marsh <jmarsh@xxxxxxxxxxxxx>
Date: Thu, 6 Apr 2000 09:58:17 -0700
xsl for each xmlwriter xmlns
nodeName() is not a node selector, and cannot be used outside a filter [].
In XSLT, the equivalent function name() can be used in certain places like
value-of select="" but still not in apply-templates or match.  A node's name
is a property of the node, not a node itself.

- Jonathan Marsh
  Microsoft

> -----Original Message-----
> From: Westerlund, Malin [mailto:malin.westerlund@xxxxxxxxxx]
> Sent: Thursday, April 06, 2000 4:33 AM
> To: 'xsl-list@xxxxxxxxxxxxxxxx'
> Subject: Why don't this work?
> 
> 
> I'm trying to get the tagname, but it doesn't seem to work.  
> I'm not so good
> at this so I might have done something  very wrong. The 
> node() works but not
> the nodeName().
> 
> 
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
> 	xmlns="http://www.w3.org/TR/REC-html40">
> 
> <xsl:template match="/">
> 	<TABLE>
> 	<TR>
> 		<xsl:for-each select="*/element()">
> 		<TD>
> 		<xsl:apply-templates select="./nodeName()"/>
> 		</TD>
> 		</xsl:for-each>
> 	</TR>
> 		<xsl:for-each select="*/element()">	
> 		<TR>
> 			<TD>
> 				<xsl:apply-templates select="./node()"/>
> 			</TD>
> 		</TR>
> 		</xsl:for-each> 
> 	</TABLE>
> </xsl:template>	
> 
> <xsl:template match="./nodeName()">
> 	<xsl:value-of /><td/>
> </xsl:template>
> 	
> <xsl:template match="./node()">
> 	<xsl:value-of /><td/>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> I'm using msxml3
> 
> regards
> 
> Malin
> 
> 
>  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.