Re: [xsl] Using XSLT's key() function while context in secondary document?

Subject: Re: [xsl] Using XSLT's key() function while context in secondary document?
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Tue, 19 Feb 2008 10:43:46 +0100
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