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

Re: XSL/XPath to generate a list of ancestors?

Subject: Re: XSL/XPath to generate a list of ancestors?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 12 May 2008 19:15:26 +0200
Re:  XSL/XPath to generate a list of ancestors?
Nathan Potter wrote:

On May 12, 2008, at 10:05 AM, Martin Honnen wrote:

Nathan Potter wrote:

I tried this:
     <xsl:template match="*" name="fullNameWorker" mode="fullName">
        <xsl:if test="generate-id(.)!=generate-id(/)">

You have a template for element nodes (match="*") so why do you test generate-id(.) != generate-id(/) ? An element (.) is never a root node (/).

Because the template recursively ascends the document I need to test that I have arrived at the top.

But your template with match="*" is never processed for the root node which is match="/". If anything makes sense then
generate-id(.) != generate-id(/*)
as that compares the matched element to the root element (which is different from the root node).


	Martin Honnen

Current Thread


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.
First Name
Last Name
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.