Brian Minchau wrote: > 2308 - Nodes in a node set created > using the node-set extension > function are not accessible > through key > Though Henry Z. opened this > issue he is not the real originator. > This functionality seems to > be available in XSLT 2.0 so this is > the motivation for this > issue. However Henry Z. doesn't > think this > is a high priority issue.
Well, I have real XSLT 1.0 code that is impacted by this today. I have to completely avoid using Muenchian grouping when operating on generated node-sets because of it. Also, it's not just XSLT 2.0 functionality. XSLT 1.0 says that key() has to return nodes from "the same document as" the context node, and XSLT 1.0 operates on "document" which is modeled as a slightly modified XPath node tree, always having a root node under which all the other nodes fall and thus comprise part of the same document as the root node. A converted result tree fragment is a node-set that contains a single root node. Unless otherwise stated, document identity is going to be based on the root node. So, regardless of whether your context node is from a converted result tree fragment, it stands to reason that the context node itself, as well as any other nodes under the same root, would be potential members of the node-set returned by key().