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 |
- key() question?
- Steven Noels - Wed, 10 Jul 2002 05:40:00 -0400 (EDT)
- Jeni Tennison - Wed, 10 Jul 2002 05:57:31 -0400 (EDT)
- Steven Noels - Wed, 10 Jul 2002 07:56:54 -0400 (EDT) <=
- Steven Noels - Wed, 10 Jul 2002 08:36:51 -0400 (EDT)
- <Possible follow-ups>
- DPawson - Wed, 10 Jul 2002 08:48:18 -0400 (EDT)
|
|