[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] key declarations (using a sequence constructor)
Hi, 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> and an example input document is something like... <timaeus-names xmlns:odm="http://www.cdisc.org/ns/odm/v1.3"> <mdv oid="TEST/M/oids" name="TESTMOIDS"> <name oid="S001" parent-oid="" name="S001" /> <name oid="F001" parent-oid="S001" name="F001" /> <name oid="IG001" parent-oid="F001" name="IG001" /> <name oid="AA.AA" parent-oid="IG001" name="AAAA" /> <name oid="AA..AA" parent-oid="IG001" name="AAAA2" /> <name oid="AA...AA" parent-oid="IG001" name="AAAA3" /> </mdv> </timaeus-names> 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 :-) -- Andy
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|