|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: String evaluation problem
It's hard to tell from the info you give, but this may be another use
case for a design pattern that's come up a few times recently.
If what you need to do is create a map of values that gets substituted
in, you can load values from an external document (or the current XSL)
using the document function.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="dictionary" select="document('values.xml')"/>
<xsl:template ...
<xsl variable name="key-name"
select="concat(substring('continue(1)',1,8),substring('continue(1))"/>
<xsl:value-of select="$dictionary//$key-name"/>
... <snip>
Where the file values.xml might contain
<root>
<continue1>general explanations</continue1>
<continue2>... etc.</continue2>
</root>
Is that helpful?
--->N
> -----Original Message-----
> From: Fadi Qutaishat [mailto:fadi_taher2000@xxxxxxxxx]
> Sent: Wednesday, October 19, 2005 4:07 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: String evaluation problem
>
> Hi Andrew,
>
> I know that is the direct way is to have
> <test>&continue1;</test> to reference the entity but
> the logic that I've got generates continue(n)formate
> and it can't be changed and that's whay I have tried
> out the things using the indirect way substrings
> function.
>
> Many thanks,
>
> Fadi
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
|
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
|

Cart








