[24434] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
|
---|
| 3 |
|
---|
| 4 | <xsl:output method="xml" encoding="UTF-8"/>
|
---|
| 5 |
|
---|
| 6 | <xsl:template match="GTIResponse">
|
---|
| 7 | <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
|
---|
| 8 | xmlns:o="urn:schemas-microsoft-com:office:office"
|
---|
| 9 | xmlns:x="urn:schemas-microsoft-com:office:excel"
|
---|
| 10 | xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
|
---|
| 11 | xmlns:html="http://www.w3.org/TR/REC-html40">
|
---|
| 12 | <DocumentProperties>
|
---|
| 13 | <Author>Greenstone Translator Interface</Author>
|
---|
| 14 | <LastAuthor>Greenstone Translator Interface</LastAuthor>
|
---|
| 15 | <Created>2003-05-05T01:30:36Z</Created>
|
---|
| 16 | <Company>New Zealand Digital Library Project</Company>
|
---|
| 17 | <Version>10.2625</Version>
|
---|
| 18 | </DocumentProperties>
|
---|
| 19 | <OfficeDocumentSettings>
|
---|
| 20 | <DownloadComponents/>
|
---|
| 21 | <LocationOfComponents HRef="blah"/>
|
---|
| 22 | </OfficeDocumentSettings>
|
---|
| 23 | <Styles>
|
---|
| 24 | <Style ss:ID="Default" ss:Name="Normal">
|
---|
| 25 | <Alignment ss:Vertical="Top"/>
|
---|
| 26 | <Borders/>
|
---|
| 27 | <Font/>
|
---|
| 28 | <Interior/>
|
---|
| 29 | <NumberFormat/>
|
---|
| 30 | <Protection/>
|
---|
| 31 | </Style>
|
---|
| 32 | <Style ss:ID="Heading">
|
---|
| 33 | <Font x:Family="Swiss" ss:Bold="1"/>
|
---|
| 34 | </Style>
|
---|
| 35 | <Style ss:ID="TextCell">
|
---|
| 36 | <Alignment ss:Vertical="Bottom" ss:WrapText="1"/>
|
---|
| 37 | <Font ss:FontName="Arial Unicode MS"/>
|
---|
| 38 | </Style>
|
---|
| 39 | </Styles>
|
---|
| 40 | <Worksheet ss:Name="Greenstone Translation">
|
---|
| 41 | <Table>
|
---|
| 42 | <Column ss:Width="250" ss:Index="1" ss:AutoFitWidth="0"/>
|
---|
| 43 | <Column ss:Width="1000" ss:Index="2" ss:AutoFitWidth="1"/>
|
---|
| 44 | <Row>
|
---|
| 45 | <Cell ss:StyleID="Heading"><Data ss:Type="String">Key</Data></Cell>
|
---|
| 46 | <Cell ss:StyleID="Heading"><Data ss:Type="String">Text</Data></Cell>
|
---|
| 47 | </Row>
|
---|
| 48 | <xsl:apply-templates/>
|
---|
| 49 | </Table>
|
---|
| 50 | </Worksheet>
|
---|
| 51 | </Workbook>
|
---|
| 52 | </xsl:template>
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 | <xsl:template match="ChunksRequiringTranslation">
|
---|
[25242] | 56 | <xsl:apply-templates select="Chunk">
|
---|
[24434] | 57 | <xsl:sort select="@key"/>
|
---|
| 58 | </xsl:apply-templates>
|
---|
| 59 | </xsl:template>
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | <xsl:template match="ChunksRequiringUpdating">
|
---|
[25242] | 63 | <xsl:apply-templates select="Chunk">
|
---|
[24434] | 64 | <xsl:sort select="@key"/>
|
---|
| 65 | </xsl:apply-templates>
|
---|
| 66 | </xsl:template>
|
---|
| 67 |
|
---|
| 68 |
|
---|
| 69 | <xsl:template match="Chunk">
|
---|
| 70 | <Row xmlns="urn:schemas-microsoft-com:office:spreadsheet"/>
|
---|
| 71 |
|
---|
| 72 | <Row xmlns="urn:schemas-microsoft-com:office:spreadsheet">
|
---|
| 73 | <Cell>
|
---|
| 74 | <Data ss:Type="String">source::<xsl:value-of select="@key"/></Data>
|
---|
| 75 | </Cell>
|
---|
| 76 | <Cell ss:StyleID="TextCell">
|
---|
| 77 | <Data ss:Type="String">
|
---|
| 78 | <xsl:for-each select="SourceFileText">
|
---|
[24692] | 79 | <xsl:variable name="tempText1" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll(., "\n", "&#10; ")'/>
|
---|
| 80 | <xsl:variable name="tempText2" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText1, "<", "&lt;")'/>
|
---|
[25242] | 81 | <xsl:variable name="tempText3" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText2, ">", "&gt;")'/>
|
---|
| 82 | <xsl:variable name="escapedText" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText3, "&", "&amp;")'/> <!-- ampersands-->
|
---|
[24434] | 83 | <xsl:value-of select='$escapedText' disable-output-escaping="yes"/>
|
---|
| 84 | </xsl:for-each>
|
---|
| 85 | </Data>
|
---|
| 86 | </Cell>
|
---|
| 87 | </Row>
|
---|
| 88 |
|
---|
| 89 | <Row xmlns="urn:schemas-microsoft-com:office:spreadsheet">
|
---|
| 90 | <Cell>
|
---|
| 91 | <Data ss:Type="String">target::<xsl:value-of select="@key"/></Data>
|
---|
| 92 | </Cell>
|
---|
| 93 | <Cell ss:StyleID="TextCell">
|
---|
| 94 | <Data ss:Type="String">
|
---|
| 95 | <xsl:for-each select="TargetFileText">
|
---|
[24692] | 96 | <xsl:variable name="tempText1" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll(., "\n", "&#10; ")'/>
|
---|
| 97 | <xsl:variable name="tempText2" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText1, "<", "&lt;")'/>
|
---|
[25242] | 98 | <xsl:variable name="tempText3" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText2, ">", "&gt;")'/>
|
---|
| 99 | <xsl:variable name="escapedText" select='java:org.nzdl.gsdl.ApplyXSLT.replaceAll($tempText3, "&", "&amp;")'/> <!-- ampersands-->
|
---|
[24434] | 100 | <xsl:value-of select='$escapedText' disable-output-escaping="yes"/>
|
---|
| 101 | </xsl:for-each>
|
---|
| 102 | </Data>
|
---|
| 103 | </Cell>
|
---|
| 104 | </Row>
|
---|
| 105 | </xsl:template>
|
---|
| 106 |
|
---|
| 107 | </xsl:stylesheet>
|
---|