xsl-list
[Top] [All Lists]

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

2004-12-11 23:45:51
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 / 
+------//-------------------+


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--