Subject: RE: [xsl] Replacing all Occurences of a String From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 30 Aug 2001 14:33:20 -0400 |
<months> <month en="January" de="Januar" fr="Janvier"/> <month en="February" de="Februar" fr="Fevrier"/> [etc.] </months>
<xsl:variable name="dictionary" select="document('dictionary.xml')"/> <!-- This does nothing but make the dictionary document accessible to the transformation -->
<xsl:key name="month-en" match="month" use="@en"/> <xsl:key name="month-de" match="month" use="@de"/> <xsl:key name="month-fr" match="month" use="@fr"/> <!-- These set up access to your dictionary -->
<xsl:key name="month" match="month" use="@en"/> <xsl:key name="month" match="month" use="@de"/> <xsl:key name="month" match="month" use="@fr"/>
key('month', $string)/@de gives you German from English or French (or German) key('month', $string)/@fr gives you French from English or German (or French)
Enjoy, Wendell
Roger, Have a look at http://www.biglist.com/lists/xsl-list/archives/200008/msg01300.html for some ideas on internationalization....
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Replacing all Occurences , Chris Bayes | Thread | RE: [xsl] Replacing all Occurences , Tim Watts |
RE: [xsl] As a newbie to XSL, where, Max Dunn | Date | RE: [xsl] Very Simple Mathematical , Chris Bayes |
Month |