[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Get Absolute XPath

Subject: Get Absolute XPath
From: "Samooo" <samooo_vc@xxxxxxxxxxx>
Date: Mon, 21 Jun 2004 12:22:44 -0700
get xpath
I am able to get the absolute XPath of an element in rendered chunk of XML.
The following template works fine.

  <xsl:template name="getAbsoluteXPath">
    <xsl:for-each select="ancestor-or-self::*">/*[<xsl:value-of
select="1+count(preceding-sibling::*)"/> </xsl:for-each>
  </xsl:template>

But now I want to get the absolute XPath of an element w.r.t. the whole
document. I have this document in say variable curDoc.
<xsl:variable name="curDoc" select="document('c:\abc.xml')"/>

But am not redering the whole document. I am rendering only a part of this
document. When I call this GetAbsoluteXPath template, I can get correct
XPath related to rendered chunk using above template code. But now I want to
get teh XPath of an element inside the whole document. Please advice. I am
not able to explain this properly but I hope my question is clear. Thanks.

Sameer.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.