Changeset 25286 for other-projects/gti

Show
Ignore:
Timestamp:
23.03.2012 16:46:40 (7 years ago)
Author:
ak19
Message:

Updated to deal with paperspast.dm: added a new module into gti.pl for this. Because getting chunks from the paperspast.dm file results in attribute like values in the source and target strings, there are now functions in ApplyXSLT.java to remove and retrieve these. Finally, the function to remove these attribute-like values in the source and target strings is called in the gti-generate-tmx-xml.xslt file.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/gti/gti-generate-tmx-xml.xsl

    r25250 r25286  
    8383  </xsl:template> 
    8484 
     85 
    8586  <xsl:template match="Chunk"> 
    8687    <tu><xsl:text>&#10;</xsl:text> <!--newline--> 
     
    8990    <seg> 
    9091      <xsl:for-each select="SourceFileText"> 
    91         <xsl:variable name="tempText1" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll(., "\n", "&amp;#10;&#10;")'/> 
     92        <xsl:variable name="tempText0" select='java:org.nzdl.gsdl.ApplyXSLT.getChunkString(.)'/> <!-- removes collection-specific attribute-like prefix in paperspast.dm--> 
     93        <xsl:variable name="tempText1" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText0, "\n", "&amp;#10;&#10;")'/> 
    9294        <xsl:variable name="tempText2" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText1, "&#60;", "&amp;lt;")'/> 
    9395        <xsl:variable name="tempText3" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText2, "&#62;", "&amp;gt;")'/> 
     
    101103    <seg> 
    102104      <xsl:for-each select="TargetFileText"> 
    103         <xsl:variable name="tempText1" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll(., "\n", "&amp;#10;&#10;")'/> 
     105        <xsl:variable name="tempText0" select='java:org.nzdl.gsdl.ApplyXSLT.getChunkString(.)'/> <!-- removes collection-specific attribute-like prefix in paperspast.dm--> 
     106        <xsl:variable name="tempText1" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText0, "\n", "&amp;#10;&#10;")'/> 
    104107        <xsl:variable name="tempText2" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText1, "&#60;", "&amp;lt;")'/> 
    105108        <xsl:variable name="tempText3" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText2, "&#62;", "&amp;gt;")'/>