Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / tools / checki18n.xsl @ 187

History | View | Annotate | Download (844 Bytes)

1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns:rng="http://relaxng.org/ns/structure/1.0"
3
                xmlns:tei="http://www.tei-c.org/ns/1.0"
4
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
                version="1.0"
6
                exclude-result-prefixes="rng tei">
7
   <xsl:output method="xml" encoding="utf-8" indent="yes"/>
8
   <xsl:param name="lang">ja</xsl:param>
9

    
10
   <xsl:template match="/i18n">
11
      <i18n>
12
         <xsl:for-each select="entry">
13
            <xsl:if test="not(text[@xml:lang=$lang])">
14
	              <entry>
15
	                 <xsl:copy-of select="key"/>
16
	                 <xsl:copy-of select="text[@xml:lang='en']"/>
17
	                 <text xml:lang="{$lang}"/>
18
	              </entry>
19
            </xsl:if>
20
         </xsl:for-each>
21
      </i18n>
22
   </xsl:template>
23
</xsl:stylesheet>