Re: [xsl] How to use xPath expression: /node/@attribute to retrieve attribute nodes in XSLT?

Subject: Re: [xsl] How to use xPath expression: /node/@attribute to retrieve attribute nodes in XSLT?
From: Niclas Hedhman <niclas@xxxxxxxxxxx>
Date: Sun, 12 Dec 2004 14:45:51 +0800
On Sunday 12 December 2004 07:58, Yuye Chen wrote:
> Hi,
>
> Can anyone let me know why the following template rule, which
> try to retrieve the attribute node from XML, cannot work?
>
> <xsl:temlate match="/company/employee/@empID">
>   <output>
>     <xsl:value-of select="."/>
>   <output/>
> </xsl:template>

I would do;
<xsl:temlate match="/company/employee">
  <output>
    <xsl:value-of select="@empID"/>
  <output/>
</xsl:template>

-- 
   +------//-------------------+
  / http://www.dpml.net       /
 / http://niclas.hedhman.org / 
+------//-------------------+

Current Thread