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

Re: Using XSLT's key() function while context in seco

Subject: Re: Using XSLT's key() function while context in secondary document?
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Tue, 19 Feb 2008 10:43:46 +0100
Re:  Using XSLT's key() function while context in  seco
Scott Trenda schrieb:
If you look at s.xml, and look at your 'chnam' key, you'll see that
chnam matches <Chnl> elements, of which there are none in s.xml.

Thanks, Scott. I am aware there are no <Chnl> elements in s.xml. Why should there have to be any? The xsl:key uses the strings retrieved from Chnl/@ID as keys to store one or more <Chnl> elements. All I should need to use the key are these strings, regardless of the document they originate from. The key responds to strings and does not care where they come from. I pass it a string, it hands me out matching nodes. Thus my thougths, which seem to be wrong.

Remember that key() returns key-matches from the document containing the
context node only. Does that make sense?

Is there a way to direct the key() function back to the principal document while the context node is located in another document?

Michael

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.