xsl-list
[Top] [All Lists]

RE: key() in match pattern of xsl:key

2005-12-10 09:15:01
On Sat, 10 Dec 2005, Michael Kay wrote:

Should it be possible to reference one key in the match pattern of 
another?  

Yes, there's no ban on it, in either XSLT 1.0 or 2.0.

Excellent.

Nice idea. However we need to be clear that we're talking here about sets
based on node values, not node identity. Though the same approach could be
used for sets based on identity by using generate-id() as the "use"
expression.

Yeah, I tried to avoid using the phrase `node set'.  I was thinking about 
sets more abstractly.  Attributes, child node values, or anything else 
could be used to define uniqueness.
 
I have tested this computation with libxslt 1.1.15.  Although Daniel 
Veillard has informed me that this usage is currently outside 
the realm of 
specified functionality, the above does work for my simple 
test cases. 

The spec doesn't define any restrictions in this area, so implementations
are not allowed to impose any restrictions.

Let me be more careful so as not to misrepresent him.  He didn't actually 
say that it's absolutely outside of the XSLT spec.  He just said it's on 
the limits, which seems to basically agree with what you've said.

Thanks very much for your response.

Joel

--~------------------------------------------------------------------
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>
--~--