Subject: [xsl] Replacing substring with value during transform From: John English <john.foreign@xxxxxxxxx> Date: Wed, 12 Sep 2012 19:17:40 +0300 |
I'm trying to internationalize a webapp which generates XML to be transformed into HTML. I translate all the necessary servlet output, but I sometimes have XML that translates into HTML with embedded strings that need translating. For example, here's a fragment of the template that generates a standard page header:
<td align='center' valign='middle'> <xsl:value-of select='@date'/> <br /> {#User#}: <xsl:value-of select='@user'/> </td> <td align='right' valign='middle' width='30%'> <a class='boxed' href='logout'>{#Logout#}</a> </td>
Strings enclosed in {#...#} are translated when the stylesheet is first loaded. My problem is when embedding values into those strings. In Java I can use MessageFormat to plug in values:
which doesn't play well in languages where the adjective "new" needs to follow the noun, for example. I'd like to be able to do something along the following lines in my stylesheet:
TIA, -- John English
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL-FO continued header o, G. Ken Holman | Thread | Re: [xsl] Replacing substring with , David Carlisle |
[xsl] XSL-FO continued header on co, charlieo0 | Date | Re: [xsl] Replacing substring with , David Carlisle |
Month |