Subject: RE: Why don't this work? From: Jonathan Marsh <jmarsh@xxxxxxxxxxxxx> Date: Thu, 6 Apr 2000 09:58:17 -0700 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Why don't this work?, Westerlund, Malin | Thread | Netscape 6 lack of XSL support, Mark Volkmann |
RE: Hey Francis and XMLwriter users, Selva, Francis | Date | Re: More <xsl:when> questions!, Francois Lachance |
Month |