Subject: Re: [xsl] key declarations (using a sequence constructor) From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 06 Oct 2009 13:52:22 -0400 |
I'm playing around with the added features available in key declarations but I think I must be misunderstanding something. Here's my key declaration (I realize that this particular example would be better as a simple @use but I want to understand how it works to see if it might make some of my other keys look a little better)....
<xsl:key name="keyNames" match="name | mdv"> <lookup oid="{@oid}"/> </xsl:key>
http://www.w3.org/TR/2007/REC-xpath-datamodel-20070123/#const-infoset-element (typed-value)
I thought that to use this key to lookup the @name associated with @oid="AA.AA" for example, I'd do
<xsl:variable name="lookup"> <lookup oid="AA.AA"/> </xsl:variable> <xsl:sequence select="key('keyNames', $lookup)/@name"/>
But this actually returns a sequence containing all the @names.
I seek enlightenment as to why this is so :-)
-- Upcoming: hands-on code list, UBL, XSLT, XQuery and XSL-FO classes in Copenhagen Denmark and Washington DC USA, October/November 2009 Interested in other classes? http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] key declarations (using a seq, Andy Chambers | Thread | Re: [xsl] key declarations (using a, Andy Chambers |
[xsl] key declarations (using a seq, Andy Chambers | Date | RE: [xsl] Fwd: Is this a Saxon Bug , Michael Kay |
Month |