[Home] [By Thread] [By Date] [Recent Entries]

  • From: Peter Armstrong <armstrong@e...>
  • To: "Pierre, Sebastian" <spierre@R...>
  • Date: Fri, 19 May 2000 22:53:39 +0000

> I'm looking for a way to set the name of the '.' element as the 'class' attribute of a <p> tag. I can't find any function that would return the name of the '.' element.
> 
> Is there any way to do this ?

try name(.)

if you want to put it in a variable, do

<xsl:variable name="foo" select="name(.)"/>

and then you could refer to it like so:

<p class="{$foo}">

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member