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

RE: Using keys on a tree from document()

Subject: RE: Using keys on a tree from document()
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 4 Mar 2005 21:17:40 -0000
RE:  Using keys on a tree from document()
> I just read some posts in the archive, but they are about comparing
> keys in the source document with keys in external documents from
> document function.
> 
> However, in my case, i do not have a source document, just the one i'm
> getting thru document(), and i'll like to use keys on that to find
> some related nodes from that document, just like if it was the source
> docuement?
> 
> Is this possible? If yes, how?

It is possible, and it's fairly automatic.

When you call key('k', 'banana'), the system searches for all nodes that:

1. match the match pattern of key 'k'
2. have the 'use' value = 'banana'
3. are in the same document as the context node

So if the context node is in document('abc.xml'), that's the one that is
searched.

Michael Kay
http://www.saxonica.com/

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.