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

Re: key() question?

Subject: Re: key() question?
From: Steven Noels <stevenn@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Jul 2002 13:57:44 +0200
rekey xhtml
Jeni Tennison wrote:
Hi Steven,


I have some keys declared for easy access to the attributes declared for
a specific element, and to retrieve the contentModels in which an element is referred to:


<xsl:key name="attlistbyname" match="/dtd/attlist" use="@ename"/>
<xsl:key name="contentmodelbychildren" match="//contentModel" use="descendant::element/@name"/>


[A // beginning a pattern (match attribute) is always superfluous --
you're matching "any contentModel element that is a descendant of the
root node" when you may as well match "any contentModel element" since
all elements must be descendants of the root node by definition.]

Jeni,


I want to understand this: is this the behaviour of the key construct? Will it always do a full recursive traversal of the entire tree to locate nodes matches by the pattern? Or is there something else that I need to keep in mind when specifying patterns for keys?

</Steven>
--
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
stevenn@xxxxxxxxxxxxxxxx                      stevenn@xxxxxxxxxx


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.