123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="text" encoding="UTF-8"/>
- <xsl:template match="/stringTable">
-
- <xsl:text>#
</xsl:text>
- <xsl:text># Licensed Materials - Property of IBM 
</xsl:text>
- <xsl:text># IBM Cognos Products: localizationkit 
</xsl:text>
- <xsl:text># (C) Copyright IBM Corp. 2005, 2016
</xsl:text>
- <xsl:text># US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
</xsl:text>
- <xsl:text>#
</xsl:text>
- <xsl:text>
</xsl:text>
- <xsl:text>## DO NOT EDIT! 
</xsl:text>
- <xsl:text>## Generated using CCLXmlToProperties.xslt 
</xsl:text>
- <xsl:text>## END OF WARNING 
</xsl:text>
- <xsl:for-each select="./component">
- <xsl:variable name="compname" select="@name"/>
- ##
- ## Component: <xsl:value-of select="@name"/>
- ##
- ## Description: <xsl:value-of select="@usage"/>
- ##<xsl:text> </xsl:text>
- <xsl:for-each select="./section">
- <xsl:variable name="sectname" select="@name"/>
- #
- # Section: <xsl:value-of select="@name"/>
- #
- # Description: <xsl:value-of select="@usage"/>
- #<xsl:text> </xsl:text>
- <xsl:for-each select="string">
-
- <xsl:choose>
- <xsl:when test="@id">
- <xsl:value-of select="@id"/>
- </xsl:when>
- <xsl:when test="@name">
- <xsl:value-of select="../../@name"/>
- <xsl:text disable-output-escaping="yes">_</xsl:text>
- <xsl:value-of select="../@name"/>
- <xsl:text disable-output-escaping="yes">_</xsl:text>
- <xsl:value-of select="@name"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">Key Generation Error: Missing name or id.</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:text disable-output-escaping="yes"> = </xsl:text>
-
- <xsl:if test="@errorCode and (not(../@type) or ../@type='Messages')">
- <xsl:value-of select="../../@name"/>
- <xsl:text>-</xsl:text>
- <xsl:value-of select="../@name"/>
- <xsl:text>-</xsl:text>
- <xsl:value-of select="@errorCode"/>
- <xsl:text> </xsl:text>
- </xsl:if>
-
- <xsl:variable name="msgstring">
- <xsl:for-each select="child::node()">
- <xsl:choose>
- <xsl:when test="name() = 'param'">
- <xsl:choose>
- <xsl:when test="@name">
- <xsl:text disable-output-escaping="yes">{</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text disable-output-escaping="yes">}</xsl:text>
- </xsl:when>
- <xsl:when test="@index">
- <xsl:text disable-output-escaping="yes">{</xsl:text>
- <xsl:value-of select="@index - 1"/>
- <xsl:text disable-output-escaping="yes">}</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">Parameter Substitution Error: Missing name or index.</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = ''">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="@whiteSpace and @whiteSpace='preserve'">
- <xsl:value-of disable-output-escaping="yes" select="$msgstring"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="normalize-space($msgstring)"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|