I'm editing an XSL file, and having trouble getting the name of an element.
Everything here works except for ../../name()
. What I'm trying to do there is get the name of the element. Everything beneath it successfully gets the attributes of that same element, so hopefully the fact that ../../@name
(etc.) works should make clear what I'm trying to do with ../../name()
.
<tr>
<td><xsl:value-of select="../../name()" /></td>
<td><xsl:value-of select="../../@name"/></td>
<td><xsl:value-of select="../../@alias"/></td>
<td><xsl:value-of select="../../@comment"/><xsl:text>...</xsl:text></td>
<td><xsl:value-of select="../../dxl:wassignedby" /></td>
<td><xsl:apply-templates select="."/></td>
</tr>
The piece of XML (in case it helps you visualize what I'm talking about) is:
<form name="Extended Content" alias="CONTENT" hide="notes" nocompose="true" noquery="true" publicaccess="false" designerversion="8">
I'm successfully getting (e.g.) "Extended Content" with ../../@name
, but not getting "form" with ../../name()
.