[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Assembling variable names by XSL and getting them
> Is there a way to get Saxxon 8B ah, so you are using xslt2. It's best to say that up front, the current version of xslt is 1.0 and you are likely to get a 1.0 answer unless you specifically ask for 2.0. > <td>{$lightsource3}</td> {} syntax is only used in attribute values, where you can't use an element. To evaluate an XPath such as {$lightsource3} you'd use value-of. However you can't construct an xpath on the fly and evaluate it it (well you can using saxon's evaluate extension) any more than in C or java or fortran etc, you can't take a string with a bit of language syntax and evaluate it. You don't have the language parser available at run time. You don't want lots of variables just one <xsl:variable name="key"> <k id="0">unknown</k> <k id="1">Daylight</k> ..... Then you just need to use <xsl:value-of select="$key/k[@id=current()/@exif:Lightsource]"/> To look up the numbers in your xml fragment. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|