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

RE: key() question?

Subject: RE: key() question?
From: "Américo Albuquerque \(E-mail\)" <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Jul 2002 15:39:40 +0100
RE:  key() question?
Sorry for my newbie question but, given this xml
<doc>
 <something>
  <pattern level="1"/>
  <anotherthing>
   <pattern level="2"/>
  </anotherthing>
  ....
 </something>
 <pattern level="1"/>
</doc>

 and given this xsl

...
<xsl:template match="doc">
 <xsl:apply-templates/>
</xsl:template>

<xsl:template match="pattern">
 ...
</xsl:template>

<xsl:template match="//pattern">
 ...
</xsl:template>


doesn't the match="pattern" gets only the level=1" patterns???
and match="//patterns" get's all of them??

thanks in advance

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of David
Carlisle
Sent: Wednesday, July 10, 2002 2:04 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  key() question?



> a template match is done in a given context,
no

> the key (as I understand it) does the full traversal of the whole
> document, as if template match="//pattern"

yes exactly, but

 template match="//pattern"

is the same (except for default priority) as
 template match="pattern"

ie such a template would match the same nodes as got indexed by a key
with the same match pattern.

David



_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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




 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.