Subject: RE: [xsl] String evaluation problem From: "Nathan Young \(natyoung\)" <natyoung@xxxxxxxxx> Date: Wed, 19 Oct 2005 10:15:21 -0700 |
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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] String evaluation problem, Wendell Piez | Thread | RE: [xsl] String evaluation problem, Fadi Qutaishat |
Re: [xsl] Unparse-text() string con, Colin Paul Adams | Date | RE: [xsl] Unparse-text() string con, Michael Kay |
Month |