[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:key

Subject: xsl:key
From: Mike Engelhart <mengelhart@xxxxxxxxxxxxx>
Date: Fri, 10 Mar 2000 13:56:30 -0600
xsl key example translate
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
  • xsl:key
    • Mike Engelhart - Fri, 10 Mar 2000 13:56:30 -0600 <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.