Changeset 7906 for util/trunk/buildscripts/cldr/currency.xsl
- Timestamp:
- 04/02/07 06:50:55 (22 months ago)
- Files:
-
- 1 modified
-
util/trunk/buildscripts/cldr/currency.xsl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
util/trunk/buildscripts/cldr/currency.xsl
r7897 r7906 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <xsl:stylesheet xmlns:saxon="http://saxon.sf.net/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="saxon" version="2.0"> 3 <xsl:import href="util.xsl"/> 3 4 <xsl:output method="text" indent="yes"/> 4 5 <!-- list the data elements whose spaces should be preserved … … 11 12 otherwise all the currencies will be extracted by default--> 12 13 <xsl:param name="currencyList"></xsl:param> 13 <xsl:variable name="first" select="true()" saxon:assignable="yes"/>14 14 15 15 <xsl:template match="/"> … … 105 105 </xsl:choose> 106 106 </xsl:template> 107 108 <!-- recursive process for alias --> 109 <xsl:template name="alias_template"> 110 <xsl:param name="templateToCall"></xsl:param> 111 <xsl:param name="source"></xsl:param> 112 <xsl:param name="xpath"></xsl:param> 113 <xsl:variable name="cur_width" select="../@type"></xsl:variable> 114 115 <xsl:choose> 116 <xsl:when test="compare($source,'locale')=0"> 117 <!-- source="locale" --> 118 <xsl:for-each select="saxon:evaluate(concat('../',$xpath))"> 119 <xsl:call-template name="invoke_template_by_name"> 120 <xsl:with-param name="templateName" select="$templateToCall"></xsl:with-param> 121 </xsl:call-template> 122 </xsl:for-each> 123 </xsl:when> 124 <xsl:otherwise> 125 <!-- source is an external xml file --> 126 <xsl:if test="string-length($xpath)>0"> 127 <xsl:for-each select="doc(concat('ldml/core/main/',concat($source,'.xml')))"> 128 <xsl:for-each select="saxon:evaluate($xpath)"> 129 <xsl:call-template name="invoke_template_by_name"> 130 <xsl:with-param name="templateName" select="$templateToCall"></xsl:with-param> 131 </xsl:call-template> 132 </xsl:for-each> 133 </xsl:for-each> 134 </xsl:if> 135 </xsl:otherwise> 136 </xsl:choose> 137 </xsl:template> 138 107 139 108 <!-- too bad that can only use standard xsl:call-template(name can not be variable) 140 109 error occurs if use <saxson:call-templates($templateToCall) /> --> 141 110 <xsl:template name="invoke_template_by_name"> 142 111 <xsl:param name="templateName"></xsl:param> 112 <xsl:param name="name"></xsl:param> 113 <xsl:param name="width"></xsl:param> 143 114 <xsl:if test="$templateName='top'"> 144 115 <xsl:call-template name="top"></xsl:call-template> … … 148 119 </xsl:if> 149 120 </xsl:template> 150 151 <xsl:template name="insert_comma">152 <xsl:choose>153 <xsl:when test="$first">154 <saxon:assign name="first" select="false()"/>155 </xsl:when>156 <xsl:otherwise>157 <xsl:text>,</xsl:text>158 </xsl:otherwise>159 </xsl:choose>160 </xsl:template>161 162 121 </xsl:stylesheet>