[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: keys with composite values
Borenstein, Philip wrote:
I'm getting some unexpected results with keys that use composite values.... ...What I get depends on the other of VERSION elements: key('features', '11') => Slices key('features', '10') => Dices (but not Slices) This happens in both Saxon and MSXSL, so I'm guessing there's something I'm not understanding about keys with composite values.
In order to get what you want you'll have to match the VERSION elementsand then use the parent. Try <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key name="features" match="VERSION" use="concat(@MAJOR,@MINOR)"/> <xsl:template match="FEATURES" > <CONTENT> <xsl:copy-of select="key('features', '11')/.." /> </CONTENT> </xsl:template> </xsl:stylesheet> J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|