Changeset 25250 for other-projects/gti
- Timestamp:
- 2012-03-22T21:50:39+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gti/gti-generate-tmx-xml.xsl
r25242 r25250 3 3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java"> 4 4 <!--On Translation Memory eXchange open-XML: http://www.opentag.com/tmx.htm and http://www.gala-global.org/oscarStandards/tmx/tmx14b.html 5 And for character entities: http://www.w3.org/MarkUp/html3/latin1.html--> 5 And for character entities: http://www.w3.org/MarkUp/html3/latin1.html 6 More information: http://xml.coverpages.org/tmxSpec971212.html#O-TMF--> 6 7 7 8 <xsl:output method="xml" encoding="UTF-8"/> … … 10 11 11 12 <xsl:template match="GTIResponse"> 13 <xsl:text disable-output-escaping="yes"> <!DOCTYPE tmx PUBLIC "-//LISA OSCAR:1998//DTD for Translation Memory eXchange//EN" "tmx14.dtd" > </xsl:text> 14 12 15 <tmx version="1.4" xmlns="http://www.lisa.org/tmx14"><xsl:text> </xsl:text> <!--newline--> 13 <header creationtool="Greenstone Translator Interface" creationtoolversion="Greenstone2.85" 14 datatype="PlainText" segtype="sentence" 15 adminlang="en-us" srclang="EN" 16 o-tmf="ABCTransMem"> 16 <header 17 creationtool="Greenstone Translator Interface" 18 creationtoolversion="Greenstone2.85" 19 datatype="PlainText" 20 segtype="sentence" 21 adminlang="en" 22 srclang="{$sourcelang}" 23 o-tmf="GreenstoneTranslationFile"> <!--XLIFF 1.2--> 17 24 </header><xsl:text> </xsl:text> <!--newline--> 18 <body><xsl:text> </xsl:text> <!--newline--> 19 <xsl:text> </xsl:text> <!--newline--> 20 <!--<xsl:apply-templates select="*"/>--> 25 <body> 26 <xsl:text> </xsl:text> <!--2 newlines--> 21 27 <xsl:apply-templates select="TranslationFile"/> 28 29 30 <xsl:apply-templates select="Chunks"/> 31 32 <xsl:apply-templates select="UptodateChunks"/> 33 22 34 <!-- control the order: first all the strings needing to be updated, then all those that need translating--> 23 35 <xsl:apply-templates select="ChunksRequiringUpdating"/> … … 39 51 </xsl:template> 40 52 53 <xsl:template match="UptodateChunks"> 54 <xsl:text> </xsl:text> 55 <note><xsl:text xml:lang="en">Uptodate chunks</xsl:text></note><xsl:text> </xsl:text> 56 <xsl:apply-templates select="Chunk"> 57 <xsl:sort select="@key"/> 58 </xsl:apply-templates> 59 </xsl:template> 60 41 61 <xsl:template match="ChunksRequiringTranslation"> 42 62 <xsl:text> </xsl:text> <!--newline--> … … 48 68 49 69 <xsl:template match="ChunksRequiringUpdating"> 50 <xsl:text> </xsl:text> <!--newline--> 70 <xsl:text> </xsl:text> <!--newline--> 51 71 <note><xsl:text xml:lang="en">Chunks requiring updating</xsl:text></note><xsl:text> </xsl:text> <!--newline--> 52 72 <xsl:apply-templates select="Chunk"> … … 55 75 </xsl:template> 56 76 77 <xsl:template match="Chunks"> 78 <xsl:text> </xsl:text> 79 <note><xsl:text xml:lang="en">All chunks</xsl:text></note><xsl:text> </xsl:text> 80 <xsl:apply-templates select="Chunk"> 81 <xsl:sort select="@key"/> 82 </xsl:apply-templates> 83 </xsl:template> 57 84 58 85 <xsl:template match="Chunk">
Note:
See TracChangeset
for help on using the changeset viewer.