[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: i18n and l10n question

Subject: Re: i18n and l10n question
From: Nicolas Van Cleemput <nicolas.vancleemput@xxxxxxxx>
Date: Thu, 09 Nov 2006 10:39:59 +0100
Re:  i18n and l10n question
Hmm, I feel stupid: it wasn't working because of a typo I copy/pasted severeal
times.

Now there appears text, but it always just returns the first <entry
key="parameter.description">descr</entry>. It should only look for the
entry-tag inside the current parameter-tag. How do I obtain this result?

Thanks in advance,
Nico

Quoting Nicolas Van Cleemput <nicolas.vancleemput@xxxxxxxx>:

OK, now I'm coming to the next step. These factoryfiles also contain a list of
parameters:


<factory>
 <i18n>
   ... (this works already ;))
 </i18n>
 <parameter>
    <name></name>
    <type></type>
    <i18n>
       <properties>
           <entry key="parameter.description">descr</entry>
       </properties>
       <node name="nl">
         <properties>
             <entry key="parameter.description">descr</entry>
         </properties>
       </node>
    </i18n>
 </parameter>
 <parameter>
    <name></name>
    <type></type>
    <i18n>
       <properties>
           <entry key="parameter.description">descr</entry>
       </properties>
       <node name="nl">
         <properties>
             <entry key="parameter.description">descr</entry>
         </properties>
       </node>
    </i18n>
 </parameter>
...

Now I want to make a table which contains an overview of the parameters. I
therefore need to access several of these entry-elements (I only typed the
description one for simplicity). Analogue to the previous method I did this:

<xsl:for-each select="parameter">
<tr>
<td>
<xsl:choose>
<xsl:when test="key('l',concat($locale,' parameter.description'))">
<xsl:apply-templates select="key('l',concat($locale,' parameter.description'))"/>
</xsl:when>
<xsl:when test="key('l',concat($locale2,' parameter.description'))">
<xsl:apply-templates select="key('l',concat($locale2,' parameter.description'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="key('l',' parameter.description')"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>


This finds the correct number of parameters, but nothing is placed inside the
table cells. It is as if the entry-elements aren't found.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.