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

Re: xsl:key function help

Subject: Re: xsl:key function help
From: "Nick Fitzsimons" <nick@xxxxxxxxxxxxxx>
Date: Thu, 4 Aug 2005 09:19:37 +0100 (BST)
xsl key explanation
> Hello Joris,
>
>> The usage of the 'key()' function and the implementation of
>> the Muenchian grouping is 100% correct.
>> The problem is really much easier:
>> You do not want <xsl:template match="/"> but instead:
>> <xsl:template match="TipDatabase">
>
> gosh it works. But why? I assumed that "/" equals "TipDatabase" because it
> is the root element.
>
> So could you give an explanation why TipDatabase != "/".

Have a look at http://www.w3.org/TR/xpath#root-node for the definitive
explanation. Translated into normal-speak, what that is saying is that the
root element is a nameless element which is the parent of the document
element, "TipDatabase" in your case, and of any processing instructions
and comments at the top level of the document. Think of it as the node
that contains all the stuff that would otherwise be rattling around loose,
having no parent.

HTH,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/

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.