Subject: xsl:key From: Mike Engelhart <mengelhart@xxxxxxxxxxxxx> Date: Fri, 10 Mar 2000 13:56:30 -0600 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[JOB] Senior XML/XSL Java Developer, Peter Bryant | Thread | Re: xsl:key, David_Marston |
Re: XSL Theory, Jon Smirl | Date | Re: Performance, Mike Engelhart |
Month |