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

Re: Keeping a map in my XSL

Subject: Re: Keeping a map in my XSL
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Wed, 14 Sep 2005 14:45:11 +0200
Re:  Keeping a map in my XSL
Le mercredi 14 septembre 2005 ` 10:30 +0100, andrew welch a icrit :

> No need for document(''), just access the variable directly:
> 
> <xsl:variable name="map">
>   <map>
>      <key name="blah" value="blah"/>
>      ....
>   </map>
> </xsl:variable>
> 
> and 
> 
> <xsl:for-each select="$map">
>   <xsl:value-of select="key('mappings', $lookup)/@value"/>

Except that, if you are working in XSLT 1.0 (which is my case), your
variable would be a RTF and that using an extension function to convert
it into a node set would make your transformation less portable...

Maybe that would be a good practice to indicate in the subject if the
question is related to XSLT 1.0 or 2.0: these are two different
languages!

Eric

-- 
Don't you think all these XML schema languages should work together?
                                                         http://dsdl.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------

Current Thread

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.