|
Subject: Re: [xsl] i18n and l10n question From: Florent Georges <darkman_spam@xxxxxxxx> Date: Mon, 13 Nov 2006 13:49:27 +0100 (CET) |
Nico Van Cleemput wrote:
Dag,
> <tr><td>nr</td><td>description 1description 2</td></tr>
> <tr><td>nr</td><td>description 1description 2</td></tr>
key() looks in the whole document. So it returns each time all the
matching elements. Because you just need to access child elements, you
don't need keys, just use something like:
<xsl:function name="my:i18n-get-properties"
as="element(properties)">
<xsl:param name="i18n" as="element(i18n)"/>
<xsl:sequence select="$i18n/(
node[@name eq $locale],
node[@name eq $locale2],
.
)[1]/properties"/>
</xsl:function>
to select the right, more specific locale, then:
<xsl:for-each select="parameter">
<tr>
<td>
<xsl:value-of select="
my:i18n-get-properties(i18n)
/ entry[@key eq 'parameter.caption']"/>
</td>
<td>
<xsl:value-of select="
my:i18n-get-properties(i18n)
/ entry[@key eq 'parameter.description']"/>
</td>
</tr>
</xsl:for-each>
Not tested.
Regards,
--drkm
___________________________________________________________________________
Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes vos questions !
Profitez des connaissances, des opinions et des expiriences des internautes sur Yahoo! Questions/Riponses
http://fr.answers.yahoo.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Fwd: [xsl] i18n and l10n question, Nico Van Cleemput | Thread | Re: [xsl] i18n and l10n question, Nico Van Cleemput |
| RE: [xsl] Custom Ordered Lists, Michael Kay | Date | [xsl] get the text value of a follo, Liron |
| Month |