This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Problem with keys in for-each (?)
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Problem with keys in for-each (?)
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 14 Mar 2001 09:49:06 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> In the following XSLT, I have a key() function called to look
> up a specific
> element in the key. If I call this alone, as it is in the
> first line of the
> template for "/", it works and I get the output I expect. If
> I do the EXACT
> same thing within the loop, I get no output as a result of the
> apply-templates.
The key() function looks for nodes that are in the same document as the
context node. Your xsl:for-each is changing the context node to be one in a
different document.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list