xsl-list
[Top] [All Lists]

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

2008-02-19 02:44:22
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--