[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:key
Does <xsl:key> require that you traverse a DOM tree every time you use the key() function? All the examples I've seen and all the ways I've tried to use it seem to require me to do a loop through the lookup table like this: <xsl:key name="translate" match="phrase" use"@key"/> <xsl:for-each select="document('translator.xml')"/> <xsl:value-of select="key('translate', '_some_phrase')"/> </xsl:for-each> Is there no way to have a top level stylesheet hold 'translator.xml' and then just call <xsl:value-of select="key('translate', '_some_phrase')"/> from anywhere in the stylesheet? The reason I want to use keyspaces is to display web content based on the browsers language setting. This is trivial with a java extension but I'm trying to have an XSL only version that does the same thing. Also if anyone knows of any examples of using keyspaces, please let me know. thanks, Mike 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
|