[Home] [By Thread] [By Date] [Recent Entries]
I use something like:
for an attribute
<xsl:for-each select="ancestor-or-self::*">
<xsl:if test="local-name()=name()">/default:</xsl:if>
<xsl:if test="not(local-name()=name())">/</xsl:if>
<xsl:value-of select="name()"/>[<xsl:number/>]</xsl:for-each>/@<xsl:value-of select="name()"/></xsl:variable>
and for an element
<xsl:for-each select="ancestor-or-self::*">
<xsl:if test="local-name()=name()">/default:</xsl:if>
<xsl:if test="not(local-name()=name())">/</xsl:if>
<xsl:value-of select="name()"/>[<xsl:number/>]</xsl:for-each>
All the best
Stephen Green
>>> "Dimitre Novatchev" <dnovatchev@y...> 09/01/07 14:26:49 >>>
This snippet is 5 years old:
http://www.topxml.com/code/default.asp?p=3&id=v20010323001030
Cheers,
Dimitre Novatchev
"Long JingJun" <longjingjun@y...> wrote in message
20070108035722.19643.qmail@w...">news:20070108035722.19643.qmail@w......
Hi there,
Is there a way to get the full XPath of current node as a String in an XSLT
stylesheet?
Thanks,
Long
__________________________________________________
Ï¿ì×¢²áÑÅ»¢³* óÈÝÁ¿Ãâ·ÑÓÊÏä?
http://cn.mail.yahoo.com
_______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@l...
subscribe: xml-dev-subscribe@l...
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
_______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@l...
subscribe: xml-dev-subscribe@l...
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



