Reputation: 1424
<xsl:template match="email|recall|shop|partners|ipad" mode="tab">
<li id="{HERE_MATCHED_PATH}">
</li>
</xsl:template>
Is there any possibility to get matched path and use it in place of {HERE_MATCHED_PATH}?
For example to get something like this:
<li id="email">
</li>
if matched pattern was 'email'.
Upvotes: 1
Views: 132
Reputation: 24816
Use name()
or local-name()
. In your case there is no difference as you are not dealing with namespace prefixes and both functions return the same value. For more information, see XPath functions reference.
Upvotes: 2