1<?xml version="1.0" encoding="UTF-8"?> 2 3<!--*********************************************************** 4 * 5 * Licensed to the Apache Software Foundation (ASF) under one 6 * or more contributor license agreements. See the NOTICE file 7 * distributed with this work for additional information 8 * regarding copyright ownership. The ASF licenses this file 9 * to you under the Apache License, Version 2.0 (the 10 * "License"); you may not use this file except in compliance 11 * with the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, 16 * software distributed under the License is distributed on an 17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18 * KIND, either express or implied. See the License for the 19 * specific language governing permissions and limitations 20 * under the License. 21 * 22 ***********************************************************--> 23 24<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:uof="http://schemas.uof.org/cn/2003/uof" xmlns:表="http://schemas.uof.org/cn/2003/uof-spreadsheet" xmlns:演="http://schemas.uof.org/cn/2003/uof-slideshow" xmlns:字="http://schemas.uof.org/cn/2003/uof-wordproc" xmlns:图="http://schemas.uof.org/cn/2003/graph" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" office:version="1.0"> 25 <xsl:output method="xml" indent="no" encoding="UTF-8" version="1.0"/> 26 <xsl:template match="uof:UOF"> 27 <!--chengxz0804 OK--> 28 <!--office:document xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" office:version="1.0" office:class="spreadsheet"--> 29 <office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" office:version="1.0"> 30 <xsl:apply-templates select="uof:元数据"/> 31 <office:settings> 32 <xsl:call-template name="工作表属性"/> 33 </office:settings> 34 <xsl:apply-templates select="uof:式样集"/> 35 <!--xsl:apply-templates select="表:公用处理规则"/--> 36 <xsl:apply-templates select="uof:电子表格"/> 37 </office:document> 38 </xsl:template> 39 <!--Redoffice comment lil from chenjh SC0013 06.02.15--> 40 <!--增加内容--> 41 <xsl:variable name="uofUnit"> 42 <xsl:variable name="uu"> 43 <xsl:value-of select="/uof:UOF/uof:电子表格/表:公用处理规则/表:度量单位"/> 44 </xsl:variable> 45 <xsl:choose> 46 <xsl:when test="$uu='cm'">cm</xsl:when> 47 <xsl:when test="$uu='mm'">mm</xsl:when> 48 <xsl:when test="$uu='pt'">pt</xsl:when> 49 <xsl:when test="$uu='inch'">inch</xsl:when> 50 <xsl:otherwise>cm</xsl:otherwise> 51 </xsl:choose> 52 </xsl:variable> 53 <xsl:variable name="other-to-cm-conversion-factor"> 54 <xsl:choose> 55 <xsl:when test="$uofUnit='cm'">1</xsl:when> 56 <xsl:when test="$uofUnit='mm'">0.1</xsl:when> 57 <xsl:when test="$uofUnit='pt'">0.03527</xsl:when> 58 <xsl:when test="$uofUnit='inch'">2.54</xsl:when> 59 <xsl:when test="$uofUnit='pica'">0.4233</xsl:when> 60 <xsl:otherwise>0.03527</xsl:otherwise> 61 </xsl:choose> 62 </xsl:variable> 63 <!--Redoffice comment liliang end 06.02.15--> 64 <xsl:template name="set-calculation"> 65 <xsl:element name="table:calculation-settings"> 66 <xsl:if test="表:公用处理规则/表:度量单位"> 67 <xsl:variable name="uofUnit"> 68 <xsl:variable name="uu"> 69 <xsl:value-of select="表:公用处理规则/表:度量单位"/> 70 </xsl:variable> 71 <xsl:choose> 72 <xsl:when test="$uu='cm'">cm</xsl:when> 73 <xsl:when test="$uu='mm'">mm</xsl:when> 74 <xsl:when test="$uu='pt'">pt</xsl:when> 75 <xsl:when test="$uu='inch'">inch</xsl:when> 76 <xsl:otherwise>cm</xsl:otherwise> 77 </xsl:choose> 78 </xsl:variable> 79 <xsl:variable name="other-to-cm-conversion-factor"> 80 <xsl:choose> 81 <xsl:when test="$uofUnit='cm'">1</xsl:when> 82 <xsl:when test="$uofUnit='mm'">0.1</xsl:when> 83 <xsl:when test="$uofUnit='pt'">0.03527</xsl:when> 84 <xsl:when test="$uofUnit='inch'">2.54</xsl:when> 85 <xsl:when test="$uofUnit='pica'">0.4233</xsl:when> 86 <xsl:otherwise>1</xsl:otherwise> 87 </xsl:choose> 88 </xsl:variable> 89 </xsl:if> 90 <xsl:if test="表:公用处理规则/表:精确度以显示值为准"> 91 <xsl:attribute name="table:precision-as-shown">true</xsl:attribute> 92 </xsl:if> 93 <xsl:if test="表:公用处理规则/表:日期系统-1904/@表:值='true'"> 94 <table:null-date table:date-value="1904-01-01"/> 95 </xsl:if> 96 <xsl:if test="表:公用处理规则/表:计算设置"> 97 <xsl:element name="table:iteration"> 98 <xsl:attribute name="table:status">enable</xsl:attribute> 99 <xsl:attribute name="table:steps"><xsl:value-of select="表:公用处理规则/表:计算设置/@表:迭代次数"/></xsl:attribute> 100 <xsl:attribute name="table:maximum-difference"><xsl:value-of select="表:公用处理规则/表:计算设置/@表:偏差值"/></xsl:attribute> 101 </xsl:element> 102 </xsl:if> 103 </xsl:element> 104 </xsl:template> 105 <xsl:template match="uof:字体集"> 106 <xsl:if test="not(uof:字体声明[@uof:名称='StarSymbol'])"> 107 <style:font-face style:name="StarSymbol" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> 108 </xsl:if> 109 <xsl:for-each select="uof:字体声明"> 110 <xsl:element name="style:font-face"> 111 <xsl:attribute name="style:name"><xsl:value-of select="@uof:名称"/></xsl:attribute> 112 <xsl:attribute name="svg:font-family"><xsl:value-of select="@uof:字体族"/></xsl:attribute> 113 <xsl:if test="@uof:字符集 = '02'"> 114 <xsl:attribute name="style:font-charset">x-symbol</xsl:attribute> 115 </xsl:if> 116 <xsl:if test="@uof:字体族"> 117 <xsl:choose> 118 <xsl:when test="@uof:字体族 = 'Swiss'"> 119 <xsl:attribute name="style:font-family-generic">swiss</xsl:attribute> 120 </xsl:when> 121 <xsl:when test="@uof:字体族 ='Modern'"> 122 <xsl:attribute name="style:font-family-generic">modern</xsl:attribute> 123 </xsl:when> 124 <xsl:when test="@uof:字体族='Roman'"> 125 <xsl:attribute name="style:font-family-generic">roman</xsl:attribute> 126 </xsl:when> 127 <xsl:when test="@uof:字体族 ='Script'"> 128 <xsl:attribute name="style:font-family-generic">script</xsl:attribute> 129 </xsl:when> 130 <xsl:when test="@uof:字体族 ='Decorative'"> 131 <xsl:attribute name="style:font-family-generic">decorative</xsl:attribute> 132 </xsl:when> 133 <xsl:when test="@uof:字体族 ='System'"> 134 <xsl:attribute name="style:font-family-generic">system</xsl:attribute> 135 </xsl:when> 136 <xsl:otherwise> 137 <xsl:attribute name="style:font-family-generic">system</xsl:attribute> 138 </xsl:otherwise> 139 </xsl:choose> 140 </xsl:if> 141 <xsl:attribute name="style:font-pitch">12</xsl:attribute> 142 </xsl:element> 143 </xsl:for-each> 144 <xsl:apply-templates select="uof:字体声明"/> 145 </xsl:template> 146 <xsl:template match="uof:电子表格"> 147 <office:body> 148 <office:spreadsheet> 149 <xsl:call-template name="trackchange"/> 150 <xsl:call-template name="set-calculation"/> 151 <xsl:if test="表:公用处理规则/表:数据有效性集"> 152 <xsl:element name="table:content-validations"> 153 <xsl:call-template name="create-content-validations"> 154 <xsl:with-param name="validation-set" select="表:公用处理规则/表:数据有效性集/表:数据有效性"/> 155 </xsl:call-template> 156 </xsl:element> 157 </xsl:if> 158 <xsl:apply-templates select="表:主体/表:工作表"/> 159 <!--MSexcel 中的names暂时没有对应的--> 160 <xsl:element name="table:database-ranges"> 161 <xsl:for-each select="表:主体/表:工作表"> 162 <xsl:if test="./表:筛选"> 163 <xsl:variable name="filter" select="./表:筛选"/> 164 <xsl:variable name="column-and-row" select="substring-before(substring-after($filter/表:范围/text(),'.'),':')"/> 165 <xsl:variable name="dd" select="number(substring($column-and-row,2,1))"/> 166 <xsl:variable name="zone-left-column-string"> 167 <xsl:choose> 168 <xsl:when test="contains($dd,'NaN') "> 169 <xsl:value-of select="substring($column-and-row,1,2)"/> 170 </xsl:when> 171 <xsl:otherwise> 172 <xsl:value-of select="substring($column-and-row,1,1)"/> 173 </xsl:otherwise> 174 </xsl:choose> 175 </xsl:variable> 176 <xsl:variable name="zone-left-column-num"> 177 <xsl:call-template name="translate-column-char-to-number"> 178 <xsl:with-param name="string" select="$zone-left-column-string"/> 179 </xsl:call-template> 180 </xsl:variable> 181 <xsl:element name="table:database-range"> 182 <xsl:attribute name="table:name"><xsl:value-of select="uof:电子表格/表:主体/表:工作表/@表:名称"/></xsl:attribute> 183 <xsl:attribute name="table:target-range-address"><xsl:call-template name="translate-expression2"><xsl:with-param name="expression2" select="translate($filter/表:范围/text(),'$','')"/></xsl:call-template></xsl:attribute> 184 <xsl:if test="$filter/@表:类型='auto'"> 185 <xsl:attribute name="table:display-filter-buttons">true</xsl:attribute> 186 </xsl:if> 187 <xsl:choose> 188 <xsl:when test="$filter/表:条件区域"> 189 <xsl:element name="table:filter"> 190 <xsl:attribute name="table:condition-source-range-address"><xsl:call-template name="translate-expression2"><xsl:with-param name="expression2" select="translate($filter/表:条件区域/text(),'$','')"/></xsl:call-template></xsl:attribute> 191 </xsl:element> 192 </xsl:when> 193 <xsl:otherwise> 194 <xsl:element name="table:filter"> 195 <xsl:element name="table:filter-and"> 196 <xsl:call-template name="auto-filter-condition"> 197 <xsl:with-param name="conditon-set" select="$filter/表:条件"/> 198 <xsl:with-param name="zone-left-column-num" select="$zone-left-column-num"/> 199 </xsl:call-template> 200 </xsl:element> 201 </xsl:element> 202 </xsl:otherwise> 203 </xsl:choose> 204 </xsl:element> 205 </xsl:if> 206 </xsl:for-each> 207 </xsl:element> 208 </office:spreadsheet> 209 </office:body> 210 </xsl:template> 211 <xsl:template name="trackchange"> 212 <xsl:for-each select="表:主体/表:工作表/表:工作表内容//字:修订开始"> 213 <xsl:variable name="num"> 214 <xsl:number level="any" from="表:主体/表:工作表/表:工作表内容//*" count="字:修订开始"/> 215 </xsl:variable> 216 <table:tracked-changes> 217 <table:cell-content-change> 218 <xsl:attribute name="table:id"><xsl:value-of select="concat('ct',$num)"/></xsl:attribute> 219 <table:cell-address> 220 <xsl:attribute name="table:column"><xsl:value-of select="substring-after(@字:标识符,'-')"/></xsl:attribute> 221 <xsl:attribute name="table:row"><xsl:value-of select="substring-before(@字:标识符,'-')"/></xsl:attribute> 222 <xsl:attribute name="table:table">0</xsl:attribute> 223 </table:cell-address> 224 <office:change-info> 225 <dc:creator> 226 <xsl:choose> 227 <xsl:when test="starts-with(@字:修订信息引用,'+')"/> 228 <xsl:otherwise> 229 <xsl:value-of select="substring-before(@字:修订信息引用,'+')"/> 230 </xsl:otherwise> 231 </xsl:choose> 232 </dc:creator> 233 <!--xsl:value-of select="/uof:UOF/uof:元数据/uof:作者"/--> 234 <!--xsl:value-of select="/uof:UOF/uof:元数据/uof:创建日期"/--> 235 <dc:date> 236 <xsl:value-of select="substring-before(substring-after(@字:修订信息引用,'+'),'%')"/> 237 </dc:date> 238 </office:change-info> 239 <table:previous> 240 <table:change-track-table-cell> 241 <text:p> 242 <xsl:value-of select="substring-after(@字:修订信息引用,'%')"/> 243 </text:p> 244 </table:change-track-table-cell> 245 </table:previous> 246 </table:cell-content-change> 247 </table:tracked-changes> 248 </xsl:for-each> 249 </xsl:template> 250 <xsl:template match="uof:式样集"> 251 <xsl:element name="office:font-face-decls"> 252 <style:font-face style:name="宋体" svg:font-family="宋体" style:font-family-generic="swiss"/> 253 <xsl:apply-templates select="uof:字体集"/> 254 </xsl:element> 255 <xsl:call-template name="单元格式样"/> 256 </xsl:template> 257 <xsl:key match="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/uof:锚点 | /uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/表:单元格/uof:锚点" name="rel_graphic_name" use="@uof:图形引用"/> 258 <xsl:template match="图:图形"> 259 <xsl:variable name="random-name"> 260 <xsl:value-of select="generate-id()"/> 261 </xsl:variable> 262 <xsl:variable name="draw-name"> 263 <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/> 264 </xsl:variable> 265 <xsl:call-template name="graphic-fill"> 266 <xsl:with-param name="draw-name" select="$draw-name"/> 267 <xsl:with-param name="gradient-name" select="图:预定义图形/图:属性/图:填充/图:渐变"/> 268 </xsl:call-template> 269 <xsl:choose> 270 <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变"> 271 <xsl:element name="style:style"> 272 <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 273 <xsl:attribute name="style:family">graphic</xsl:attribute> 274 <xsl:element name="style:graphic-properties"> 275 <xsl:call-template name="process-graphics"> 276 <xsl:with-param name="draw-name" select="$draw-name"/> 277 </xsl:call-template> 278 </xsl:element> 279 <xsl:element name="style:paragraph-properties"> 280 <xsl:if test="图:文本内容/@图:文字排列方向"> 281 <xsl:choose> 282 <xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'"> 283 <xsl:attribute name="style:writing-mode">tb-lr</xsl:attribute> 284 </xsl:when> 285 <xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'"> 286 <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute> 287 </xsl:when> 288 </xsl:choose> 289 </xsl:if> 290 </xsl:element> 291 </xsl:element> 292 </xsl:when> 293 <xsl:otherwise> 294 <xsl:element name="style:style"> 295 <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 296 <xsl:attribute name="style:family">graphic</xsl:attribute> 297 <xsl:element name="style:graphic-properties"> 298 <xsl:if test="@图:其他对象"> 299 <xsl:attribute name="fo:clip">rect(0cm 0cm 0cm 0cm)</xsl:attribute> 300 <xsl:attribute name="draw:color-mode">standard</xsl:attribute> 301 <xsl:attribute name="draw:luminance">0%</xsl:attribute> 302 <xsl:attribute name="draw:contrast">0%</xsl:attribute> 303 <xsl:attribute name="draw:gamma">100%</xsl:attribute> 304 <xsl:attribute name="draw:red">0%</xsl:attribute> 305 <xsl:attribute name="draw:green">0%</xsl:attribute> 306 <xsl:attribute name="draw:blue">0%</xsl:attribute> 307 <xsl:attribute name="draw:image-opacity">100%</xsl:attribute> 308 <xsl:attribute name="style:mirror">none</xsl:attribute> 309 </xsl:if> 310 <xsl:call-template name="process-graphics"/> 311 </xsl:element> 312 <xsl:element name="style:paragraph-properties"> 313 <xsl:if test="图:文本内容/@图:文字排列方向"> 314 <xsl:choose> 315 <xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'"> 316 <xsl:attribute name="style:writing-mode">tb-lr</xsl:attribute> 317 </xsl:when> 318 <xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'"> 319 <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute> 320 </xsl:when> 321 </xsl:choose> 322 </xsl:if> 323 </xsl:element> 324 </xsl:element> 325 </xsl:otherwise> 326 </xsl:choose> 327 </xsl:template> 328 <xsl:template name="process-graphics"> 329 <xsl:param name="draw-name"/> 330 <xsl:if test="not(key('rel_graphic_name',@图:标识符)/@uof:随动方式='movesize')"> 331 <xsl:attribute name="style:protect"><xsl:choose><xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:随动方式='move'">size</xsl:when><xsl:otherwise>position size</xsl:otherwise></xsl:choose></xsl:attribute> 332 </xsl:if> 333 <xsl:choose> 334 <xsl:when test="not(图:预定义图形/图:属性/图:填充)"> 335 <xsl:attribute name="draw:fill">none</xsl:attribute> 336 </xsl:when> 337 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片"> 338 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 339 <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:attribute> 340 <xsl:if test="not(图:预定义图形/图:属性/图:填充/图:图片/@图:位置='tile')"> 341 <xsl:attribute name="style:repeat"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:位置='center'">no-repeat</xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:位置='stretch'">stretch</xsl:when></xsl:choose></xsl:attribute> 342 </xsl:if> 343 </xsl:when> 344 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案"> 345 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 346 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:前景色"/></xsl:attribute> 347 </xsl:when> 348 <xsl:when test="图:预定义图形/图:属性/图:填充/图:颜色"> 349 <xsl:attribute name="draw:fill">solid</xsl:attribute> 350 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:颜色"/></xsl:attribute> 351 </xsl:when> 352 <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变"> 353 <xsl:attribute name="draw:fill">gradient</xsl:attribute> 354 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:渐变/@图:起始色"/></xsl:attribute> 355 <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute> 356 </xsl:when> 357 </xsl:choose> 358 <xsl:if test="图:预定义图形/图:属性/图:线颜色"> 359 <xsl:attribute name="svg:stroke-color"><xsl:value-of select="图:预定义图形/图:属性/图:线颜色"/></xsl:attribute> 360 </xsl:if> 361 <xsl:if test="图:预定义图形/图:属性/图:线型 and not(图:预定义图形/图:属性/图:线型 = 'single') and not(图:预定义图形/图:属性/图:线型 = 'thick')"> 362 <xsl:variable name="type" select="图:预定义图形/图:属性/图:线型"/> 363 <xsl:attribute name="draw:stroke"><xsl:choose><xsl:when test="$type='none'">none</xsl:when><xsl:when test="$type='single'">solid</xsl:when><xsl:otherwise>dash</xsl:otherwise></xsl:choose></xsl:attribute> 364 <xsl:attribute name="draw:stroke-dash"><xsl:choose><xsl:when test="$type='dash'">Ultrafine_20_Dashed</xsl:when><xsl:when test="$type='dot-dash'">Ultrafine_20_2_20_Dots_20_3_20_Dashes</xsl:when><xsl:when test="$type='dashed-heavy'">Fine_20_Dashed</xsl:when><xsl:when test="$type='dotted' ">Fine_20_Dotted</xsl:when><xsl:when test="$type='dash-long-heavy'">Line_20_with_20_Fine_20_Dots</xsl:when><xsl:when test="$type='dash-long'">Fine_20_Dashed_20__28_var_29_</xsl:when><xsl:when test="$type='dash-dot-dot'">_33__20_Dashes_20_3_20_Dots_20__28_var_29_</xsl:when><xsl:when test="$type='dotted-heavy'">Ultrafine_20_Dotted_20__28_var_29_</xsl:when><xsl:when test="$type='thick'">Line_20_Style_20_9</xsl:when><xsl:when test="$type='dot-dot-dash'">_32__20_Dots_20_1_20_Dash</xsl:when><xsl:when test="$type='dash-dot-dot-heavy'">Dashed_20__28_var_29_</xsl:when><xsl:when test="$type='dash-dot-heavy'">Dash_20_10</xsl:when></xsl:choose></xsl:attribute> 365 </xsl:if> 366 <xsl:if test="图:预定义图形/图:属性/图:线粗细"> 367 <xsl:attribute name="svg:stroke-width"><xsl:value-of select="concat(图:预定义图形/图:属性/图:线粗细,$uofUnit)"/></xsl:attribute> 368 </xsl:if> 369 <xsl:if test="图:预定义图形/图:属性/图:前端箭头"> 370 <xsl:attribute name="draw:marker-start"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute> 371 <xsl:if test="图:预定义图形/图:属性/图:前端箭头/图:大小"> 372 <xsl:attribute name="draw:marker-start-width"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '1'"><xsl:value-of select="concat('0.05',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '2'"><xsl:value-of select="concat('0.10',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '3'"><xsl:value-of select="concat('0.15',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '4'"><xsl:value-of select="concat('0.20',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '5'"><xsl:value-of select="concat('0.25',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '6'"><xsl:value-of select="concat('0.30',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '7'"><xsl:value-of select="concat('0.35',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '8'"><xsl:value-of select="concat('0.40',$uofUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('0.45',$uofUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute> 373 </xsl:if> 374 </xsl:if> 375 <xsl:if test="图:预定义图形/图:属性/图:后端箭头"> 376 <xsl:attribute name="draw:marker-end"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute> 377 <xsl:if test="图:预定义图形/图:属性/图:后端箭头/图:大小"> 378 <xsl:attribute name="draw:marker-end-width"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '1'"><xsl:value-of select="concat('0.05',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '2'"><xsl:value-of select="concat('0.10',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '3'"><xsl:value-of select="concat('0.15',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '4'"><xsl:value-of select="concat('0.20',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '5'"><xsl:value-of select="concat('0.25',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '6'"><xsl:value-of select="concat('0.30',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '7'"><xsl:value-of select="concat('0.35',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '8'"><xsl:value-of select="concat('0.40',$uofUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('0.45',$uofUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute> 379 </xsl:if> 380 </xsl:if> 381 <xsl:if test="图:预定义图形/图:属性/图:透明度"> 382 <xsl:attribute name="draw:opacity"><xsl:value-of select="concat(图:预定义图形/图:属性/图:透明度,'%')"/></xsl:attribute> 383 </xsl:if> 384 <xsl:if test="图:文本内容"> 385 <xsl:if test="图:文本内容/@图:上边距"> 386 <xsl:attribute name="fo:padding-top"><xsl:value-of select="concat(图:文本内容/@图:上边距,$uofUnit)"/></xsl:attribute> 387 <xsl:attribute name="fo:padding-bottom"><xsl:value-of select="concat(图:文本内容/@图:下边距,$uofUnit)"/></xsl:attribute> 388 <xsl:attribute name="fo:padding-left"><xsl:value-of select="concat(图:文本内容/@图:左边距,$uofUnit)"/></xsl:attribute> 389 <xsl:attribute name="fo:padding-right"><xsl:value-of select="concat(图:文本内容/@图:右边距,$uofUnit)"/></xsl:attribute> 390 </xsl:if> 391 <xsl:if test="图:文本内容/@图:文字排列方向"> 392 <xsl:choose> 393 <xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'"> 394 <xsl:attribute name="style:writing-mode">tb-lr</xsl:attribute> 395 </xsl:when> 396 <xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'"> 397 <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute> 398 </xsl:when> 399 <xsl:when test="图:文本内容/@图:文字排列方向='hori-r2l'"> 400 <xsl:attribute name="draw:textarea-horizontal-align">right</xsl:attribute> 401 </xsl:when> 402 <xsl:when test="图:文本内容/@图:文字排列方向='hori-12r'"> 403 <xsl:attribute name="draw:textarea-horizontal-align">left</xsl:attribute> 404 </xsl:when> 405 </xsl:choose> 406 </xsl:if> 407 <xsl:if test="图:文本内容/@图:水平对齐"> 408 <xsl:attribute name="draw:textarea-horizontal-align"><xsl:value-of select="图:文本内容/@图:水平对齐"/></xsl:attribute> 409 </xsl:if> 410 <xsl:if test="图:文本内容/@图:垂直对齐"> 411 <xsl:attribute name="draw:textarea-vertical-align"><xsl:value-of select="图:文本内容/@图:垂直对齐"/></xsl:attribute> 412 </xsl:if> 413 <xsl:if test="图:文本内容/@图:自动换行"> 414 <xsl:attribute name="fo:wrap-option">no-wrap</xsl:attribute> 415 </xsl:if> 416 <xsl:attribute name="draw:auto-grow-width"><xsl:choose><xsl:when test="图:文本内容/@图:大小适应文字">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 417 <xsl:attribute name="draw:auto-grow-height"><xsl:choose><xsl:when test="图:文本内容/@图:大小适应文字">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 418 </xsl:if> 419 </xsl:template> 420 <xsl:template name="bina_graphic"> 421 <xsl:param name="refGraphic"/> 422 <xsl:element name="office:binary-data"> 423 <xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符 = $refGraphic]"> 424 <xsl:value-of select="uof:数据"/> 425 </xsl:for-each> 426 </xsl:element> 427 <text:p/> 428 </xsl:template> 429 <xsl:template name="graphic-fill"> 430 <xsl:param name="draw-name"/> 431 <xsl:param name="gradient-name"/> 432 <xsl:if test="图:预定义图形/图:属性/图:填充/图:渐变"> 433 <xsl:element name="draw:gradient"> 434 <xsl:attribute name="draw:name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute> 435 <xsl:attribute name="draw:style"><xsl:choose><xsl:when test="$gradient-name/@图:种子类型='linear'"><xsl:value-of select="'linear'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='radar'"><xsl:value-of select="'radial'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='oval'"><xsl:value-of select="'ellipsoid'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='square'"><xsl:value-of select="'square'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='rectangle'"><xsl:value-of select="'rectangular'"/></xsl:when></xsl:choose></xsl:attribute> 436 <xsl:attribute name="draw:start-color"><xsl:value-of select="$gradient-name/@图:起始色"/></xsl:attribute> 437 <xsl:attribute name="draw:end-color"><xsl:value-of select="$gradient-name/@图:终止色"/></xsl:attribute> 438 <xsl:attribute name="draw:start-intensity"><xsl:value-of select="concat($gradient-name/@图:起始浓度,'%')"/></xsl:attribute> 439 <xsl:attribute name="draw:end-intensity"><xsl:value-of select="concat($gradient-name/@图:终止浓度,'%')"/></xsl:attribute> 440 <xsl:attribute name="draw:angle"><xsl:value-of select="$gradient-name/@图:渐变方向 * 10"/></xsl:attribute> 441 <xsl:attribute name="draw:border"><xsl:value-of select="concat($gradient-name/@图:边界,'%')"/></xsl:attribute> 442 <xsl:if test="$gradient-name/@图:种子X位置"> 443 <xsl:attribute name="draw:cx"><xsl:value-of select="concat($gradient-name/@图:种子X位置,'%')"/></xsl:attribute> 444 </xsl:if> 445 <xsl:if test="$gradient-name/@图:种子Y位置"> 446 <xsl:attribute name="draw:cy"><xsl:value-of select="concat($gradient-name/@图:种子Y位置,'%')"/></xsl:attribute> 447 </xsl:if> 448 </xsl:element> 449 </xsl:if> 450 <xsl:if test="图:预定义图形/图:属性/图:前端箭头"> 451 <xsl:element name="draw:marker"> 452 <xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute> 453 <xsl:choose> 454 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'"> 455 <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute> 456 <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute> 457 </xsl:when> 458 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'"> 459 <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute> 460 <xsl:attribute name="svg:d">m0 2108v17 17l12 42 30 34 38 21 43 4 29-8 30-21 25-26 13-34 343-1532 339 1520 13 42 29 34 39 21 42 4 42-12 34-30 21-42v-39-12l-4 4-440-1998-9-42-25-39-38-25-43-8-42 8-38 25-26 39-8 42z</xsl:attribute> 461 </xsl:when> 462 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'"> 463 <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute> 464 <xsl:attribute name="svg:d">m1013 1491 118 89-567-1580-564 1580 114-85 136-68 148-46 161-17 161 13 153 46z</xsl:attribute> 465 </xsl:when> 466 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'"> 467 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 468 <xsl:attribute name="svg:d">m462 1118-102-29-102-51-93-72-72-93-51-102-29-102-13-105 13-102 29-106 51-102 72-89 93-72 102-50 102-34 106-9 101 9 106 34 98 50 93 72 72 89 51 102 29 106 13 102-13 105-29 102-51 102-72 93-93 72-98 51-106 29-101 13z</xsl:attribute> 469 </xsl:when> 470 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'"> 471 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 472 <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute> 473 </xsl:when> 474 </xsl:choose> 475 </xsl:element> 476 </xsl:if> 477 <xsl:if test="图:预定义图形/图:属性/图:后端箭头"> 478 <xsl:element name="draw:marker"> 479 <xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute> 480 <xsl:choose> 481 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'"> 482 <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute> 483 <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute> 484 </xsl:when> 485 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'"> 486 <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute> 487 <xsl:attribute name="svg:d">m0 2108v17 17l12 42 30 34 38 21 43 4 29-8 30-21 25-26 13-34 343-1532 339 1520 13 42 29 34 39 21 42 4 42-12 34-30 21-42v-39-12l-4 4-440-1998-9-42-25-39-38-25-43-8-42 8-38 25-26 39-8 42z</xsl:attribute> 488 </xsl:when> 489 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'"> 490 <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute> 491 <xsl:attribute name="svg:d">m1013 1491 118 89-567-1580-564 1580 114-85 136-68 148-46 161-17 161 13 153 46z</xsl:attribute> 492 </xsl:when> 493 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'"> 494 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 495 <xsl:attribute name="svg:d">m462 1118-102-29-102-51-93-72-72-93-51-102-29-102-13-105 13-102 29-106 51-102 72-89 93-72 102-50 102-34 106-9 101 9 106 34 98 50 93 72 72 89 51 102 29 106 13 102-13 105-29 102-51 102-72 93-93 72-98 51-106 29-101 13z</xsl:attribute> 496 </xsl:when> 497 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'"> 498 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 499 <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute> 500 </xsl:when> 501 </xsl:choose> 502 </xsl:element> 503 </xsl:if> 504 <xsl:if test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用 or 图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"> 505 <xsl:element name="draw:fill-image"> 506 <xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:类型"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:when></xsl:choose></xsl:attribute> 507 <xsl:call-template name="bina_graphic"> 508 <xsl:with-param name="refGraphic"> 509 <xsl:choose> 510 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"> 511 <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"/> 512 </xsl:when> 513 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"> 514 <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/> 515 </xsl:when> 516 </xsl:choose> 517 </xsl:with-param> 518 </xsl:call-template> 519 </xsl:element> 520 </xsl:if> 521 <xsl:if test="not(图:预定义图形/图:属性/图:线型='single') and not(图:预定义图形/图:属性/图:线型='thick') and 图:预定义图形/图:属性/图:线型"> 522 <draw:stroke-dash draw:name="Ultrafine_20_Dashed" draw:display-name="Ultrafine Dashed" draw:style="rect" draw:dots1="1" draw:dots1-length="0.051cm" draw:dots2="1" draw:dots2-length="0.051cm" draw:distance="0.051cm"/> 523 <draw:stroke-dash draw:name="Fine_20_Dashed" draw:display-name="Fine Dashed" draw:style="rect" draw:dots1="1" draw:dots1-length="0.508cm" draw:dots2="1" draw:dots2-length="0.508cm" draw:distance="0.508cm"/> 524 <draw:stroke-dash draw:name="Ultrafine_20_2_20_Dots_20_3_20_Dashes" draw:display-name="Ultrafine 2 Dots 3 Dashes" draw:style="rect" draw:dots1="2" draw:dots1-length="0.051cm" draw:dots2="3" draw:dots2-length="0.254cm" draw:distance="0.127cm"/> 525 <draw:stroke-dash draw:name="Fine_20_Dashed_20__28_var_29_" draw:display-name="Fine Dashed (var)" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="197%"/> 526 <draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/> 527 <draw:stroke-dash draw:name="Fine_20_Dashed_20__28_var_29_" draw:display-name="Fine Dashed (var)" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="197%"/> 528 <draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/> 529 <draw:stroke-dash draw:name="Line_20_with_20_Fine_20_Dots" draw:display-name="Line with Fine Dots" draw:style="rect" draw:dots1="1" draw:dots1-length="2.007cm" draw:dots2="10" draw:distance="0.152cm"/> 530 <draw:stroke-dash draw:name="Line_20_Style_20_9" draw:display-name="Line Style 9" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="120%"/> 531 <draw:stroke-dash draw:name="_33__20_Dashes_20_3_20_Dots_20__28_var_29_" draw:display-name="3 Dashes 3 Dots (var)" draw:style="rect" draw:dots1="3" draw:dots1-length="197%" draw:dots2="3" draw:distance="100%"/> 532 <draw:stroke-dash draw:name="_32__20_Dots_20_1_20_Dash" draw:display-name="2 Dots 1 Dash" draw:style="rect" draw:dots1="2" draw:dots2="1" draw:dots2-length="0.203cm" draw:distance="0.203cm"/> 533 <draw:stroke-dash draw:name="Ultrafine_20_Dotted_20__28_var_29_" draw:display-name="Ultrafine Dotted (var)" draw:style="rect" draw:dots1="1" draw:distance="50%"/> 534 <draw:stroke-dash draw:name="Dash_20_10" draw:display-name="Dash 10" draw:style="rect" draw:dots1="1" draw:dots1-length="0.02cm" draw:dots2="1" draw:dots2-length="0.02cm" draw:distance="0.02cm"/> 535 </xsl:if> 536 </xsl:template> 537 <xsl:template name="单元格式样"> 538 <xsl:variable name="uofSheet" select="/uof:UOF/uof:电子表格"/> 539 <xsl:variable name="uofSheet1" select="/uof:UOF/uof:电子表格/表:主体/表:工作表"/> 540 <xsl:variable name="uofSheetCom" select="$uofSheet/表:公用处理规则"/> 541 <xsl:variable name="first-style" select="/uof:UOF/uof:式样集/uof:单元格式样"/> 542 <xsl:variable name="quyu" select="/uof:UOF/uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化/表:区域"/> 543 <xsl:variable name="condition-format-set" select="/uof:UOF/uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化"/> 544 <xsl:variable name="aa"> 545 <xsl:for-each select="$first-style"> 546 <xsl:if test="@表:标识符!=@表:名称 and @表:名称!='Normal'"> 547 <xsl:value-of select="@表:名称"/> 548 </xsl:if> 549 </xsl:for-each> 550 </xsl:variable> 551 <xsl:variable name="bb"> 552 <xsl:for-each select="$first-style"> 553 <xsl:if test="@表:标识符!=@表:名称 and @表:名称!='Normal'"> 554 <xsl:value-of select="@表:标识符"/> 555 </xsl:if> 556 </xsl:for-each> 557 </xsl:variable> 558 <office:styles> 559 <!-- if ConditionalFormatting exists,it should generate some styles for style:style --> 560 <!--xsl:if test="$uofSheetCom/表:条件格式化集"> 561 <xsl:call-template name="CondFormat_office_style"/> 562 </xsl:if--> 563 <!--ro000179 chenjh--> 564 <xsl:for-each select="$first-style[@表:类型='custom' or @表:类型='default']"> 565 <xsl:call-template name="单元格具体式样"/> 566 <xsl:apply-templates select="表:数字格式[@表:格式码]"/> 567 <xsl:apply-templates select="表:字体格式[字:上下标]"/> 568 </xsl:for-each> 569 </office:styles> 570 <office:automatic-styles> 571 <xsl:for-each select="$first-style[@表:类型='auto']"> 572 <xsl:variable name="apply-style-name" select="@表:名称"/> 573 <xsl:variable name="style-name" select="@表:标识符"/> 574 <xsl:choose> 575 <xsl:when test="$style-name!=$apply-style-name and $apply-style-name!='Normal'"> 576 <xsl:for-each select="$condition-format-set/表:条件"> 577 <style:style> 578 <xsl:attribute name="style:name"><xsl:value-of select="//uof:单元格式样[@表:名称=current()/表:格式/@表:式样引用 and @表:类型='auto']/@表:标识符"/></xsl:attribute> 579 <xsl:attribute name="style:family">table-cell</xsl:attribute> 580 <xsl:attribute name="style:parent-style-name">Default</xsl:attribute> 581 <xsl:for-each select="parent::表:条件格式化/表:条件"> 582 <xsl:variable name="condition-text"> 583 <xsl:choose> 584 <xsl:when test="@表:类型='cell value'"> 585 <xsl:choose> 586 <xsl:when test="表:操作码/text()='between' "> 587 <xsl:value-of select="concat('cell-content-is-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 588 </xsl:when> 589 <xsl:when test=" 表:操作码/text()='not between'"> 590 <xsl:value-of select="concat('cell-content-is-not-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 591 </xsl:when> 592 <xsl:when test="表:操作码/text()='equal to'"> 593 <xsl:value-of select="concat('cell-content()=',表:第一操作数/text())"/> 594 </xsl:when> 595 <xsl:when test="表:操作码/text()='not equal to'"> 596 <xsl:value-of select="concat('cell-content()!=',表:第一操作数/text())"/> 597 </xsl:when> 598 <xsl:when test="表:操作码/text()='greater than'"> 599 <xsl:value-of select="concat('cell-content()>',表:第一操作数/text())"/> 600 </xsl:when> 601 <xsl:when test="表:操作码/text()='less than'"> 602 <xsl:value-of select="concat('cell-content()<',表:第一操作数/text())"/> 603 </xsl:when> 604 <xsl:when test="表:操作码/text()='greater than or equal to'"> 605 <xsl:value-of select="concat('cell-content()>=',表:第一操作数/text())"/> 606 </xsl:when> 607 <xsl:when test="表:操作码/text()='less than or equal to'"> 608 <xsl:value-of select="concat('cell-content()<=',表:第一操作数/text())"/> 609 </xsl:when> 610 </xsl:choose> 611 </xsl:when> 612 <xsl:when test="@表:类型='formula'"> 613 <xsl:value-of select="concat('is-true-formula','(',表:第一操作数/text(),')')"/> 614 </xsl:when> 615 </xsl:choose> 616 </xsl:variable> 617 <xsl:element name="style:map"> 618 <xsl:variable name="address"> 619 <xsl:value-of select="preceding-sibling::表:区域"/> 620 </xsl:variable> 621 <xsl:attribute name="style:condition"><xsl:value-of select="$condition-text"/></xsl:attribute> 622 <xsl:attribute name="style:apply-style-name"><xsl:value-of select="表:格式/@表:式样引用"/></xsl:attribute> 623 <xsl:attribute name="style:base-cell-address"><xsl:value-of select="substring-after($address,':')"/></xsl:attribute> 624 </xsl:element> 625 </xsl:for-each> 626 </style:style> 627 </xsl:for-each> 628 </xsl:when> 629 <xsl:otherwise> 630 <xsl:for-each select="uof:单元格式样 "> 631 <xsl:if test="@表:类型='auto' and (@表:标识符=@表:名称 or @表:名称='Normal')"> 632 <xsl:call-template name="单元格具体式样"/> 633 </xsl:if> 634 </xsl:for-each> 635 </xsl:otherwise> 636 </xsl:choose> 637 </xsl:for-each> 638 <!--Redoffie comment liliang SC0008 06.02.14--> 639 <!--1新增内容--> 640 <xsl:if test="uof:单元格式样"> 641 <xsl:for-each select="uof:单元格式样"> 642 <xsl:if test="@表:类型='auto' and (@表:标识符=@表:名称 or @表:名称='Normal')"> 643 <xsl:call-template name="单元格具体式样"/> 644 </xsl:if> 645 </xsl:for-each> 646 </xsl:if> 647 <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='png' or /uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='ipg' or /uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='bmp' or /uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='gif'"> 648 <style:style style:name="Graphics" style:family="graphics"> 649 <style:properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/> 650 </style:style> 651 </xsl:if> 652 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形"/> 653 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形/图:文本内容/字:段落/字:句/字:句属性" mode="style"/> 654 <!--Redoffice comment end 06.02.14--> 655 <xsl:apply-templates select="$uofSheet1/表:工作表内容"/> 656 <xsl:if test="uof:单元格式样"> 657 <xsl:for-each select="uof:单元格式样[@表:类型='auto' and (@表:标识符=@表:名称 or @表:名称='Normal')]"> 658 <xsl:call-template name="单元格具体式样"/> 659 <xsl:apply-templates select="表:数字格式[@表:格式码]"/> 660 <xsl:apply-templates select="表:字体格式[字:上下标]"/> 661 </xsl:for-each> 662 </xsl:if> 663 <!-- if ConditionalFormatting exists,transforing the styles --> 664 <!--xsl:if test="$uofSheetCom/表:条件格式化集"> 665 <xsl:call-template name="CondFormat_automatic_style"/> 666 </xsl:if--> 667 <xsl:if test="$uofSheetCom/表:条件格式化集/表:条件格式化"> 668 <xsl:variable name="style-name" select="$first-style/@表:标识符"/> 669 <xsl:variable name="left-top"> 670 <xsl:call-template name="search-left-top-in-tables"> 671 <xsl:with-param name="cellstylename" select="$style-name"/> 672 <xsl:with-param name="tableslist" select="$uofSheet1/表:工作表内容"/> 673 <xsl:with-param name="return" select="''"/> 674 </xsl:call-template> 675 </xsl:variable> 676 <xsl:variable name="after-translated-left-top"> 677 <xsl:call-template name="translate-left-top"> 678 <xsl:with-param name="left-top" select="$left-top"/> 679 </xsl:call-template> 680 </xsl:variable> 681 <xsl:if test="$after-translated-left-top!=''"> 682 <xsl:call-template name="create-the-condition-format-map"> 683 <xsl:with-param name="condition-format-set" select="$uofSheetCom/表:条件格式化集//表:条件格式化"/> 684 <xsl:with-param name="current-left-top" select="$after-translated-left-top"/> 685 </xsl:call-template> 686 </xsl:if> 687 </xsl:if> 688 <xsl:apply-templates select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列/表:单元格/*[descendant-or-self::*[namespace-uri()='http://www.w3.org/TR/REC-html40']]"/> 689 <!--xsl:apply-templates select="$uofSheet1/表:工作表属性/表:页面设置/表:页眉页脚/字:段落" /--> 690 <xsl:call-template name="create-page-master"> 691 <xsl:with-param name="worksheetoptions" select="$uofSheet1/表:工作表属性"/> 692 </xsl:call-template> 693 <xsl:for-each select="uof:句式样"> 694 <style:style> 695 <xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute> 696 <xsl:attribute name="style:family">text</xsl:attribute> 697 <style:text-properties> 698 <xsl:apply-templates select="./*"/> 699 </style:text-properties> 700 </style:style> 701 </xsl:for-each> 702 </office:automatic-styles> 703 <office:master-styles> 704 <xsl:call-template name="create-master-styles"> 705 <xsl:with-param name="worksheetoptions" select="$uofSheet1/表:工作表属性"/> 706 </xsl:call-template> 707 </office:master-styles> 708 </xsl:template> 709 <xsl:template match="表:数据有效性"> 710 <xsl:variable name="range-name-temp"> 711 <xsl:value-of select="substring-before(表:区域,'!')"/> 712 </xsl:variable> 713 <xsl:variable name="range-name"> 714 <xsl:value-of select="substring($range-name-temp,2,string-length($range-name-temp)-2)"/> 715 </xsl:variable> 716 <xsl:variable name="first-range"> 717 <xsl:choose> 718 <xsl:when test="contains(表:区域, ',')"> 719 <xsl:value-of select="translate(substring-after(substring-before(表:区域, ','),'!'),'$','')"/> 720 </xsl:when> 721 <xsl:otherwise> 722 <xsl:value-of select="translate(substring-after(表:区域,'!'),'$','')"/> 723 </xsl:otherwise> 724 </xsl:choose> 725 </xsl:variable> 726 <xsl:variable name="value-first"> 727 <xsl:value-of select="translate(表:第一操作数,'=','')"/> 728 </xsl:variable> 729 <xsl:variable name="value-second"> 730 <xsl:value-of select="translate(表:第二操作数,'=','')"/> 731 </xsl:variable> 732 <xsl:element name="table:content-validation"> 733 <xsl:attribute name="table:name"><xsl:value-of select="concat('val', position())"/></xsl:attribute> 734 <!--数据有效性:第一操作数、第二操作数--> 735 <!-- don't support two type of qualifier: List, Custom --> 736 <xsl:attribute name="table:condition"><xsl:variable name="qualifier-content"><xsl:choose><xsl:when test="表:操作码 = 'between'"><xsl:choose><xsl:when test="(number($value-second))"><xsl:value-of select="concat('cell-content-is-between([',$range-name,'.',$value-first,'],',$value-second)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('cell-content-is-between([',$range-name,'.',$value-first,'],[',$range-name,'.',$value-second,']')"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:操作码 = 'not between'"><xsl:choose><xsl:when test="number($value-second)"><xsl:value-of select="concat('cell-content-is-not-between([',$range-name,'.',$value-first,'],',$value-second)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('cell-content-is-not-between([',$range-name,'.',$value-first,'],[',$range-name,'.',$value-second,']')"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:操作码 = 'not equal to'"><xsl:value-of select="concat('!=', $value-first)"/></xsl:when><xsl:when test="表:操作码 = 'equal to'"><xsl:variable name="range1"><xsl:value-of select="substring-after(substring-before($value-first,':'),'(')"/></xsl:variable><xsl:variable name="range2"><xsl:value-of select="substring-before(substring-after($value-first,':'),')')"/></xsl:variable><xsl:value-of select="concat('=SUM([',$range-name,'.',$range1,':',$range-name,'.',$range2,']')"/></xsl:when><xsl:when test="表:操作码 = 'less than'"><xsl:value-of select="concat('<', $value-first)"/></xsl:when><xsl:when test="表:操作码 = 'greater than'"><xsl:value-of select="concat('>', $value-first)"/></xsl:when><xsl:when test="表:操作码 = 'greater than or equal to'"><xsl:value-of select="concat('>=[',$range-name, '.',$value-first,']')"/></xsl:when><xsl:when test="表:操作码 = 'less than or equal to'"><xsl:value-of select="concat('<=[',$range-name,'.', $value-first,']')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('([',$range-name,'.',substring-before($value-first,':'),':',$range-name,'.',substring-after($value-first,':'),'])')"/></xsl:otherwise></xsl:choose></xsl:variable><!--操作码、校验类型--><xsl:variable name="qualifier-value"><xsl:choose><xsl:when test="表:校验类型 = 'whole number'"><xsl:choose><xsl:when test="(表:操作码 = 'not between') or (表:操作码 = 'between')"><xsl:value-of select="concat('oooc:cell-content-is-whole-number() and ', $qualifier-content, ')')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-is-whole-number() and ', 'cell-content()', $qualifier-content)"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:校验类型 = 'decimal'"><xsl:choose><xsl:when test="(表:操作码 = 'not between') or (表:操作码 = 'between')"><xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and ', $qualifier-content, ')')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and ', 'cell-content()', $qualifier-content)"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:校验类型 = 'list'"><xsl:choose><xsl:when test="(表:操作码 = 'not between') or (表:操作码 = 'between')"><xsl:value-of select="concat('oooc:cell-content-is-in-list() and ', $qualifier-content, ')')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-is-in-list',$qualifier-content)"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:校验类型 = 'date'"><xsl:choose><xsl:when test="(表:操作码 = 'not between') or (表:操作码 = 'between')"><xsl:value-of select="concat('oooc:cell-content-is-date() and ', $qualifier-content, ')')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-is-date() and ', 'cell-content()', $qualifier-content)"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:校验类型 = 'time'"><xsl:choose><xsl:when test="(表:操作码 = 'not between') or (表:操作码 = 'between')"><xsl:value-of select="concat('oooc:cell-content-is-time() and ', $qualifier-content, ')')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-is-time() and ', 'cell-content()', $qualifier-content)"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:校验类型 = 'text length'"><xsl:choose><xsl:when test="表:操作码 = 'not between'"><xsl:choose><xsl:when test="number($value-second)"><xsl:value-of select="concat('oooc:cell-content-text-length-is-not-between([', $range-name,'.',$value-first, '],', $value-second, ')')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-text-length-is-not-between([',$range-name,'.', $value-first, '],[',$range-name,'.', $value-second, '])')"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="$value-second and $value-first"><xsl:choose><xsl:when test="number($value-second)"><xsl:value-of select="concat('oooc:cell-content-text-length-is-between([',$range-name,'.',$value-first,'],',$value-second,')')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-text-length-is-between([',$range-name,'.',$value-first,'],[',$range-name,'.',$value-second,'])')"/></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-text-length()', $qualifier-content)"/></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="表:校验类型 = 'custom'"><xsl:choose><xsl:when test="表:操作码 = 'between'"><xsl:value-of select="concat('and cell-content-is-between(',substring-before($value-first,'('),'([',$range-name,'.',substring-after(substring-before($value-first,':'),'('),':',$range-name,'.',substring-before(substring-after($value-first,':'),')'),']),0')"/></xsl:when><xsl:when test="表:操作码 = 'not between'"><xsl:value-of select="concat('oooc:and cell-content-is-not-between(',substring-before($value-first,'('),'([',$range-name,'.',substring-after(substring-before($value-first,':'),'('),':',$range-name,'.',substring-before(substring-after($value-first,':'),')'),']),0')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('oooc:cell-content-is-custom() and ', 'cell-content()', $qualifier-content)"/></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><xsl:value-of select="表:校验类型"/></xsl:otherwise></xsl:choose></xsl:variable><xsl:value-of select="$qualifier-value"/></xsl:attribute> 737 <!--忽略空格--> 738 <xsl:attribute name="table:allow-empty-cell"><xsl:choose><xsl:when test="表:忽略空格"><xsl:value-of select="'false'"/></xsl:when><xsl:otherwise><xsl:value-of select="'true'"/></xsl:otherwise></xsl:choose></xsl:attribute> 739 <xsl:attribute name="table:base-cell-address"><xsl:variable name="range"><xsl:value-of select="$first-range"/><!--xsl:call-template name="translate-expression"> 740 <xsl:with-param name="cell-row-pos" select="0" /> 741 <xsl:with-param name="cell-column-pos" select="0" /> 742 <xsl:with-param name="expression" select="$first-range" /> 743 <xsl:with-param name="return-value" select="''" /> 744 </xsl:call-template--></xsl:variable><xsl:call-template name="encode-as-cell-address"><xsl:with-param name="string" select="concat($range-name, '.', $range)"/></xsl:call-template></xsl:attribute> 745 <!--输入提示--> 746 <xsl:element name="table:help-message"> 747 <xsl:attribute name="table:title"><xsl:value-of select="表:输入提示/@表:标题"/></xsl:attribute> 748 <xsl:attribute name="table:display"><xsl:choose><xsl:when test="表:输入提示/@表:显示"><xsl:value-of select="表:输入提示/@表:显示"/></xsl:when><xsl:otherwise><xsl:value-of select="'false'"/></xsl:otherwise></xsl:choose></xsl:attribute> 749 <xsl:element name="text:p"> 750 <xsl:value-of select="表:输入提示/@表:内容"/> 751 </xsl:element> 752 </xsl:element> 753 <!--错误提示--> 754 <xsl:element name="table:error-message"> 755 <xsl:attribute name="table:message-type"><xsl:choose><xsl:when test="表:错误提示/@表:类型= 'information'"><xsl:value-of select="'information'"/></xsl:when><xsl:when test="表:错误提示/@表:类型= 'warning'"><xsl:value-of select="'warning'"/></xsl:when><xsl:otherwise><xsl:value-of select="'stop'"/></xsl:otherwise></xsl:choose></xsl:attribute> 756 <xsl:attribute name="table:title"><xsl:value-of select="表:错误提示/@表:标题"/></xsl:attribute> 757 <xsl:attribute name="table:display"><xsl:choose><xsl:when test="表:错误提示/@表:显示"><xsl:value-of select="表:错误提示/@表:显示"/></xsl:when><xsl:otherwise><xsl:value-of select="'false'"/></xsl:otherwise></xsl:choose></xsl:attribute> 758 <xsl:element name="text:p"> 759 <xsl:value-of select="表:错误提示/@表:内容"/> 760 </xsl:element> 761 </xsl:element> 762 </xsl:element> 763 </xsl:template> 764 <xsl:template name="CondFormat_office_style"> 765 <xsl:for-each select="../../uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化"> 766 <xsl:variable name="table-pos" select="count(../../../preceding-sibling::表:公用处理规则)+1"/> 767 <xsl:variable name="conditions" select="count(../preceding-sibling::表:条件格式化集)+1"/> 768 <xsl:for-each select="表:条件"> 769 <xsl:variable name="condition-number" select="count(preceding-sibling::表:条件)+1"/> 770 <xsl:element name="style:style"> 771 <xsl:attribute name="style:name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="concat('Excel_CondFormat_',$table-pos,'_',$conditions,'_',$condition-number)"/></xsl:call-template></xsl:attribute> 772 <xsl:attribute name="style:family">table-cell</xsl:attribute> 773 <xsl:element name="style:properties"> 774 <xsl:choose> 775 <xsl:when test="表:格式/@表:式样引用"> 776 <xsl:variable name="stylevalue" select="表:格式/@表:式样引用"/> 777 <xsl:call-template name="recursion-condformat-style-table-cell"> 778 <xsl:with-param name="style-value-t"> 779 <xsl:choose> 780 <xsl:when test="substring($stylevalue,string-length($stylevalue),1) != ';'"> 781 <xsl:value-of select="concat($stylevalue,';')"/> 782 </xsl:when> 783 <xsl:otherwise> 784 <xsl:value-of select="$stylevalue"/> 785 </xsl:otherwise> 786 </xsl:choose> 787 </xsl:with-param> 788 </xsl:call-template> 789 </xsl:when> 790 </xsl:choose> 791 </xsl:element> 792 <!--xsl:element name="style:text-properties"--> 793 <!--chengxz0618--> 794 <xsl:element name="style:properties"> 795 <xsl:choose> 796 <xsl:when test="表:格式/@表:式样引用"> 797 <xsl:variable name="stylevalue" select="表:格式/@表:式样引用"/> 798 <xsl:call-template name="recursion-condformat-style-text"> 799 <xsl:with-param name="style-value-t"> 800 <xsl:choose> 801 <xsl:when test="substring($stylevalue,string-length($stylevalue),1) != ';'"> 802 <xsl:value-of select="concat($stylevalue,';')"/> 803 </xsl:when> 804 <xsl:otherwise> 805 <xsl:value-of select="$stylevalue"/> 806 </xsl:otherwise> 807 </xsl:choose> 808 </xsl:with-param> 809 </xsl:call-template> 810 </xsl:when> 811 <xsl:otherwise> 812 <xsl:attribute name="fo:font-style"><xsl:value-of select="'italic'"/></xsl:attribute> 813 <xsl:attribute name="style:text-underline-type"><xsl:value-of select="'single'"/></xsl:attribute> 814 <xsl:attribute name="style:text-underline-color"><xsl:value-of select="'font-color'"/></xsl:attribute> 815 <xsl:attribute name="fo:font-weight"><xsl:value-of select="'bold'"/></xsl:attribute> 816 </xsl:otherwise> 817 </xsl:choose> 818 </xsl:element> 819 </xsl:element> 820 </xsl:for-each> 821 </xsl:for-each> 822 </xsl:template> 823 <xsl:template name="cell-pattern-color"> 824 <xsl:param name="pattern"/> 825 <xsl:param name="color-value"/> 826 <xsl:param name="pattern-color-value"/> 827 <xsl:variable name="rev-pattern" select="1 - $pattern"/> 828 <xsl:variable name="color-R-value"> 829 <xsl:call-template name="hex2decimal"> 830 <xsl:with-param name="hex-number" select="substring($color-value,2,2)"/> 831 <xsl:with-param name="index" select="1"/> 832 <xsl:with-param name="str-length" select="2"/> 833 <xsl:with-param name="last-value" select="0"/> 834 </xsl:call-template> 835 </xsl:variable> 836 <xsl:variable name="color-G-value"> 837 <xsl:call-template name="hex2decimal"> 838 <xsl:with-param name="hex-number" select="substring($color-value,4,2)"/> 839 <xsl:with-param name="index" select="1"/> 840 <xsl:with-param name="str-length" select="2"/> 841 <xsl:with-param name="last-value" select="0"/> 842 </xsl:call-template> 843 </xsl:variable> 844 <xsl:variable name="color-B-value"> 845 <xsl:call-template name="hex2decimal"> 846 <xsl:with-param name="hex-number" select="substring($color-value,6,2)"/> 847 <xsl:with-param name="index" select="1"/> 848 <xsl:with-param name="str-length" select="2"/> 849 <xsl:with-param name="last-value" select="0"/> 850 </xsl:call-template> 851 </xsl:variable> 852 <xsl:variable name="pattern-R-value"> 853 <xsl:call-template name="hex2decimal"> 854 <xsl:with-param name="hex-number" select="substring($pattern-color-value,2,2)"/> 855 <xsl:with-param name="index" select="1"/> 856 <xsl:with-param name="str-length" select="2"/> 857 <xsl:with-param name="last-value" select="0"/> 858 </xsl:call-template> 859 </xsl:variable> 860 <xsl:variable name="pattern-G-value"> 861 <xsl:call-template name="hex2decimal"> 862 <xsl:with-param name="hex-number" select="substring($pattern-color-value,4,2)"/> 863 <xsl:with-param name="index" select="1"/> 864 <xsl:with-param name="str-length" select="2"/> 865 <xsl:with-param name="last-value" select="0"/> 866 </xsl:call-template> 867 </xsl:variable> 868 <xsl:variable name="pattern-B-value"> 869 <xsl:call-template name="hex2decimal"> 870 <xsl:with-param name="hex-number" select="substring($pattern-color-value,6,2)"/> 871 <xsl:with-param name="index" select="1"/> 872 <xsl:with-param name="str-length" select="2"/> 873 <xsl:with-param name="last-value" select="0"/> 874 </xsl:call-template> 875 </xsl:variable> 876 <xsl:variable name="R-value"> 877 <xsl:variable name="combined-R-value"> 878 <xsl:call-template name="decimal2hex"> 879 <xsl:with-param name="dec-number" select="floor($color-R-value * $rev-pattern + $pattern-R-value * $pattern)"/> 880 <xsl:with-param name="last-value" select="'H'"/> 881 </xsl:call-template> 882 </xsl:variable> 883 <xsl:choose> 884 <xsl:when test="string-length($combined-R-value) = 1"> 885 <xsl:value-of select="concat('0',$combined-R-value)"/> 886 </xsl:when> 887 <xsl:otherwise> 888 <xsl:value-of select="$combined-R-value"/> 889 </xsl:otherwise> 890 </xsl:choose> 891 </xsl:variable> 892 <xsl:variable name="G-value"> 893 <xsl:variable name="combined-G-value"> 894 <xsl:call-template name="decimal2hex"> 895 <xsl:with-param name="dec-number" select="floor($color-G-value * $rev-pattern + $pattern-G-value * $pattern)"/> 896 <xsl:with-param name="last-value" select="'H'"/> 897 </xsl:call-template> 898 </xsl:variable> 899 <xsl:choose> 900 <xsl:when test="string-length($combined-G-value) = 1"> 901 <xsl:value-of select="concat('0',$combined-G-value)"/> 902 </xsl:when> 903 <xsl:otherwise> 904 <xsl:value-of select="$combined-G-value"/> 905 </xsl:otherwise> 906 </xsl:choose> 907 </xsl:variable> 908 <xsl:variable name="B-value"> 909 <xsl:variable name="combined-B-value"> 910 <xsl:call-template name="decimal2hex"> 911 <xsl:with-param name="dec-number" select="floor($color-B-value * $rev-pattern + $pattern-B-value * $pattern)"/> 912 <xsl:with-param name="last-value" select="'H'"/> 913 </xsl:call-template> 914 </xsl:variable> 915 <xsl:choose> 916 <xsl:when test="string-length($combined-B-value) = 1"> 917 <xsl:value-of select="concat('0',$combined-B-value)"/> 918 </xsl:when> 919 <xsl:otherwise> 920 <xsl:value-of select="$combined-B-value"/> 921 </xsl:otherwise> 922 </xsl:choose> 923 </xsl:variable> 924 <xsl:value-of select="concat('#',$R-value,$G-value,$B-value)"/> 925 </xsl:template> 926 <xsl:template name="hex2decimal"> 927 <xsl:param name="hex-number"/> 928 <xsl:param name="index"/> 929 <xsl:param name="str-length"/> 930 <xsl:param name="last-value"/> 931 <xsl:variable name="dec-char"> 932 <xsl:call-template name="hexNumber2dec"> 933 <xsl:with-param name="hex-value" select="substring($hex-number, $index ,1)"/> 934 </xsl:call-template> 935 </xsl:variable> 936 <xsl:variable name="current-value" select="$last-value * 16 + $dec-char"/> 937 <xsl:if test="$index < $str-length"> 938 <xsl:call-template name="hex2decimal"> 939 <xsl:with-param name="hex-number" select="$hex-number"/> 940 <xsl:with-param name="index" select="$index + 1"/> 941 <xsl:with-param name="str-length" select="$str-length"/> 942 <xsl:with-param name="last-value" select="$current-value"/> 943 </xsl:call-template> 944 </xsl:if> 945 <xsl:if test="$index = $str-length"> 946 <xsl:value-of select="$current-value"/> 947 </xsl:if> 948 </xsl:template> 949 <xsl:template name="hexNumber2dec"> 950 <xsl:param name="hex-value"/> 951 <xsl:choose> 952 <xsl:when test="$hex-value = 'A' or ($hex-value = 'a')"> 953 <xsl:value-of select="10"/> 954 </xsl:when> 955 <xsl:when test="$hex-value = 'B' or ($hex-value = 'b')"> 956 <xsl:value-of select="11"/> 957 </xsl:when> 958 <xsl:when test="$hex-value = 'C' or ($hex-value = 'c')"> 959 <xsl:value-of select="12"/> 960 </xsl:when> 961 <xsl:when test="$hex-value = 'D' or ($hex-value = 'd')"> 962 <xsl:value-of select="13"/> 963 </xsl:when> 964 <xsl:when test="$hex-value = 'E' or ($hex-value = 'e')"> 965 <xsl:value-of select="14"/> 966 </xsl:when> 967 <xsl:when test="$hex-value = 'F' or ($hex-value = 'f')"> 968 <xsl:value-of select="15"/> 969 </xsl:when> 970 <xsl:otherwise> 971 <xsl:value-of select="$hex-value"/> 972 </xsl:otherwise> 973 </xsl:choose> 974 </xsl:template> 975 <xsl:template name="decimal2hex"> 976 <xsl:param name="dec-number"/> 977 <xsl:param name="last-value"/> 978 <xsl:variable name="current-value"> 979 <xsl:call-template name="decNumber2hex"> 980 <xsl:with-param name="dec-value"> 981 <xsl:if test="$dec-number > 15"> 982 <xsl:value-of select="floor($dec-number div 16)"/> 983 </xsl:if> 984 <xsl:if test="$dec-number < 16"> 985 <xsl:value-of select="$dec-number"/> 986 </xsl:if> 987 </xsl:with-param> 988 </xsl:call-template> 989 </xsl:variable> 990 <xsl:if test="$dec-number > 15"> 991 <xsl:call-template name="decimal2hex"> 992 <xsl:with-param name="dec-number" select="$dec-number mod 16"/> 993 <xsl:with-param name="last-value" select="concat($last-value,$current-value)"/> 994 </xsl:call-template> 995 </xsl:if> 996 <xsl:if test="$dec-number < 16"> 997 <xsl:value-of select="substring-after(concat($last-value,$current-value),'H')"/> 998 </xsl:if> 999 </xsl:template> 1000 <xsl:template name="decNumber2hex"> 1001 <xsl:param name="dec-value"/> 1002 <xsl:choose> 1003 <xsl:when test="$dec-value = 10"> 1004 <xsl:value-of select="'A'"/> 1005 </xsl:when> 1006 <xsl:when test="$dec-value = 11"> 1007 <xsl:value-of select="'B'"/> 1008 </xsl:when> 1009 <xsl:when test="$dec-value = 12"> 1010 <xsl:value-of select="'C'"/> 1011 </xsl:when> 1012 <xsl:when test="$dec-value = 13"> 1013 <xsl:value-of select="'D'"/> 1014 </xsl:when> 1015 <xsl:when test="$dec-value = 14"> 1016 <xsl:value-of select="'E'"/> 1017 </xsl:when> 1018 <xsl:when test="$dec-value = 15"> 1019 <xsl:value-of select="'F'"/> 1020 </xsl:when> 1021 <xsl:otherwise> 1022 <xsl:value-of select="$dec-value"/> 1023 </xsl:otherwise> 1024 </xsl:choose> 1025 </xsl:template> 1026 <xsl:template name="recursion-condformat-style-table-cell"> 1027 <xsl:param name="style-value-t"/> 1028 <xsl:variable name="style-value" select="$style-value-t"/> 1029 <xsl:choose> 1030 <xsl:when test="starts-with($style-value,'background')"> 1031 <xsl:choose> 1032 <xsl:when test="contains($style-value,'mso-pattern')"> 1033 <xsl:variable name="color-value"> 1034 <xsl:call-template name="translate-color-style"> 1035 <xsl:with-param name="source-str" select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/> 1036 </xsl:call-template> 1037 </xsl:variable> 1038 <xsl:variable name="mso-value"> 1039 <xsl:call-template name="translate-color-style"> 1040 <xsl:with-param name="source-str" select="normalize-space(substring-after($style-value,'mso-pattern'))"/> 1041 </xsl:call-template> 1042 </xsl:variable> 1043 <xsl:variable name="mso-color" select="substring-after($mso-value,'#')"/> 1044 <xsl:variable name="pattern-color-value" select="substring($mso-color,1,6)"/> 1045 <xsl:variable name="pattern" select="concat('0.',normalize-space(substring-before(substring-after($mso-color,'gray-'),';')))"/> 1046 <xsl:variable name="pattern-color"> 1047 <xsl:call-template name="cell-pattern-color"> 1048 <xsl:with-param name="pattern" select="$pattern"/> 1049 <xsl:with-param name="color-value" select="$color-value"/> 1050 <xsl:with-param name="pattern-color-value" select="concat('#',$pattern-color-value)"/> 1051 </xsl:call-template> 1052 </xsl:variable> 1053 <xsl:attribute name="fo:background-color"><xsl:value-of select="normalize-space($pattern-color)"/></xsl:attribute> 1054 </xsl:when> 1055 <xsl:otherwise> 1056 <xsl:attribute name="fo:background-color"><xsl:call-template name="translate-color-style"><xsl:with-param name="source-str" select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/></xsl:call-template></xsl:attribute> 1057 </xsl:otherwise> 1058 </xsl:choose> 1059 </xsl:when> 1060 <xsl:when test="starts-with($style-value,'border')"> 1061 <xsl:attribute name="fo:border"><xsl:value-of select="'0.002cm solid #000000'"/></xsl:attribute> 1062 </xsl:when> 1063 </xsl:choose> 1064 <xsl:if test="contains($style-value,':')"> 1065 <xsl:call-template name="recursion-condformat-style-table-cell"> 1066 <xsl:with-param name="style-value-t" select="substring-after($style-value,';')"/> 1067 </xsl:call-template> 1068 </xsl:if> 1069 </xsl:template> 1070 <xsl:template name="recursion-condformat-style-text"> 1071 <xsl:param name="style-value-t"/> 1072 <xsl:variable name="style-value" select="normalize-space($style-value-t)"/> 1073 <xsl:choose> 1074 <xsl:when test="starts-with($style-value,'color')"> 1075 <xsl:attribute name="fo:color"><xsl:call-template name="translate-color-style"><xsl:with-param name="source-str" select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/></xsl:call-template></xsl:attribute> 1076 </xsl:when> 1077 <xsl:when test="starts-with($style-value,'font-style')"> 1078 <xsl:attribute name="fo:font-style"><xsl:value-of select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/></xsl:attribute> 1079 </xsl:when> 1080 <xsl:when test="starts-with($style-value,'font-weight')"> 1081 <xsl:variable name="font-weight" select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/> 1082 <xsl:attribute name="fo:font-weight"><xsl:choose><xsl:when test="($font-weight > 300) and ($font-weight < 500)"><xsl:value-of select="'normal'"/></xsl:when><xsl:when test="($font-weight > 500) or ($font-weight = 500)"><xsl:value-of select="'bold'"/></xsl:when><xsl:otherwise><xsl:value-of select="'0'"/></xsl:otherwise></xsl:choose></xsl:attribute> 1083 </xsl:when> 1084 <xsl:when test="starts-with($style-value,'text-underline-style')"> 1085 <xsl:attribute name="style:text-underline-type"><xsl:value-of select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/></xsl:attribute> 1086 <xsl:attribute name="style:text-underline-color"><xsl:value-of select="'#000000'"/></xsl:attribute> 1087 </xsl:when> 1088 </xsl:choose> 1089 <xsl:if test="contains($style-value,':')"> 1090 <xsl:call-template name="recursion-condformat-style-text"> 1091 <xsl:with-param name="style-value-t" select="substring-after($style-value,';')"/> 1092 </xsl:call-template> 1093 </xsl:if> 1094 </xsl:template> 1095 <xsl:template name="translate-color-style"> 1096 <xsl:param name="source-str"/> 1097 <xsl:choose> 1098 <xsl:when test="starts-with($source-str,'#')"> 1099 <xsl:value-of select="$source-str"/> 1100 </xsl:when> 1101 <xsl:otherwise> 1102 <xsl:choose> 1103 <xsl:when test="starts-with($source-str,'black')"> 1104 <xsl:value-of select="'#000000'"/> 1105 </xsl:when> 1106 <xsl:when test="starts-with($source-str,'maroon')"> 1107 <xsl:value-of select="'#800000'"/> 1108 </xsl:when> 1109 <xsl:when test="starts-with($source-str,'red')"> 1110 <xsl:value-of select="'#FF0000'"/> 1111 </xsl:when> 1112 <xsl:when test="starts-with($source-str,'fuchsia')"> 1113 <xsl:value-of select="'#FF00FF'"/> 1114 </xsl:when> 1115 <xsl:when test="starts-with($source-str,'olive')"> 1116 <xsl:value-of select="'#808000'"/> 1117 </xsl:when> 1118 <xsl:when test="starts-with($source-str,'yellow')"> 1119 <xsl:value-of select="'#FFFF00'"/> 1120 </xsl:when> 1121 <xsl:when test="starts-with($source-str,'green')"> 1122 <xsl:value-of select="'#008000'"/> 1123 </xsl:when> 1124 <xsl:when test="starts-with($source-str,'lime')"> 1125 <xsl:value-of select="'#00FF00'"/> 1126 </xsl:when> 1127 <xsl:when test="starts-with($source-str,'teal')"> 1128 <xsl:value-of select="'#008080'"/> 1129 </xsl:when> 1130 <xsl:when test="starts-with($source-str,'aqua')"> 1131 <xsl:value-of select="'#00FFFF'"/> 1132 </xsl:when> 1133 <xsl:when test="starts-with($source-str,'navy')"> 1134 <xsl:value-of select="'#000080'"/> 1135 </xsl:when> 1136 <xsl:when test="starts-with($source-str,'blue')"> 1137 <xsl:value-of select="'#0000FF'"/> 1138 </xsl:when> 1139 <xsl:when test="starts-with($source-str,'purple')"> 1140 <xsl:value-of select="'#800080'"/> 1141 </xsl:when> 1142 <xsl:when test="starts-with($source-str,'gray')"> 1143 <xsl:value-of select="'#808080'"/> 1144 </xsl:when> 1145 <xsl:when test="starts-with($source-str,'silver')"> 1146 <xsl:value-of select="'#C0C0C0'"/> 1147 </xsl:when> 1148 <xsl:when test="starts-with($source-str,'white')"> 1149 <xsl:value-of select="'#FFFFFF'"/> 1150 </xsl:when> 1151 <xsl:otherwise> 1152 <xsl:value-of select="'#FFFFFF'"/> 1153 </xsl:otherwise> 1154 </xsl:choose> 1155 </xsl:otherwise> 1156 </xsl:choose> 1157 </xsl:template> 1158 <xsl:template name="CondFormat_automatic_style"> 1159 <xsl:for-each select="../uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化"> 1160 <xsl:variable name="table-pos" select="count(../../../preceding-sibling::表:公用处理规则)+1"/> 1161 <xsl:variable name="conditions" select="count(../preceding-sibling::表:条件格式化集)+1"/> 1162 <xsl:element name="style:style"> 1163 <xsl:attribute name="style:name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="concat('ce',$table-pos,'-',$conditions)"/></xsl:call-template></xsl:attribute> 1164 <xsl:attribute name="style:family">table-cell</xsl:attribute> 1165 <xsl:for-each select="uof:单元格式样/表:条件"> 1166 <xsl:variable name="condition-number" select="count(preceding-sibling::表:条件)+1"/> 1167 <xsl:variable name="base-address"> 1168 <xsl:choose> 1169 <xsl:when test="contains(../表:区域,',')"> 1170 <xsl:choose> 1171 <xsl:when test="contains(substring-before(../表:区域,','),':')"> 1172 <xsl:value-of select="substring-before(substring-after(../表:区域,':'),',')"/> 1173 </xsl:when> 1174 <xsl:otherwise> 1175 <xsl:value-of select="substring-before(../表:区域,',')"/> 1176 </xsl:otherwise> 1177 </xsl:choose> 1178 </xsl:when> 1179 <xsl:otherwise> 1180 <xsl:value-of select="../表:区域"/> 1181 </xsl:otherwise> 1182 </xsl:choose> 1183 </xsl:variable> 1184 <xsl:variable name="base-cell-address"> 1185 <xsl:call-template name="translate-unit"> 1186 <xsl:with-param name="column-number" select="substring-before(substring-after($base-address,'R'),'C')"/> 1187 <xsl:with-param name="row-number" select="substring-after($base-address,'C')"/> 1188 <xsl:with-param name="column-pos-style" select="absolute"/> 1189 <xsl:with-param name="row-pos-style" select="absolute"/> 1190 </xsl:call-template> 1191 </xsl:variable> 1192 <xsl:variable name="condition-value"> 1193 <xsl:call-template name="translate-condition"> 1194 </xsl:call-template> 1195 </xsl:variable> 1196 <xsl:element name="style:map"> 1197 <xsl:attribute name="style:condition"><xsl:value-of select="$condition-value"/></xsl:attribute> 1198 <xsl:attribute name="style:apply-style-name"><xsl:value-of select="concat('Excel_CondFormat_',$table-pos,'_',$conditions,'_',$condition-number)"/></xsl:attribute> 1199 <xsl:attribute name="style:base-cell-address"><xsl:value-of select="concat(../../@Name,'.',$base-cell-address)"/></xsl:attribute> 1200 </xsl:element> 1201 </xsl:for-each> 1202 </xsl:element> 1203 </xsl:for-each> 1204 </xsl:template> 1205 <xsl:template name="translate-condition"> 1206 <xsl:variable name="address-value"> 1207 <xsl:call-template name="translate-expression"> 1208 <xsl:with-param name="cell-row-pos" select="0"/> 1209 <xsl:with-param name="cell-column-pos" select="0"/> 1210 <xsl:with-param name="expression" select="表:第一操作数"/> 1211 <xsl:with-param name="return-value" select="''"/> 1212 </xsl:call-template> 1213 </xsl:variable> 1214 <xsl:choose> 1215 <xsl:when test="表:操作码"> 1216 <xsl:variable name="qualifier" select="表:操作码"/> 1217 <xsl:variable name="first-value" select="表:第一操作数"/> 1218 <xsl:choose> 1219 <xsl:when test="$qualifier = 'Equal'"> 1220 <xsl:choose> 1221 <xsl:when test="starts-with($first-value,'"')"> 1222 <xsl:value-of select="concat('cell-content()=',$address-value)"/> 1223 </xsl:when> 1224 <xsl:otherwise> 1225 <xsl:value-of select="concat('cell-content()=[',$address-value,']')"/> 1226 </xsl:otherwise> 1227 </xsl:choose> 1228 </xsl:when> 1229 <xsl:when test="$qualifier = 'Less'"> 1230 <xsl:value-of select="concat('cell-content()<[',$address-value,']')"/> 1231 </xsl:when> 1232 <xsl:when test="$qualifier = 'Greater'"> 1233 <xsl:value-of select="concat('cell-content()>[',$address-value,']')"/> 1234 </xsl:when> 1235 <xsl:when test="$qualifier = 'LessOrEqual'"> 1236 <xsl:value-of select="concat('cell-content()<=[',$address-value,']')"/> 1237 </xsl:when> 1238 <xsl:when test="$qualifier = 'GreaterOrEqual'"> 1239 <xsl:value-of select="concat('cell-content()>=[',$address-value,']')"/> 1240 </xsl:when> 1241 <xsl:when test="$qualifier = 'NotEqual'"> 1242 <xsl:value-of select="concat('cell-content()!=[',$address-value,']')"/> 1243 </xsl:when> 1244 <xsl:when test="$qualifier = 'Between'"> 1245 <xsl:variable name="second-value"> 1246 <xsl:call-template name="translate-expression"> 1247 <xsl:with-param name="cell-row-pos" select="0"/> 1248 <xsl:with-param name="cell-column-pos" select="0"/> 1249 <xsl:with-param name="expression" select="表:第二操作数"/> 1250 <xsl:with-param name="return-value" select="''"/> 1251 </xsl:call-template> 1252 </xsl:variable> 1253 <xsl:value-of select="concat('cell-content-is-between([',$address-value,'],[',$second-value,'])')"/> 1254 </xsl:when> 1255 <xsl:when test="$qualifier = 'NotBetween'"> 1256 <xsl:variable name="second-value"> 1257 <xsl:call-template name="translate-expression"> 1258 <xsl:with-param name="cell-row-pos" select="0"/> 1259 <xsl:with-param name="cell-column-pos" select="0"/> 1260 <xsl:with-param name="expression" select="表:第二操作数"/> 1261 <xsl:with-param name="return-value" select="''"/> 1262 </xsl:call-template> 1263 </xsl:variable> 1264 <xsl:value-of select="concat('cell-content-is-not-between([',$address-value,'],[',$second-value,'])')"/> 1265 </xsl:when> 1266 </xsl:choose> 1267 </xsl:when> 1268 <xsl:otherwise> 1269 <xsl:value-of select="concat('is-true-formula(',$address-value,')')"/> 1270 </xsl:otherwise> 1271 </xsl:choose> 1272 </xsl:template> 1273 <xsl:template name="translate-expression"> 1274 <xsl:param name="cell-row-pos"/> 1275 <xsl:param name="cell-column-pos"/> 1276 <xsl:param name="expression"/> 1277 <xsl:param name="return-value"/> 1278 <xsl:variable name="temp-range"> 1279 <xsl:choose> 1280 <xsl:when test="$expression != ''"> 1281 <xsl:call-template name="parse-range-name"> 1282 <xsl:with-param name="expression" select="$expression"/> 1283 <xsl:with-param name="return-value" select="''"/> 1284 </xsl:call-template> 1285 </xsl:when> 1286 <xsl:otherwise> 1287 <xsl:value-of select="''"/> 1288 </xsl:otherwise> 1289 </xsl:choose> 1290 </xsl:variable> 1291 <xsl:variable name="range-type"> 1292 <xsl:choose> 1293 <xsl:when test="substring($temp-range, 1, 1) = '1'"> 1294 <xsl:value-of select="1"/> 1295 </xsl:when> 1296 <xsl:when test="substring($temp-range, 1, 1) = '2'"> 1297 <xsl:value-of select="2"/> 1298 </xsl:when> 1299 <xsl:otherwise> 1300 <xsl:value-of select="2"/> 1301 </xsl:otherwise> 1302 </xsl:choose> 1303 </xsl:variable> 1304 <xsl:variable name="current-range"> 1305 <xsl:value-of select="substring($temp-range, 2)"/> 1306 </xsl:variable> 1307 <xsl:choose> 1308 <xsl:when test="$range-type = 1"> 1309 <xsl:call-template name="translate-expression"> 1310 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1311 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1312 <xsl:with-param name="expression"> 1313 <xsl:choose> 1314 <xsl:when test="contains($current-range, '#$')"> 1315 <xsl:variable name="temp-token"> 1316 <xsl:choose> 1317 <xsl:when test="contains($current-range, '\')"> 1318 <xsl:value-of select="concat(']', substring-after($current-range, '#$'), "'")"/> 1319 </xsl:when> 1320 <xsl:otherwise> 1321 <xsl:value-of select="substring-after($current-range, '#$')"/> 1322 </xsl:otherwise> 1323 </xsl:choose> 1324 </xsl:variable> 1325 <xsl:value-of select="substring-after($expression, $temp-token)"/> 1326 </xsl:when> 1327 <xsl:otherwise> 1328 <xsl:value-of select="substring-after($expression, $current-range)"/> 1329 </xsl:otherwise> 1330 </xsl:choose> 1331 </xsl:with-param> 1332 <xsl:with-param name="return-value"> 1333 <xsl:choose> 1334 <xsl:when test="$current-range = '='"> 1335 <xsl:text>oooc:=</xsl:text> 1336 </xsl:when> 1337 <xsl:when test="substring($current-range, string-length($current-range)) = '('"> 1338 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), $current-range, '[.')"/> 1339 </xsl:when> 1340 <xsl:when test="$current-range = ','"> 1341 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), '];[.')"/> 1342 </xsl:when> 1343 <xsl:when test="$current-range = ')'"> 1344 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), '])')"/> 1345 </xsl:when> 1346 <xsl:otherwise> 1347 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), $current-range)"/> 1348 </xsl:otherwise> 1349 </xsl:choose> 1350 </xsl:with-param> 1351 </xsl:call-template> 1352 </xsl:when> 1353 <xsl:otherwise> 1354 <xsl:variable name="handle-type"> 1355 <xsl:choose> 1356 <xsl:when test="starts-with($current-range, 'R')"> 1357 <xsl:choose> 1358 <xsl:when test="contains($current-range, 'C')"> 1359 <xsl:variable name="part-type-r"> 1360 <xsl:call-template name="handle-type-number"> 1361 <xsl:with-param name="t-part" select="substring-before( substring-after($current-range, 'R'), 'C')"/> 1362 </xsl:call-template> 1363 </xsl:variable> 1364 <xsl:variable name="part-type-c"> 1365 <xsl:call-template name="handle-type-number"> 1366 <xsl:with-param name="t-part" select="substring-after($current-range, 'C')"/> 1367 </xsl:call-template> 1368 </xsl:variable> 1369 <xsl:choose> 1370 <xsl:when test="($part-type-r = 1) and ($part-type-c = 1)"> 1371 <xsl:value-of select="1"/> 1372 </xsl:when> 1373 <xsl:otherwise> 1374 <xsl:value-of select="4"/> 1375 </xsl:otherwise> 1376 </xsl:choose> 1377 </xsl:when> 1378 <xsl:otherwise> 1379 <xsl:variable name="part-type"> 1380 <xsl:call-template name="handle-type-number"> 1381 <xsl:with-param name="t-part" select="substring-after($current-range, 'R')"/> 1382 </xsl:call-template> 1383 </xsl:variable> 1384 <xsl:choose> 1385 <xsl:when test="$part-type = 1"> 1386 <xsl:value-of select="2"/> 1387 </xsl:when> 1388 <xsl:when test="$part-type = 2"> 1389 <xsl:value-of select="4"/> 1390 </xsl:when> 1391 <xsl:otherwise> 1392 <xsl:value-of select="4"/> 1393 </xsl:otherwise> 1394 </xsl:choose> 1395 </xsl:otherwise> 1396 </xsl:choose> 1397 </xsl:when> 1398 <xsl:when test="starts-with($current-range, 'C')"> 1399 <xsl:variable name="part-type"> 1400 <xsl:call-template name="handle-type-number"> 1401 <xsl:with-param name="t-part" select="substring-after($current-range, 'C')"/> 1402 </xsl:call-template> 1403 </xsl:variable> 1404 <xsl:choose> 1405 <xsl:when test="$part-type = 1"> 1406 <xsl:value-of select="3"/> 1407 </xsl:when> 1408 <xsl:when test="$part-type = 2"> 1409 <xsl:value-of select="4"/> 1410 </xsl:when> 1411 <xsl:otherwise> 1412 <xsl:value-of select="4"/> 1413 </xsl:otherwise> 1414 </xsl:choose> 1415 </xsl:when> 1416 <xsl:otherwise> 1417 <xsl:value-of select="4"/> 1418 </xsl:otherwise> 1419 </xsl:choose> 1420 </xsl:variable> 1421 <xsl:choose> 1422 <xsl:when test="$handle-type = 1"> 1423 <xsl:variable name="after-R"> 1424 <xsl:value-of select="substring(substring-after($current-range,'R'),1,1)"/> 1425 </xsl:variable> 1426 <xsl:choose> 1427 <xsl:when test="$after-R='C' or $after-R='[' or $after-R='0' or $after-R='1' or $after-R='2' or $after-R='3' or $after-R='4' or $after-R='5' or $after-R='6' or $after-R='7' or $after-R='8' or $after-R='9'"> 1428 <xsl:variable name="row-pos"> 1429 <xsl:choose> 1430 <xsl:when test="$after-R='['"> 1431 <xsl:value-of select="$cell-row-pos+substring-before( substring-after($current-range,'R['),']')"/> 1432 </xsl:when> 1433 <xsl:when test="$after-R='C'"> 1434 <xsl:value-of select="$cell-row-pos"/> 1435 </xsl:when> 1436 <xsl:otherwise> 1437 <xsl:value-of select="substring-before(substring-after($current-range,'R'),'C')"/> 1438 </xsl:otherwise> 1439 </xsl:choose> 1440 </xsl:variable> 1441 <xsl:variable name="row-pos-style"> 1442 <xsl:choose> 1443 <xsl:when test="$after-R='[' or $after-R='C'">relative</xsl:when> 1444 <xsl:otherwise>absolute</xsl:otherwise> 1445 </xsl:choose> 1446 </xsl:variable> 1447 <xsl:variable name="after-C"> 1448 <xsl:value-of select="substring(substring-after(substring-after($current-range,'R'),'C'),1,1)"/> 1449 </xsl:variable> 1450 <xsl:variable name="column-digit-length"> 1451 <xsl:choose> 1452 <xsl:when test="$after-C='0' or $after-C='1' or $after-C='2' or $after-C='3' or $after-C='4' or $after-C='5' or $after-C='6' or $after-C='7' or $after-C='8' or $after-C='9'"> 1453 <xsl:call-template name="get-digit-length"> 1454 <xsl:with-param name="complexive-string" select="substring-after(substring-after($current-range,'R'),'C')"/> 1455 </xsl:call-template> 1456 </xsl:when> 1457 </xsl:choose> 1458 </xsl:variable> 1459 <xsl:variable name="column-pos"> 1460 <xsl:choose> 1461 <xsl:when test="$after-C='['"> 1462 <xsl:value-of select="$cell-column-pos + substring-before(substring-after(substring-after($current-range,'R'),'C['),']')"/> 1463 </xsl:when> 1464 <xsl:when test="$after-C='0' or $after-C='1' or $after-C='2' or $after-C='3' or $after-C='4' or $after-C='5' or $after-C='6' or $after-C='7' or $after-C='8' or $after-C='9'"> 1465 <xsl:value-of select="substring(substring-after(substring-after($current-range,'R'),'C'),1,$column-digit-length)"/> 1466 </xsl:when> 1467 <xsl:otherwise> 1468 <xsl:value-of select="$cell-column-pos"/> 1469 </xsl:otherwise> 1470 </xsl:choose> 1471 </xsl:variable> 1472 <xsl:variable name="column-pos-style"> 1473 <xsl:choose> 1474 <xsl:when test="$after-C='0' or $after-C='1' or $after-C='2' or $after-C='3' or $after-C='4' or $after-C='5' or $after-C='6' or $after-C='7' or $after-C='8' or $after-C='9'">absolute</xsl:when> 1475 <xsl:otherwise>relative</xsl:otherwise> 1476 </xsl:choose> 1477 </xsl:variable> 1478 <xsl:variable name="trans-unit"> 1479 <xsl:call-template name="translate-unit"> 1480 <xsl:with-param name="column-number" select="$column-pos"/> 1481 <xsl:with-param name="row-number" select="$row-pos"/> 1482 <xsl:with-param name="column-pos-style" select="$column-pos-style"/> 1483 <xsl:with-param name="row-pos-style" select="$row-pos-style"/> 1484 </xsl:call-template> 1485 </xsl:variable> 1486 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), $trans-unit)"/> 1487 <xsl:call-template name="translate-expression"> 1488 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1489 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1490 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1491 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1492 </xsl:call-template> 1493 </xsl:when> 1494 <xsl:otherwise> 1495 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), translate( substring-before(substring-after($expression, '('),'R'),',!', ';.'))"/> 1496 <xsl:call-template name="translate-expression"> 1497 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1498 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1499 <xsl:with-param name="expression" select="substring-after($current-range,'R')"/> 1500 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1501 </xsl:call-template> 1502 </xsl:otherwise> 1503 </xsl:choose> 1504 </xsl:when> 1505 <xsl:when test="$handle-type = 2"> 1506 <xsl:variable name="after-R"> 1507 <xsl:value-of select="substring(substring-after($current-range,'R'),1,1)"/> 1508 </xsl:variable> 1509 <xsl:choose> 1510 <xsl:when test="$after-R='[' or $after-R='0' or $after-R='1' or $after-R='2' or $after-R='3' or $after-R='4' or $after-R='5' or $after-R='6' or $after-R='7' or $after-R='8' or $after-R='9'"> 1511 <xsl:variable name="row-number"> 1512 <xsl:choose> 1513 <xsl:when test="$after-R = '['"> 1514 <xsl:value-of select="substring-before(substring-after($current-range, 'R['), ']')"/> 1515 </xsl:when> 1516 <xsl:otherwise> 1517 <xsl:value-of select="substring-after($current-range, 'R')"/> 1518 </xsl:otherwise> 1519 </xsl:choose> 1520 </xsl:variable> 1521 <xsl:variable name="row-pos"> 1522 <xsl:choose> 1523 <xsl:when test="$after-R='['"> 1524 <xsl:value-of select="$cell-row-pos + $row-number"/> 1525 </xsl:when> 1526 <xsl:when test="$after-R='0' or $after-R='1' or $after-R='2' or $after-R='3' or $after-R='4' or $after-R='5' or $after-R='6' or $after-R='7' or $after-R='8' or $after-R='9'"> 1527 <xsl:value-of select="$row-number"/> 1528 </xsl:when> 1529 <xsl:otherwise> 1530 <xsl:value-of select="$cell-row-pos"/> 1531 </xsl:otherwise> 1532 </xsl:choose> 1533 </xsl:variable> 1534 <xsl:variable name="trans-unit1"> 1535 <xsl:call-template name="translate-unit"> 1536 <xsl:with-param name="column-number" select="1"/> 1537 <xsl:with-param name="row-number" select="$row-pos"/> 1538 <xsl:with-param name="column-pos-style" select="'relative'"/> 1539 <xsl:with-param name="row-pos-style" select="'relative'"/> 1540 </xsl:call-template> 1541 </xsl:variable> 1542 <xsl:variable name="trans-unit2"> 1543 <xsl:call-template name="translate-unit"> 1544 <xsl:with-param name="column-number" select="256"/> 1545 <xsl:with-param name="row-number" select="$row-pos"/> 1546 <xsl:with-param name="column-pos-style" select="'relative'"/> 1547 <xsl:with-param name="row-pos-style" select="'relative'"/> 1548 </xsl:call-template> 1549 </xsl:variable> 1550 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), $trans-unit1, ':', $trans-unit2)"/> 1551 <xsl:call-template name="translate-expression"> 1552 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1553 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1554 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1555 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1556 </xsl:call-template> 1557 </xsl:when> 1558 <xsl:otherwise> 1559 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), translate( substring-before($current-range,'R'),',!', ';.'),'R')"/> 1560 <xsl:call-template name="translate-expression"> 1561 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1562 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1563 <xsl:with-param name="expression" select="substring-after($current-range,'R')"/> 1564 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1565 </xsl:call-template> 1566 </xsl:otherwise> 1567 </xsl:choose> 1568 </xsl:when> 1569 <xsl:when test="$handle-type = 3"> 1570 <xsl:variable name="after-C"> 1571 <xsl:value-of select="substring(substring-after($current-range,'C'),1,1)"/> 1572 </xsl:variable> 1573 <xsl:choose> 1574 <xsl:when test="$after-C='[' or $after-C='0' or $after-C='1' or $after-C='2' or $after-C='3' or $after-C='4' or $after-C='5' or $after-C='6' or $after-C='7' or $after-C='8' or $after-C='9'"> 1575 <xsl:variable name="column-number"> 1576 <xsl:choose> 1577 <xsl:when test="$after-C = '['"> 1578 <xsl:value-of select="substring-before(substring-after($current-range, 'C['), ']')"/> 1579 </xsl:when> 1580 <xsl:otherwise> 1581 <xsl:value-of select="substring-after($current-range, 'C')"/> 1582 </xsl:otherwise> 1583 </xsl:choose> 1584 </xsl:variable> 1585 <xsl:variable name="column-pos"> 1586 <xsl:choose> 1587 <xsl:when test="$after-C='['"> 1588 <xsl:value-of select="$cell-column-pos + $column-number"/> 1589 </xsl:when> 1590 <xsl:when test="$after-C='0' or $after-C='1' or $after-C='2' or $after-C='3' or $after-C='4' or $after-C='5' or $after-C='6' or $after-C='7' or $after-C='8' or $after-C='9'"> 1591 <xsl:value-of select="$column-number"/> 1592 </xsl:when> 1593 <xsl:otherwise> 1594 <xsl:value-of select="$cell-column-pos"/> 1595 </xsl:otherwise> 1596 </xsl:choose> 1597 </xsl:variable> 1598 <xsl:variable name="trans-unit1"> 1599 <xsl:call-template name="translate-unit"> 1600 <xsl:with-param name="column-number" select="$column-pos"/> 1601 <xsl:with-param name="row-number" select="1"/> 1602 <xsl:with-param name="column-pos-style" select="'relative'"/> 1603 <xsl:with-param name="row-pos-style" select="'relative'"/> 1604 </xsl:call-template> 1605 </xsl:variable> 1606 <xsl:variable name="trans-unit2"> 1607 <xsl:call-template name="translate-unit"> 1608 <xsl:with-param name="column-number" select="$column-pos"/> 1609 <xsl:with-param name="row-number" select="32000"/> 1610 <xsl:with-param name="column-pos-style" select="'relative'"/> 1611 <xsl:with-param name="row-pos-style" select="'relative'"/> 1612 </xsl:call-template> 1613 </xsl:variable> 1614 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), $trans-unit1, ':', $trans-unit2)"/> 1615 <xsl:call-template name="translate-expression"> 1616 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1617 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1618 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1619 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1620 </xsl:call-template> 1621 </xsl:when> 1622 <xsl:otherwise> 1623 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), translate( substring-before($current-range,'C'),',!', ';.'),'C')"/> 1624 <xsl:call-template name="translate-expression"> 1625 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1626 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1627 <xsl:with-param name="expression" select="substring-after($current-range,'C')"/> 1628 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1629 </xsl:call-template> 1630 </xsl:otherwise> 1631 </xsl:choose> 1632 </xsl:when> 1633 <xsl:otherwise> 1634 <xsl:variable name="next-pit" select="substring-after($expression, $current-range)"/> 1635 <xsl:choose> 1636 <xsl:when test="contains($next-pit, '+') or contains($next-pit, '-') or contains($next-pit, '*') or contains($next-pit, '/') or contains($next-pit, ')') or contains($next-pit, '^') or contains($next-pit, ':') or contains($next-pit, '"') or contains($next-pit, ';') or contains($next-pit, ',') or contains($next-pit, '[')"> 1637 <xsl:call-template name="translate-expression"> 1638 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1639 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1640 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1641 <xsl:with-param name="return-value" select="concat($return-value, substring-before($expression, $current-range), $current-range)"/> 1642 </xsl:call-template> 1643 </xsl:when> 1644 <xsl:otherwise> 1645 <xsl:value-of select="translate( concat($return-value, substring-before($expression, $current-range), $current-range),',!', ';.')"/> 1646 </xsl:otherwise> 1647 </xsl:choose> 1648 </xsl:otherwise> 1649 </xsl:choose> 1650 </xsl:otherwise> 1651 </xsl:choose> 1652 </xsl:template> 1653 <xsl:template name="parse-range-name"> 1654 <xsl:param name="expression"/> 1655 <xsl:param name="return-value"/> 1656 <xsl:variable name="first-one" select="substring($expression,1,1)"/> 1657 <xsl:choose> 1658 <xsl:when test="$first-one = '='"> 1659 <xsl:choose> 1660 <xsl:when test="string-length(normalize-space($return-value)) > 0"> 1661 <xsl:value-of select="concat('2', $return-value)"/> 1662 </xsl:when> 1663 <xsl:otherwise> 1664 <xsl:text>1=</xsl:text> 1665 </xsl:otherwise> 1666 </xsl:choose> 1667 </xsl:when> 1668 <xsl:when test="$first-one='(' or $first-one='!' or $first-one='&'"> 1669 <xsl:value-of select="concat('1', $return-value, $first-one)"/> 1670 </xsl:when> 1671 <xsl:when test="$first-one='['"> 1672 <xsl:choose> 1673 <xsl:when test="starts-with(substring-after($expression, ']'), 'C')"> 1674 <xsl:call-template name="parse-range-name"> 1675 <xsl:with-param name="expression" select="substring-after($expression, ']')"/> 1676 <xsl:with-param name="return-value" select="concat($return-value, substring-before($expression, ']'), ']')"/> 1677 </xsl:call-template> 1678 </xsl:when> 1679 <xsl:when test="contains(substring-before($expression, ']'), '.') and contains(substring-after($expression, ']'), '!')"> 1680 <xsl:value-of select="concat('1', "'", substring-before(substring-after($expression, '['), ']'), "'", '#$', substring-before(substring-after($expression, ']'), '!'))"/> 1681 </xsl:when> 1682 <xsl:otherwise> 1683 <xsl:value-of select="concat('2', $return-value, substring-before($expression, ']'), ']')"/> 1684 </xsl:otherwise> 1685 </xsl:choose> 1686 </xsl:when> 1687 <xsl:when test="$first-one='"'"> 1688 <xsl:value-of select="concat('1', $first-one, substring-before(substring-after($expression, '"'), '"'), '"')"/> 1689 </xsl:when> 1690 <xsl:when test="$first-one="'""> 1691 <xsl:variable name="str-in" select="substring-before(substring-after($expression, "'"), "'")"/> 1692 <xsl:choose> 1693 <xsl:when test="contains($str-in, '\') and contains($str-in, '[') and contains($str-in, ']')"> 1694 <xsl:variable name="first-pos" select="substring-before($str-in, '[')"/> 1695 <xsl:variable name="second-pos" select="substring-before(substring-after($str-in, '['), ']')"/> 1696 <xsl:variable name="third-pos" select="substring-after($str-in, ']')"/> 1697 <xsl:value-of select="concat('1', "'", $first-pos, $second-pos, "'", '#$', $third-pos)"/> 1698 </xsl:when> 1699 <xsl:otherwise> 1700 <xsl:value-of select="concat('1', "'", $str-in, "'")"/> 1701 </xsl:otherwise> 1702 </xsl:choose> 1703 </xsl:when> 1704 <xsl:when test="$first-one='+' or $first-one='-' or $first-one='*' or $first-one='/' or $first-one=')' or $first-one='^' or $first-one=':' or $first-one='"' or $first-one=';' or $first-one=',' or $first-one='>' or $first-one='<'"> 1705 <xsl:choose> 1706 <xsl:when test="$return-value = ''"> 1707 <xsl:value-of select="concat('1', $first-one)"/> 1708 </xsl:when> 1709 <xsl:otherwise> 1710 <xsl:value-of select="concat('2', $return-value)"/> 1711 </xsl:otherwise> 1712 </xsl:choose> 1713 </xsl:when> 1714 <xsl:otherwise> 1715 <xsl:choose> 1716 <xsl:when test="$expression = ''"> 1717 <xsl:value-of select="concat('2', $return-value)"/> 1718 </xsl:when> 1719 <xsl:otherwise> 1720 <xsl:call-template name="parse-range-name"> 1721 <xsl:with-param name="expression" select="substring($expression, 2, string-length($expression)-1)"/> 1722 <xsl:with-param name="return-value" select="concat($return-value, substring($expression, 1, 1))"/> 1723 </xsl:call-template> 1724 </xsl:otherwise> 1725 </xsl:choose> 1726 </xsl:otherwise> 1727 </xsl:choose> 1728 </xsl:template> 1729 <xsl:template name="handle-type-number"> 1730 <xsl:param name="t-part"/> 1731 <xsl:choose> 1732 <xsl:when test="starts-with($t-part, '[')"> 1733 <xsl:variable name="tt-str" select="substring-before( substring-after( $t-part, '['), ']')"/> 1734 <xsl:choose> 1735 <xsl:when test="($tt-str < 0) or ($tt-str > 0) or ($tt-str = 0)"> 1736 <xsl:value-of select="1"/> 1737 </xsl:when> 1738 <xsl:otherwise> 1739 <xsl:value-of select="2"/> 1740 </xsl:otherwise> 1741 </xsl:choose> 1742 </xsl:when> 1743 <xsl:when test="($t-part < 0) or ($t-part > 0) or ($t-part = 0)"> 1744 <xsl:value-of select="1"/> 1745 </xsl:when> 1746 <xsl:when test="$t-part = ''"> 1747 <xsl:value-of select="1"/> 1748 </xsl:when> 1749 <xsl:otherwise> 1750 <xsl:value-of select="2"/> 1751 </xsl:otherwise> 1752 </xsl:choose> 1753 </xsl:template> 1754 <xsl:template name="translate-unit"> 1755 <xsl:param name="column-number"/> 1756 <xsl:param name="row-number"/> 1757 <xsl:param name="column-pos-style"/> 1758 <xsl:param name="row-pos-style"/> 1759 <xsl:variable name="column-number1"> 1760 <xsl:value-of select="floor( $column-number div 26 )"/> 1761 </xsl:variable> 1762 <xsl:variable name="column-number2"> 1763 <xsl:value-of select="$column-number mod 26"/> 1764 </xsl:variable> 1765 <xsl:variable name="column-character1"> 1766 <xsl:call-template name="number-to-character"> 1767 <xsl:with-param name="number" select="$column-number1"/> 1768 </xsl:call-template> 1769 </xsl:variable> 1770 <xsl:variable name="column-character2"> 1771 <xsl:call-template name="number-to-character"> 1772 <xsl:with-param name="number" select="$column-number2"/> 1773 </xsl:call-template> 1774 </xsl:variable> 1775 <xsl:choose> 1776 <xsl:when test="$column-pos-style = 'absolute'"> 1777 <xsl:value-of select="concat( '$', $column-character1, $column-character2)"/> 1778 </xsl:when> 1779 <xsl:otherwise> 1780 <xsl:value-of select="concat( $column-character1, $column-character2)"/> 1781 </xsl:otherwise> 1782 </xsl:choose> 1783 <xsl:choose> 1784 <xsl:when test="$row-pos-style ='absolute'"> 1785 <xsl:value-of select="concat( '$', $row-number)"/> 1786 </xsl:when> 1787 <xsl:otherwise> 1788 <xsl:value-of select="$row-number"/> 1789 </xsl:otherwise> 1790 </xsl:choose> 1791 </xsl:template> 1792 <xsl:template name="number-to-character"> 1793 <xsl:param name="number"/> 1794 <xsl:choose> 1795 <xsl:when test="$number = 0"/> 1796 <xsl:when test="$number = 1">A</xsl:when> 1797 <xsl:when test="$number = 2">B</xsl:when> 1798 <xsl:when test="$number = 3">C</xsl:when> 1799 <xsl:when test="$number = 4">D</xsl:when> 1800 <xsl:when test="$number = 5">E</xsl:when> 1801 <xsl:when test="$number = 6">F</xsl:when> 1802 <xsl:when test="$number = 7">G</xsl:when> 1803 <xsl:when test="$number = 8">H</xsl:when> 1804 <xsl:when test="$number = 9">I</xsl:when> 1805 <xsl:when test="$number = 10">J</xsl:when> 1806 <xsl:when test="$number = 11">K</xsl:when> 1807 <xsl:when test="$number = 12">L</xsl:when> 1808 <xsl:when test="$number = 13">M</xsl:when> 1809 <xsl:when test="$number = 14">N</xsl:when> 1810 <xsl:when test="$number = 15">O</xsl:when> 1811 <xsl:when test="$number = 16">P</xsl:when> 1812 <xsl:when test="$number = 17">Q</xsl:when> 1813 <xsl:when test="$number = 18">R</xsl:when> 1814 <xsl:when test="$number = 19">S</xsl:when> 1815 <xsl:when test="$number = 20">T</xsl:when> 1816 <xsl:when test="$number = 21">U</xsl:when> 1817 <xsl:when test="$number = 22">V</xsl:when> 1818 <xsl:when test="$number = 23">W</xsl:when> 1819 <xsl:when test="$number = 24">X</xsl:when> 1820 <xsl:when test="$number = 25">Y</xsl:when> 1821 <xsl:when test="$number = 26">Z</xsl:when> 1822 <xsl:otherwise/> 1823 </xsl:choose> 1824 </xsl:template> 1825 <xsl:template name="get-digit-length"> 1826 <xsl:param name="complexive-string"/> 1827 <xsl:variable name="first-char"> 1828 <xsl:value-of select="substring( $complexive-string, 1, 1)"/> 1829 </xsl:variable> 1830 <xsl:choose> 1831 <xsl:when test="$first-char = '1' or $first-char = '2' or $first-char = '3' or $first-char = '4' or $first-char = '5' or $first-char = '6' or $first-char = '7' or $first-char = '8' or $first-char = '9' or $first-char = '0' "> 1832 <xsl:variable name="temp"> 1833 <xsl:call-template name="get-digit-length"> 1834 <xsl:with-param name="complexive-string" select="substring( $complexive-string, 2)"/> 1835 </xsl:call-template> 1836 </xsl:variable> 1837 <xsl:value-of select="$temp+1"/> 1838 </xsl:when> 1839 <xsl:otherwise>0</xsl:otherwise> 1840 </xsl:choose> 1841 </xsl:template> 1842 <xsl:template match="字:句属性" mode="style"> 1843 <!--chengxz 0725--> 1844 <xsl:if test="not(@字:式样引用)"> 1845 <xsl:element name="style:style"> 1846 <xsl:attribute name="style:name">T<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句属性" format="1"/></xsl:attribute> 1847 <xsl:attribute name="style:family">text</xsl:attribute> 1848 <xsl:if test="@字:式样引用"> 1849 <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:式样引用"/></xsl:attribute> 1850 </xsl:if> 1851 <xsl:element name="style:text-properties"> 1852 <xsl:apply-templates select="./*"/> 1853 </xsl:element> 1854 </xsl:element> 1855 </xsl:if> 1856 </xsl:template> 1857 <xsl:template name="style-style-content"> 1858 <xsl:variable name="style-name" select="@表:标识符"/> 1859 <xsl:variable name="apply-style-name" select="@表:名称"/> 1860 <xsl:attribute name="style:family"><xsl:choose><xsl:when test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]">table-column</xsl:when><xsl:otherwise>table-cell</xsl:otherwise></xsl:choose></xsl:attribute> 1861 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]/@表:列宽"> 1862 <xsl:element name="style:table-column-properties"> 1863 <xsl:attribute name="style:column-width"><xsl:value-of select="concat(/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]/@表:列宽,$uofUnit)"/></xsl:attribute> 1864 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]/@表:跨度"> 1865 <xsl:attribute name="fo:break-before">auto</xsl:attribute> 1866 </xsl:if> 1867 <xsl:for-each select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]"> 1868 <xsl:if test="preceding-sibling::表:列[1]/@表:跨度 and ancestor::表:工作表/表:分页符集/表:分页符/@表:列号"> 1869 <xsl:variable name="kuadu"> 1870 <xsl:value-of select="preceding-sibling::表:列[1]/@表:跨度"/> 1871 </xsl:variable> 1872 <xsl:if test="not($kuadu='1')"> 1873 <xsl:attribute name="fo:break-before">page</xsl:attribute> 1874 </xsl:if> 1875 <xsl:if test="$kuadu='1' and not(preceding::表:列[2])"> 1876 <xsl:attribute name="fo:break-before">page</xsl:attribute> 1877 </xsl:if> 1878 </xsl:if> 1879 </xsl:for-each> 1880 </xsl:element> 1881 </xsl:if> 1882 <xsl:element name="style:table-cell-properties"> 1883 <xsl:if test="表:对齐格式"> 1884 <xsl:if test="表:对齐格式/表:垂直对齐方式"> 1885 <xsl:variable name="vertical-align"> 1886 <xsl:choose> 1887 <xsl:when test="表:对齐格式/表:垂直对齐方式 = 'top'">top</xsl:when> 1888 <xsl:when test="表:对齐格式/表:垂直对齐方式 = 'center'">center</xsl:when> 1889 <xsl:when test="表:对齐格式/表:垂直对齐方式 = 'bottom'">bottom</xsl:when> 1890 <xsl:otherwise>middle</xsl:otherwise> 1891 </xsl:choose> 1892 </xsl:variable> 1893 <xsl:attribute name="style:vertical-align"><xsl:value-of select="$vertical-align"/></xsl:attribute> 1894 </xsl:if> 1895 <xsl:if test="表:对齐格式/表:自动换行/@表:值 = 'true'"> 1896 <xsl:attribute name="fo:wrap-option">wrap</xsl:attribute> 1897 </xsl:if> 1898 <xsl:if test="表:对齐格式/表:缩进"> 1899 <xsl:attribute name="fo:padding-left"><xsl:variable name="indent" select="表:对齐格式/表:缩进 * 10"/><xsl:call-template name="convert2cm"><xsl:with-param name="value" select="concat($indent,'pt')"/></xsl:call-template><xsl:text>cm</xsl:text></xsl:attribute> 1900 </xsl:if> 1901 <xsl:if test="表:对齐格式/表:文字旋转角度"> 1902 <xsl:attribute name="style:rotation-angle"><xsl:choose><xsl:when test="表:对齐格式/表:文字旋转角度 < 0"><xsl:value-of select="360 - 表:对齐格式/表:文字旋转角度"/></xsl:when><xsl:otherwise><xsl:value-of select="表:对齐格式/表:文字旋转角度"/></xsl:otherwise></xsl:choose></xsl:attribute> 1903 <xsl:attribute name="style:rotation-align">none</xsl:attribute> 1904 </xsl:if> 1905 <xsl:if test="表:对齐格式/表:文字方向 = 'vertical'"> 1906 <xsl:attribute name="style:direction">ttb</xsl:attribute> 1907 <xsl:if test="not(表:对齐格式/字:水平对齐方式)"> 1908 <xsl:attribute name="style:text-align-source">fix</xsl:attribute> 1909 </xsl:if> 1910 </xsl:if> 1911 </xsl:if> 1912 <!--xsl:if test="表:边框"> 1913 <xsl:apply-templates select="表:边框" /> 1914 </xsl:if--> 1915 <!--chenjh add 边框 again--> 1916 <xsl:if test="表:边框/uof:上/@uof:宽度 !=''"> 1917 <xsl:variable name="top-line-width" select="concat(表:边框/uof:上/@uof:宽度,$uofUnit)"/> 1918 <xsl:variable name="top-line-tyle"> 1919 <xsl:choose> 1920 <xsl:when test="表:边框/uof:上/@uof:类型='single'">solid</xsl:when> 1921 <xsl:when test="表:边框/uof:上/@uof:类型='double'">double</xsl:when> 1922 </xsl:choose> 1923 </xsl:variable> 1924 <xsl:variable name="top-line-color" select="表:边框/uof:上/@uof:颜色"/> 1925 <xsl:variable name="border-top" select="concat($top-line-width,' ',$top-line-tyle,' ',$top-line-color)"/> 1926 <xsl:attribute name="fo:border-top"><xsl:value-of select="$border-top"/></xsl:attribute> 1927 </xsl:if> 1928 <xsl:if test="表:边框/uof:下/@uof:宽度 !=''"> 1929 <xsl:variable name="bottom-line-width" select="concat(表:边框/uof:下/@uof:宽度,$uofUnit)"/> 1930 <xsl:variable name="bottom-line-tyle"> 1931 <xsl:choose> 1932 <xsl:when test="表:边框/uof:下/@uof:类型='single'">solid</xsl:when> 1933 <xsl:when test="表:边框/uof:下/@uof:类型='double'">double</xsl:when> 1934 </xsl:choose> 1935 </xsl:variable> 1936 <xsl:variable name="bottom-line-color" select="表:边框/uof:下/@uof:颜色"/> 1937 <xsl:variable name="border-bottom" select="concat($bottom-line-width,' ',$bottom-line-tyle,' ',$bottom-line-color)"/> 1938 <xsl:attribute name="fo:border-bottom"><xsl:value-of select="$border-bottom"/></xsl:attribute> 1939 </xsl:if> 1940 <xsl:if test="表:边框/uof:左/@uof:宽度 !=''"> 1941 <xsl:variable name="left-line-width" select="concat(表:边框/uof:左/@uof:宽度,$uofUnit)"/> 1942 <xsl:variable name="left-line-tyle"> 1943 <xsl:choose> 1944 <xsl:when test="表:边框/uof:左/@uof:类型='single'">solid</xsl:when> 1945 <xsl:when test="表:边框/uof:左/@uof:类型='double'">double</xsl:when> 1946 </xsl:choose> 1947 </xsl:variable> 1948 <xsl:variable name="left-line-color" select="表:边框/uof:左/@uof:颜色"/> 1949 <xsl:variable name="border-left" select="concat($left-line-width,' ',$left-line-tyle,' ',$left-line-color)"/> 1950 <xsl:attribute name="fo:border-left"><xsl:value-of select="$border-left"/></xsl:attribute> 1951 </xsl:if> 1952 <xsl:if test="表:边框/uof:右/@uof:宽度 !=''"> 1953 <xsl:variable name="right-line-width" select="concat(表:边框/uof:右/@uof:宽度,$uofUnit)"/> 1954 <xsl:variable name="right-line-tyle"> 1955 <xsl:choose> 1956 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 1957 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 1958 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 1959 <xsl:otherwise>solid</xsl:otherwise> 1960 </xsl:choose> 1961 </xsl:variable> 1962 <xsl:variable name="right-line-color" select="表:边框/uof:右/@uof:颜色"/> 1963 <xsl:variable name="border-right" select="concat($right-line-width,' ',$right-line-tyle,' ',$right-line-color)"/> 1964 <xsl:attribute name="fo:border-right"><xsl:value-of select="$border-right"/></xsl:attribute> 1965 </xsl:if> 1966 <xsl:if test="表:边框/uof:对角线1/@uof:宽度 !=''"> 1967 <xsl:variable name="diagonal-lr-width" select="concat(表:边框/uof:对角线1/@uof:宽度,$uofUnit)"/> 1968 <xsl:variable name="diagonal-lr-tyle"> 1969 <xsl:choose> 1970 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'none'">none</xsl:when> 1971 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'continuous'">solid</xsl:when> 1972 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'double'">double</xsl:when> 1973 <xsl:otherwise>solid</xsl:otherwise> 1974 </xsl:choose> 1975 </xsl:variable> 1976 <xsl:variable name="diagonal-lr-color" select="表:边框/uof:对角线1/@uof:颜色"/> 1977 <xsl:variable name="border-diagonal" select="concat($diagonal-lr-width,' ',$diagonal-lr-tyle,' ',$diagonal-lr-color)"/> 1978 <xsl:attribute name="style:diagonal-bl-tr"><xsl:value-of select="$border-diagonal"/></xsl:attribute> 1979 </xsl:if> 1980 <xsl:if test="表:边框/uof:对角线2/@uof:宽度 !=''"> 1981 <xsl:variable name="diagonal-rl-width" select="concat(表:边框/uof:对角线2/@uof:宽度,$uofUnit)"/> 1982 <xsl:variable name="diagonal-rl-tyle"> 1983 <xsl:choose> 1984 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'none'">none</xsl:when> 1985 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'continuous'">solid</xsl:when> 1986 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'double'">double</xsl:when> 1987 <xsl:otherwise>solid</xsl:otherwise> 1988 </xsl:choose> 1989 </xsl:variable> 1990 <xsl:variable name="diagonal-rl-color" select="表:边框/uof:对角线2/@uof:颜色"/> 1991 <xsl:variable name="border-diagonal" select="concat($diagonal-rl-width,' ',$diagonal-rl-tyle,' ',$diagonal-rl-color)"/> 1992 <xsl:attribute name="style:diagonal-tl-br"><xsl:value-of select="$border-diagonal"/></xsl:attribute> 1993 </xsl:if> 1994 <xsl:if test="表:边框/*/@uof:阴影"> 1995 <xsl:choose> 1996 <xsl:when test="表:边框/uof:下/@uof:阴影 and 表:边框/uof:右/@uof:阴影"> 1997 <xsl:attribute name="style:shadow">#808080 0.18cm 0.18cm</xsl:attribute> 1998 </xsl:when> 1999 <xsl:when test="表:边框/uof:下/@uof:阴影 and 表:边框/uof:左/@uof:阴影"> 2000 <xsl:attribute name="style:shadow">#808080 -0.18cm 0.18cm</xsl:attribute> 2001 </xsl:when> 2002 <xsl:when test="表:边框/uof:上/@uof:阴影 and 表:边框/uof:右/@uof:阴影"> 2003 <xsl:attribute name="style:shadow">#808080 0.18cm -0.18cm</xsl:attribute> 2004 </xsl:when> 2005 <xsl:when test="表:边框/uof:上/@uof:阴影 and 表:边框/uof:左/@uof:阴影"> 2006 <xsl:attribute name="style:shadow">#808080 -0.18cm -0.18cm</xsl:attribute> 2007 </xsl:when> 2008 </xsl:choose> 2009 </xsl:if> 2010 <!--边框 end --> 2011 <xsl:if test="表:填充"> 2012 <xsl:choose> 2013 <xsl:when test="表:填充/图:颜色"> 2014 <xsl:attribute name="fo:background-color"><xsl:value-of select="表:填充/图:颜色"/></xsl:attribute> 2015 </xsl:when> 2016 <xsl:otherwise> 2017 <xsl:if test="表:填充/图:图案/@图:前景色"> 2018 <xsl:variable name="pattern-value"> 2019 <xsl:call-template name="cell-pattern-color"> 2020 <xsl:with-param name="pattern" select="concat('0.',substring-after(表:填充/图:图案/图:背景色,'y'))"/> 2021 <xsl:with-param name="color-value" select="表:填充/图:颜色"/> 2022 <xsl:with-param name="pattern-color-value" select="表:填充/图:图案/图:背景色"/> 2023 </xsl:call-template> 2024 </xsl:variable> 2025 <xsl:attribute name="fo:background-color"><xsl:value-of select="$pattern-value"/></xsl:attribute> 2026 </xsl:if> 2027 </xsl:otherwise> 2028 </xsl:choose> 2029 </xsl:if> 2030 <xsl:if test="表:字体格式/字:隐藏文字"> 2031 <xsl:choose> 2032 <xsl:when test="表:字体格式/字:隐藏文字 = 'true'"> 2033 <xsl:attribute name="style:cell-protect">protected formula-hidden</xsl:attribute> 2034 </xsl:when> 2035 <xsl:otherwise> 2036 <xsl:attribute name="style:cell-protect">none</xsl:attribute> 2037 </xsl:otherwise> 2038 </xsl:choose> 2039 </xsl:if> 2040 <xsl:attribute name="style:cell-protect">none</xsl:attribute> 2041 <xsl:attribute name="style:text-align-source">fix</xsl:attribute> 2042 </xsl:element> 2043 <xsl:element name="style:paragraph-properties"> 2044 <xsl:if test="表:对齐格式/表:水平对齐方式"> 2045 <xsl:variable name="text-align"> 2046 <xsl:choose> 2047 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'left'">start</xsl:when> 2048 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'center'">center</xsl:when> 2049 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'right'">end</xsl:when> 2050 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'justify'">justify</xsl:when> 2051 <xsl:otherwise>start</xsl:otherwise> 2052 </xsl:choose> 2053 </xsl:variable> 2054 <xsl:attribute name="fo:text-align"><xsl:value-of select="$text-align"/></xsl:attribute> 2055 </xsl:if> 2056 </xsl:element> 2057 <xsl:element name="style:text-properties"> 2058 <xsl:if test="表:字体格式/字:字体"> 2059 <xsl:choose> 2060 <xsl:when test="(表:字体格式/字:字体/@字:中文字体引用)or (表:字体格式/字:字体/@字:西文字体引用)"> 2061 <xsl:variable name="fontnameZ" select="表:字体格式/字:字体/@字:中文字体引用"/> 2062 <xsl:variable name="fontnameX" select="表:字体格式/字:字体/@字:西文字体引用"/> 2063 <xsl:for-each select="/uof:UOF/uof:式样集/uof:字体集/uof:字体声明"> 2064 <xsl:if test="(./@uof:标识符 = $fontnameZ)or(./@uof:标识符 = $fontnameX)"> 2065 <xsl:attribute name="style:font-name"><xsl:value-of select="./@uof:名称"/></xsl:attribute> 2066 <xsl:attribute name="style:font-name-asian"><xsl:value-of select="./@uof:名称"/></xsl:attribute> 2067 <xsl:attribute name="style:font-name-complex"><xsl:value-of select="./@uof:名称"/></xsl:attribute> 2068 <xsl:attribute name="style:font-charset"><xsl:value-of select="./@uof:字体族"/></xsl:attribute> 2069 </xsl:if> 2070 </xsl:for-each> 2071 </xsl:when> 2072 <xsl:otherwise> 2073 <xsl:attribute name="style:font-name">Arial</xsl:attribute> 2074 </xsl:otherwise> 2075 </xsl:choose> 2076 <xsl:if test="表:字体格式/字:粗体/@字:值"> 2077 <xsl:attribute name="fo:font-weight"><xsl:choose><xsl:when test="表:字体格式/字:粗体/@字:值=1 or 表:字体格式/字:粗体/@字:值='true'">bold</xsl:when><xsl:when test="表:字体格式/字:粗体/@字:值=0 or 表:字体格式/字:粗体/@字:值='false'">normal</xsl:when></xsl:choose></xsl:attribute> 2078 <xsl:attribute name="style:font-weight-asian"><xsl:choose><xsl:when test="表:字体格式/字:粗体/@字:值=1 or 表:字体格式/字:粗体/@字:值='true'">bold</xsl:when><xsl:when test="表:字体格式/字:粗体/@字:值=0 or 表:字体格式/字:粗体/@字:值='false'">normal</xsl:when></xsl:choose></xsl:attribute> 2079 <xsl:attribute name="style:font-weight-complex"><xsl:choose><xsl:when test="表:字体格式/字:粗体/@字:值=1 or 表:字体格式/字:粗体/@字:值='true'">bold</xsl:when><xsl:when test="表:字体格式/字:粗体/@字:值=0 or 表:字体格式/字:粗体/@字:值='false'">normal</xsl:when></xsl:choose></xsl:attribute> 2080 </xsl:if> 2081 <xsl:if test="表:字体格式/字:斜体/@字:值"> 2082 <xsl:attribute name="fo:font-style"><xsl:choose><xsl:when test="表:字体格式/字:斜体/@字:值=1 or 表:字体格式/字:斜体/@字:值='true'">italic</xsl:when><xsl:when test="表:字体格式/字:斜体/@字:值=0 or 表:字体格式/字:斜体/@字:值='false'">normal</xsl:when></xsl:choose></xsl:attribute> 2083 <xsl:attribute name="style:font-style-asian"><xsl:choose><xsl:when test="表:字体格式/字:斜体/@字:值=1 or 表:字体格式/字:斜体/@字:值='true'">italic</xsl:when><xsl:when test="表:字体格式/字:斜体/@字:值=0 or 表:字体格式/字:斜体/@字:值='false'">normal</xsl:when></xsl:choose></xsl:attribute> 2084 <xsl:attribute name="style:font-style-complex"><xsl:choose><xsl:when test="表:字体格式/字:斜体/@字:值=1 or 表:字体格式/字:斜体/@字:值='true'">italic</xsl:when><xsl:when test="表:字体格式/字:斜体/@字:值=0 or 表:字体格式/字:斜体/@字:值='false'">normal</xsl:when></xsl:choose></xsl:attribute> 2085 </xsl:if> 2086 <xsl:choose> 2087 <xsl:when test="表:字体格式/字:字体/@字:颜色"> 2088 <xsl:attribute name="fo:color"><xsl:value-of select="表:字体格式/字:字体/@字:颜色"/></xsl:attribute> 2089 </xsl:when> 2090 <xsl:otherwise> 2091 <xsl:attribute name="style:use-window-font-color">true</xsl:attribute> 2092 </xsl:otherwise> 2093 </xsl:choose> 2094 <xsl:choose> 2095 <xsl:when test="表:字体格式/字:字体/@字:字号"> 2096 <xsl:attribute name="fo:font-size"><xsl:value-of select="concat( 表:字体格式/字:字体/@字:字号, 'pt')"/></xsl:attribute> 2097 <xsl:attribute name="style:font-size-asian"><xsl:value-of select="concat( 表:字体格式/字:字体/@字:字号, 'pt')"/></xsl:attribute> 2098 <xsl:attribute name="style:font-size-complex"><xsl:value-of select="concat( 表:字体格式/字:字体/@字:字号, 'pt')"/></xsl:attribute> 2099 </xsl:when> 2100 <xsl:otherwise> 2101 <xsl:attribute name="fo:font-size">12pt</xsl:attribute> 2102 <xsl:attribute name="style:font-size-asian">12pt</xsl:attribute> 2103 <xsl:attribute name="style:font-size-complex">12pt</xsl:attribute> 2104 </xsl:otherwise> 2105 </xsl:choose> 2106 <xsl:if test="表:字体格式/字:浮雕"> 2107 <xsl:variable name="aa"> 2108 <xsl:value-of select="表:字体格式/字:浮雕/@字:类型"/> 2109 </xsl:variable> 2110 <xsl:attribute name="style:font-relief"><xsl:choose><xsl:when test="$aa='emboss'">embossed</xsl:when><xsl:when test="$aa='engrave'">engraved</xsl:when></xsl:choose></xsl:attribute> 2111 </xsl:if> 2112 <xsl:if test="表:字体格式/字:阴影/@字:值 = '1' or 表:字体格式/字:阴影/@字:值 = 'true'"> 2113 <xsl:attribute name="fo:text-shadow">1pt 1pt</xsl:attribute> 2114 </xsl:if> 2115 <xsl:if test="表:字体格式/字:删除线"> 2116 <xsl:attribute name="style:text-line-through-style">solid</xsl:attribute> 2117 <xsl:choose> 2118 <xsl:when test="表:字体格式/字:删除线/@字:类型='double'"> 2119 <xsl:attribute name="style:text-line-through-type">double</xsl:attribute> 2120 </xsl:when> 2121 <xsl:when test="表:字体格式/字:删除线/@字:类型='single'"> 2122 <xsl:attribute name="style:text-underline-mode">continuous</xsl:attribute> 2123 <xsl:attribute name="style:text-line-through-mode">continuous</xsl:attribute> 2124 </xsl:when> 2125 <xsl:when test="表:字体格式/字:删除线/@字:类型='bold'"> 2126 <xsl:attribute name="style:text-line-through-width">bold</xsl:attribute> 2127 </xsl:when> 2128 <xsl:when test="表:字体格式/字:删除线/@字:类型='带/'"> 2129 <xsl:attribute name="style:text-line-through-text">/</xsl:attribute> 2130 </xsl:when> 2131 <xsl:when test="表:字体格式/字:删除线/@字:类型='带X'"> 2132 <xsl:attribute name="style:text-line-through-text">X</xsl:attribute> 2133 </xsl:when> 2134 <xsl:otherwise/> 2135 </xsl:choose> 2136 </xsl:if> 2137 <xsl:if test="表:字体格式/字:下划线"> 2138 <xsl:apply-templates select="表:字体格式/字:下划线"/> 2139 </xsl:if> 2140 </xsl:if> 2141 <xsl:if test="表:字体格式/字:着重号"> 2142 <xsl:apply-templates select="表:字体格式/字:着重号"/> 2143 </xsl:if> 2144 <xsl:if test="表:字体格式/字:空心/@字:值='true'"> 2145 <xsl:attribute name="style:text-outline">true</xsl:attribute> 2146 </xsl:if> 2147 </xsl:element> 2148 </xsl:template> 2149 <xsl:template name="单元格具体式样"> 2150 <xsl:choose> 2151 <xsl:when test="@表:类型 = 'Default'"> 2152 <xsl:element name="style:default-style"> 2153 <xsl:call-template name="style-style-content"/> 2154 </xsl:element> 2155 </xsl:when> 2156 <xsl:otherwise> 2157 <xsl:element name="style:style"> 2158 <xsl:attribute name="style:name"><xsl:value-of select="@表:标识符"/></xsl:attribute> 2159 <xsl:if test="表:数字格式/@表:格式码 = 'general'"> 2160 <xsl:attribute name="style:parent-style-name">Default</xsl:attribute> 2161 </xsl:if> 2162 <xsl:attribute name="style:parent-style-name">Default</xsl:attribute> 2163 <xsl:attribute name="style:data-style-name"><xsl:value-of select="concat( @表:标识符, 'F')"/></xsl:attribute> 2164 <!--chengxz这里要改 --> 2165 <!--xsl:attribute name="style:data-style-name"><xsl:value-of select="'N2'"/></xsl:attribute--> 2166 <xsl:call-template name="style-style-content"/> 2167 </xsl:element> 2168 </xsl:otherwise> 2169 </xsl:choose> 2170 </xsl:template> 2171 <xsl:template match="表:边框"> 2172 <!--chengxz 0622--> 2173 <xsl:if test="not(uof:下)"> 2174 <xsl:attribute name="fo:border-bottom">none</xsl:attribute> 2175 </xsl:if> 2176 <xsl:if test="not(uof:上)"> 2177 <xsl:attribute name="fo:border-top">none</xsl:attribute> 2178 </xsl:if> 2179 <xsl:if test="not(uof:左)"> 2180 <xsl:attribute name="fo:border-left">none</xsl:attribute> 2181 </xsl:if> 2182 <xsl:if test="not(uof:右)"> 2183 <xsl:attribute name="fo:border-right">none</xsl:attribute> 2184 </xsl:if> 2185 <xsl:apply-templates select="uof:对角线1"/> 2186 <xsl:apply-templates select="uof:对角线2"/> 2187 <xsl:apply-templates select="uof:上"/> 2188 <xsl:apply-templates select="uof:下"/> 2189 <xsl:apply-templates select="uof:左"/> 2190 <xsl:apply-templates select="uof:右"/> 2191 </xsl:template> 2192 <xsl:template match="uof:上"> 2193 <xsl:variable name="bordtype"> 2194 <xsl:choose> 2195 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2196 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2197 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2198 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2199 <xsl:otherwise>solid</xsl:otherwise> 2200 </xsl:choose> 2201 </xsl:variable> 2202 <xsl:attribute name="fo:border-top"><xsl:value-of select="concat(@uof:宽度 div 30,$uofUnit, ' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2203 <xsl:if test="@uof:类型 = 'double'"> 2204 <xsl:attribute name="style:border-line-width-top">0.035cm 0.035cm 0.035cm</xsl:attribute> 2205 </xsl:if> 2206 </xsl:template> 2207 <xsl:template match="uof:下"> 2208 <xsl:variable name="bordtype"> 2209 <xsl:choose> 2210 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2211 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2212 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2213 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2214 <xsl:otherwise>solid</xsl:otherwise> 2215 </xsl:choose> 2216 </xsl:variable> 2217 <xsl:attribute name="fo:border-bottom"><xsl:value-of select="concat(@uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ',@uof:颜色)"/></xsl:attribute> 2218 <xsl:if test="@uof:类型 = 'double'"> 2219 <xsl:attribute name="style:border-line-width-bottom">0.035cm 0.035cm 0.035cm</xsl:attribute> 2220 </xsl:if> 2221 </xsl:template> 2222 <xsl:template match="uof:左"> 2223 <xsl:variable name="bordtype"> 2224 <xsl:choose> 2225 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2226 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2227 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2228 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2229 <xsl:otherwise>solid</xsl:otherwise> 2230 </xsl:choose> 2231 </xsl:variable> 2232 <xsl:attribute name="fo:border-left"><xsl:value-of select="concat(@uof:宽度 div 30,$uofUnit, ' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2233 <xsl:if test="@uof:类型 = 'double'"> 2234 <xsl:attribute name="style:border-line-width-left">0.035cm 0.035cm 0.035cm</xsl:attribute> 2235 </xsl:if> 2236 </xsl:template> 2237 <xsl:template match="uof:右"> 2238 <xsl:variable name="bordtype"> 2239 <xsl:choose> 2240 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2241 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2242 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2243 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2244 <xsl:otherwise>solid</xsl:otherwise> 2245 </xsl:choose> 2246 </xsl:variable> 2247 <xsl:attribute name="fo:border-right"><xsl:value-of select="concat( @uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2248 <xsl:if test="@uof:类型 = 'double'"> 2249 <xsl:attribute name="style:border-line-width-right">0.035cm 0.035cm 0.035cm</xsl:attribute> 2250 </xsl:if> 2251 </xsl:template> 2252 <xsl:template match="uof:对角线1"> 2253 <xsl:variable name="bordtype"> 2254 <xsl:choose> 2255 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2256 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2257 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2258 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2259 <xsl:otherwise>solid</xsl:otherwise> 2260 </xsl:choose> 2261 </xsl:variable> 2262 <xsl:attribute name="style:diagonal-bl-tr"><xsl:value-of select="concat( @uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2263 <xsl:if test="@uof:类型 = 'double'"> 2264 <xsl:attribute name="style:diagonal-bl-tr-width">0.035cm 0.035cm 0.035cm</xsl:attribute> 2265 </xsl:if> 2266 </xsl:template> 2267 <xsl:template match="uof:对角线2"> 2268 <xsl:variable name="bordtype"> 2269 <xsl:choose> 2270 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2271 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2272 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2273 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2274 <xsl:otherwise>solid</xsl:otherwise> 2275 </xsl:choose> 2276 </xsl:variable> 2277 <xsl:attribute name="style:diagonal-tl-br"><xsl:value-of select="concat( @uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2278 <xsl:if test="@uof:类型 = 'double'"> 2279 <xsl:attribute name="style:diagonal-tl-br-width">0.035cm 0.035cm 0.035cm</xsl:attribute> 2280 </xsl:if> 2281 </xsl:template> 2282 <xsl:template match="表:字体格式"> 2283 <xsl:choose> 2284 <xsl:when test="字:上下标/@字:上下标 = 'sup'"> 2285 <style:style style:name="{concat(../@表:标识符,'T0')}" style:family="text"> 2286 <style:text-properties style:text-position="33% 58%"/> 2287 </style:style> 2288 </xsl:when> 2289 <xsl:when test="字:上下标/@字:上下标 = 'sub'"> 2290 <style:style style:name="{concat(../@表:标识符,'T0')}" style:family="text"> 2291 <style:text-properties style:text-position="-33% 58%"/> 2292 </style:style> 2293 </xsl:when> 2294 <xsl:otherwise/> 2295 </xsl:choose> 2296 </xsl:template> 2297 <xsl:template name="tablecolumngroup"> 2298 <xsl:param name="start"/> 2299 <xsl:param name="end"/> 2300 <xsl:param name="prestart"/> 2301 <xsl:param name="preend"/> 2302 <xsl:param name="nextstart"/> 2303 <xsl:param name="nextend"/> 2304 <table:table-column-group> 2305 <table:table-column> 2306 <xsl:attribute name="table:style-name">co1</xsl:attribute> 2307 <xsl:attribute name="table:table-column-repeated"><xsl:value-of select="@表:终止 - @表:起始 + 1"/></xsl:attribute> 2308 </table:table-column> 2309 <xsl:if test="$nextstart >= $start and $nextend <= $end"> 2310 <xsl:for-each select="following-sibling::表:列[1]"> 2311 <xsl:call-template name="tablecolumngroup"/> 2312 </xsl:for-each> 2313 </xsl:if> 2314 </table:table-column-group> 2315 </xsl:template> 2316 <xsl:template match="表:工作表"> 2317 <xsl:variable name="rowpath" select="表:工作表内容/表:行"/> 2318 <xsl:variable name="colpath" select="表:工作表内容/表:列"/> 2319 <xsl:element name="table:table"> 2320 <xsl:attribute name="table:name"><xsl:value-of select="@表:名称"/></xsl:attribute> 2321 <xsl:if test="表:工作表内容"> 2322 <xsl:attribute name="table:style-name"><xsl:value-of select="concat( 'ta', count(preceding-sibling::表:工作表)+1)"/></xsl:attribute> 2323 <xsl:if test="(@表:隐藏 = '1')or(@表:隐藏 = 'true')"> 2324 <xsl:attribute name="table:protected">true</xsl:attribute> 2325 </xsl:if> 2326 <xsl:if test="表:工作表内容/uof:锚点 or 表:工作表内容/表:图表"> 2327 <table:shapes> 2328 <xsl:apply-templates select="表:工作表内容/uof:锚点"/> 2329 <xsl:apply-templates select="表:工作表内容/表:图表"> 2330 <xsl:with-param name="table-name" select="@表:名称"/> 2331 </xsl:apply-templates> 2332 </table:shapes> 2333 </xsl:if> 2334 <xsl:variable name="table-pos"> 2335 <xsl:value-of select="count(../preceding-sibling::表:工作表)+1"/> 2336 </xsl:variable> 2337 <xsl:if test="表:工作表内容/表:分组集/表:列"> 2338 <xsl:for-each select="表:工作表内容/表:分组集/表:列"> 2339 <xsl:variable name="start" select="@表:起始"/> 2340 <xsl:variable name="end" select="@表:终止"/> 2341 <xsl:variable name="prestart" select="preceding-sibling::表:列/@表:起始"/> 2342 <xsl:variable name="preend" select="preceding-sibling::表:列/@表:终止"/> 2343 <xsl:variable name="nextstart" select="following-sibling::表:列/@表:起始"/> 2344 <xsl:variable name="nextend" select="following-sibling::表:列/@表:终止"/> 2345 <xsl:call-template name="tablecolumngroup"> 2346 <xsl:with-param name="start" select="$start"/> 2347 <xsl:with-param name="end" select="$end"/> 2348 <xsl:with-param name="prestart" select="$prestart"/> 2349 <xsl:with-param name="preend" select="$preend"/> 2350 <xsl:with-param name="nextstart" select="$nextstart"/> 2351 <xsl:with-param name="nextend" select="$nextend"/> 2352 </xsl:call-template> 2353 </xsl:for-each> 2354 </xsl:if> 2355 <xsl:for-each select="表:工作表内容/表:列"> 2356 <table:table-column> 2357 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 2358 <xsl:if test="@表:跨度 and not(@表:跨度='1')"> 2359 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="@表:跨度"/></xsl:attribute> 2360 </xsl:if> 2361 <xsl:if test="@表:隐藏"> 2362 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2363 </xsl:if> 2364 </table:table-column> 2365 </xsl:for-each> 2366 <xsl:variable name="condition-pos-str1"> 2367 <xsl:if test="../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 2368 <xsl:call-template name="condition-row-column-string"> 2369 <xsl:with-param name="last" select="''"/> 2370 <xsl:with-param name="total" select="count(../../表:公用处理规则/表:条件格式化集/表:条件格式化)"/> 2371 <xsl:with-param name="index" select="1"/> 2372 </xsl:call-template> 2373 </xsl:if> 2374 </xsl:variable> 2375 <xsl:variable name="condition-pos-str2"> 2376 <xsl:if test="../../表:公用处理规则/表:数据有效性集/表:数据有效性"> 2377 <xsl:call-template name="validation-row-column-string"> 2378 <xsl:with-param name="last" select="''"/> 2379 <xsl:with-param name="total" select="count(../../表:公用处理规则/表:数据有效性集/表:数据有效性)"/> 2380 <xsl:with-param name="index" select="1"/> 2381 </xsl:call-template> 2382 </xsl:if> 2383 </xsl:variable> 2384 <xsl:variable name="condition-pos-str" select="concat($condition-pos-str1, $condition-pos-str2)"/> 2385 <xsl:choose> 2386 <xsl:when test="./表:工作表内容/表:行"> 2387 <xsl:call-template name="create-rows"> 2388 <xsl:with-param name="lastrowpos" select="0"/> 2389 <xsl:with-param name="row-count" select="count(表:工作表内容/表:行)"/> 2390 <xsl:with-param name="currentRow" select="1"/> 2391 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2392 </xsl:call-template> 2393 </xsl:when> 2394 <xsl:otherwise> 2395 <xsl:variable name="tableHasStyle"> 2396 <xsl:choose> 2397 <xsl:when test="./表:工作表内容[@表:式样引用]"> 2398 <xsl:value-of select="1"/> 2399 </xsl:when> 2400 <xsl:otherwise> 2401 <xsl:value-of select="0"/> 2402 </xsl:otherwise> 2403 </xsl:choose> 2404 </xsl:variable> 2405 <xsl:choose> 2406 <xsl:when test="./表:分页符集/表:分页符[@表:行号]"> 2407 <xsl:for-each select="./表:分页符集/表:分页符[@表:行号]"> 2408 <xsl:variable name="number-repeated"> 2409 <xsl:choose> 2410 <xsl:when test="position() = 1"> 2411 <xsl:value-of select="./@表:行号"/> 2412 </xsl:when> 2413 <xsl:otherwise> 2414 <xsl:value-of select="./@表:行号 - preceding::表:分页符[@表:行号 and (position()=count(.))]/@表:行号 - 1"/> 2415 </xsl:otherwise> 2416 </xsl:choose> 2417 </xsl:variable> 2418 <xsl:if test="$number-repeated > 0"> 2419 <xsl:element name="table:table-row"> 2420 <xsl:if test="($rowpath/@表:隐藏 = '1') or ($rowpath/@表:隐藏 = 'true')"> 2421 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2422 </xsl:if> 2423 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro',$table-pos)"/></xsl:attribute> 2424 <xsl:attribute name="table:number-rows-repeated"><xsl:value-of select="$number-repeated"/></xsl:attribute> 2425 <xsl:choose> 2426 <xsl:when test="$tableHasStyle = 1"> 2427 <table:table-cell table:number-columns-repeated="256"/> 2428 </xsl:when> 2429 <xsl:otherwise> 2430 <table:table-cell/> 2431 </xsl:otherwise> 2432 </xsl:choose> 2433 </xsl:element> 2434 </xsl:if> 2435 <xsl:element name="table:table-row"> 2436 <xsl:if test="($colpath/@表:隐藏 = '1') or ($colpath/@表:隐藏 = 'true')"> 2437 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2438 </xsl:if> 2439 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob',$table-pos)"/></xsl:attribute> 2440 <xsl:choose> 2441 <xsl:when test="$tableHasStyle = 1"> 2442 <table:table-cell table:number-columns-repeated="256"/> 2443 </xsl:when> 2444 <xsl:otherwise> 2445 <table:table-cell/> 2446 </xsl:otherwise> 2447 </xsl:choose> 2448 </xsl:element> 2449 </xsl:for-each> 2450 </xsl:when> 2451 <xsl:otherwise> 2452 <xsl:element name="table:table-row"> 2453 <xsl:choose> 2454 <xsl:when test="表:工作表内容/@表:式样引用"> 2455 <xsl:attribute name="table:style-name"><xsl:value-of select="表:工作表内容/@表:式样引用"/></xsl:attribute> 2456 </xsl:when> 2457 <xsl:otherwise> 2458 <xsl:attribute name="table:style-name"><xsl:text>ro1</xsl:text></xsl:attribute> 2459 </xsl:otherwise> 2460 </xsl:choose> 2461 <xsl:element name="table:table-cell"/> 2462 </xsl:element> 2463 </xsl:otherwise> 2464 </xsl:choose> 2465 <xsl:if test="../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 2466 <xsl:variable name="condition-row-max"> 2467 <xsl:call-template name="condition-row-col-pos-max"> 2468 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2469 <xsl:with-param name="last-value" select="0"/> 2470 <xsl:with-param name="div-value" select="'R'"/> 2471 </xsl:call-template> 2472 </xsl:variable> 2473 <xsl:variable name="condition-col-max"> 2474 <xsl:call-template name="condition-row-col-pos-max"> 2475 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2476 <xsl:with-param name="last-value" select="0"/> 2477 <xsl:with-param name="div-value" select="'C'"/> 2478 </xsl:call-template> 2479 </xsl:variable> 2480 <xsl:variable name="break-row-max"> 2481 <xsl:call-template name="break-row-beyond-max"> 2482 <xsl:with-param name="pos" select="1"/> 2483 <xsl:with-param name="last-value" select="0"/> 2484 <xsl:with-param name="count-value" select="count(./表:分页符集/表:分页符[@表:行号])"/> 2485 </xsl:call-template> 2486 </xsl:variable> 2487 <xsl:variable name="end-value"> 2488 <xsl:choose> 2489 <xsl:when test="$condition-row-max < $break-row-max"> 2490 <xsl:value-of select="$break-row-max"/> 2491 </xsl:when> 2492 <xsl:otherwise> 2493 <xsl:value-of select="$condition-row-max"/> 2494 </xsl:otherwise> 2495 </xsl:choose> 2496 </xsl:variable> 2497 <xsl:call-template name="get-row-beyond-last"> 2498 <xsl:with-param name="index-value" select="1"/> 2499 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2500 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2501 <xsl:with-param name="end-pos" select="$end-value"/> 2502 <xsl:with-param name="total-col" select="$condition-col-max"/> 2503 </xsl:call-template> 2504 </xsl:if> 2505 <xsl:if test="./表:工作表内容/@表:式样引用"> 2506 <table:table-row table:style-name="ro1" table:number-rows-repeated="32000"> 2507 <table:table-cell table:number-columns-repeated="256"/> 2508 </table:table-row> 2509 </xsl:if> 2510 </xsl:otherwise> 2511 </xsl:choose> 2512 </xsl:if> 2513 </xsl:element> 2514 <xsl:if test="表:图表"> 2515 <table:shapes> 2516 <xsl:apply-templates select="表:图表"> 2517 <xsl:with-param name="table-name" select="@表:名称"/> 2518 </xsl:apply-templates> 2519 </table:shapes> 2520 </xsl:if> 2521 </xsl:template> 2522 <!--xsl:template name="create-columns-without-input"></xsl:template> 2523 <xsl:template name="create-columns"></xsl:template> 2524 <xsl:template name="condition-row-column-string"></xsl:template> 2525<xsl:template name="validation-row-column-string"></xsl:template> 2526<xsl:template name="create-rows"></xsl:template> 2527<xsl:template name="condition-row-col-pos-max"></xsl:template> 2528<xsl:template name="get-row-beyond-last"></xsl:template--> 2529 <!--xsl:template name="break-row-beyond-max"></xsl:template--> 2530 <!-- chengxz有问题--> 2531 <xsl:template name="create-columns-without-input"> 2532 <xsl:param name="table-pos"/> 2533 <xsl:variable name="rowpath" select="表:工作表内容/表:行"/> 2534 <xsl:variable name="colpath" select="表:工作表内容/表:列"/> 2535 <xsl:choose> 2536 <xsl:when test="./表:分页符集/表:分页符[@表:列号]"> 2537 <xsl:for-each select="./表:分页符集/表:分页符[@表:列号]"> 2538 <xsl:variable name="number-repeated"> 2539 <xsl:choose> 2540 <xsl:when test="position() = 1"> 2541 <xsl:value-of select="./@表:列号"/> 2542 </xsl:when> 2543 <xsl:otherwise> 2544 <xsl:value-of select="./@表:列号 - preceding::表:分页符[@表:列号 and (position()=count(.))]/@表:列号 - 1"/> 2545 </xsl:otherwise> 2546 </xsl:choose> 2547 </xsl:variable> 2548 <xsl:if test="$number-repeated > 0"> 2549 <xsl:element name="table:table-column"> 2550 <xsl:if test="ancestor::表:工作表/表:工作表内容/@表:式样引用"> 2551 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="ancestor::表:工作表/表:工作表内容/@表:式样引用"/></xsl:attribute> 2552 </xsl:if> 2553 <xsl:if test="($colpath/@表:隐藏 = '1') or ($colpath/@表:隐藏 = 'true')"> 2554 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2555 </xsl:if> 2556 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('co',$table-pos)"/></xsl:attribute> 2557 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$number-repeated"/></xsl:attribute> 2558 </xsl:element> 2559 </xsl:if> 2560 <xsl:element name="table:table-column"> 2561 <xsl:if test="ancestor::表:工作表/表:工作表内容/@表:式样引用"> 2562 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="ancestor::表:工作表/表:工作表内容/@表:式样引用"/></xsl:attribute> 2563 </xsl:if> 2564 <xsl:if test="($colpath/@表:隐藏 = '1') or ($colpath/@表:隐藏 = 'true')"> 2565 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2566 </xsl:if> 2567 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$table-pos)"/></xsl:attribute> 2568 </xsl:element> 2569 </xsl:for-each> 2570 </xsl:when> 2571 <xsl:otherwise> 2572 <xsl:element name="table:table-column"> 2573 <xsl:choose> 2574 <xsl:when test="表:工作表内容/@表:式样引用"> 2575 <xsl:attribute name="table:style-name"><xsl:value-of select="表:工作表内容/@表:式样引用"/></xsl:attribute> 2576 </xsl:when> 2577 <xsl:otherwise> 2578 <xsl:attribute name="table:style-name"><xsl:text>co1</xsl:text></xsl:attribute> 2579 </xsl:otherwise> 2580 </xsl:choose> 2581 <xsl:if test="表:工作表内容/@表:最大列 and 表:工作表内容/@表:最大列 > 0"> 2582 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="表:工作表内容/@表:最大列"/></xsl:attribute> 2583 </xsl:if> 2584 <xsl:attribute name="table:default-cell-style-name"><xsl:text>Default</xsl:text></xsl:attribute> 2585 </xsl:element> 2586 </xsl:otherwise> 2587 </xsl:choose> 2588 </xsl:template> 2589 <xsl:template name="create-columns"> 2590 <xsl:param name="columnCount"/> 2591 <xsl:param name="currentColumn" select="1"/> 2592 <xsl:param name="finishedColumns" select="0"/> 2593 <xsl:param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2594 <xsl:param name="currentColumnNode"/> 2595 <xsl:choose> 2596 <xsl:when test="$finishedColumns < $columnCount"> 2597 <xsl:choose> 2598 <xsl:when test="$currentColumnNode"> 2599 <xsl:choose> 2600 <xsl:when test="$currentColumnNode/@表:列号 - $finishedColumns > 1"> 2601 <xsl:call-template name="create-default-column"> 2602 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2603 <xsl:with-param name="currentColumnNode" select="$currentColumnNode"/> 2604 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2605 </xsl:call-template> 2606 <xsl:call-template name="create-columns"> 2607 <xsl:with-param name="columnCount" select="$columnCount"/> 2608 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2609 <xsl:with-param name="currentColumnNode" select="$currentColumnNode"/> 2610 <xsl:with-param name="finishedColumns" select="$finishedColumns + 1"/> 2611 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2612 </xsl:call-template> 2613 </xsl:when> 2614 <xsl:otherwise> 2615 <xsl:element name="table:table-column"> 2616 <xsl:if test="($currentColumnNode/@表:隐藏 = '1') or ($currentColumnNode/@表:隐藏 = 'true')"> 2617 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2618 </xsl:if> 2619 <xsl:if test="$currentColumnNode/@表:跨度"> 2620 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$currentColumnNode/@表:跨度 + 1"/></xsl:attribute> 2621 </xsl:if> 2622 <xsl:choose> 2623 <xsl:when test="key('ColBreak', $currentColumn)"> 2624 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob', $worksheetNo, '-', $currentColumn)"/></xsl:attribute> 2625 </xsl:when> 2626 <xsl:otherwise> 2627 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('co', $worksheetNo, '-', $currentColumn)"/></xsl:attribute> 2628 </xsl:otherwise> 2629 </xsl:choose> 2630 </xsl:element> 2631 <xsl:call-template name="create-columns"> 2632 <xsl:with-param name="columnCount" select="$columnCount"/> 2633 <xsl:with-param name="currentColumn" select="$currentColumn + 1"/> 2634 <xsl:with-param name="finishedColumns" select="$finishedColumns + 1"/> 2635 <xsl:with-param name="currentColumnNode" select="表:工作表属性/表:列[$currentColumn + 1]"/> 2636 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2637 </xsl:call-template> 2638 </xsl:otherwise> 2639 </xsl:choose> 2640 </xsl:when> 2641 <xsl:otherwise> 2642 <xsl:call-template name="create-default-column"> 2643 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2644 <xsl:with-param name="currentColumnNode" select="$currentColumnNode"/> 2645 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2646 </xsl:call-template> 2647 <xsl:call-template name="create-columns"> 2648 <xsl:with-param name="columnCount" select="$columnCount"/> 2649 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2650 <xsl:with-param name="finishedColumns" select="$finishedColumns + 1"/> 2651 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2652 </xsl:call-template> 2653 </xsl:otherwise> 2654 </xsl:choose> 2655 </xsl:when> 2656 <xsl:otherwise> 2657 <xsl:if test="$currentColumn = $columnCount"> 2658 <xsl:if test="表:分页符集/表:分页符/@表:列号 > $finishedColumns"> 2659 <xsl:call-template name="get-column-beyond-last"> 2660 <xsl:with-param name="index-value" select="$finishedColumns"/> 2661 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2662 </xsl:call-template> 2663 </xsl:if> 2664 </xsl:if> 2665 </xsl:otherwise> 2666 </xsl:choose> 2667 </xsl:template> 2668 <xsl:template name="get-column-beyond-last"> 2669 <xsl:param name="index-value"/> 2670 <xsl:param name="worksheetNo"/> 2671 <xsl:for-each select="表:分页符集/表:分页符[@表:列号]"> 2672 <xsl:variable name="each-column-value" select="@表:列号"/> 2673 <xsl:choose> 2674 <xsl:when test="$each-column-value + 1 > $index-value"> 2675 <xsl:variable name="number-repeated"> 2676 <xsl:choose> 2677 <xsl:when test="preceding-sibling::表:分页符[@表:列号][position()=count(.)]/@表:列号 + 1 = $index-value"> 2678 <xsl:value-of select="$each-column-value - preceding-sibling::表:分页符[@表:列号 and (position()=count(.))]/@表:列号 - 1"/> 2679 </xsl:when> 2680 <xsl:when test="preceding-sibling::表:分页符[@表:列号 and (position()=count(.))]/@表:列号 + 1 > $index-value"> 2681 <xsl:value-of select="$each-column-value - preceding-sibling::表:分页符[@表:列号][position()=count(.)]/@表:列号 - 1"/> 2682 </xsl:when> 2683 <xsl:otherwise> 2684 <xsl:value-of select="$each-column-value - $index-value + 1"/> 2685 </xsl:otherwise> 2686 </xsl:choose> 2687 </xsl:variable> 2688 <xsl:if test="$number-repeated > 0"> 2689 <xsl:element name="table:table-column"> 2690 <xsl:attribute name="table:style-name"><xsl:value-of select="'co1'"/></xsl:attribute> 2691 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$number-repeated"/></xsl:attribute> 2692 </xsl:element> 2693 </xsl:if> 2694 <xsl:element name="table:table-column"> 2695 <xsl:if test="../../表:工作表内容[@表:式样引用]"> 2696 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="./表:工作表内容/@表:式样引用"/></xsl:attribute> 2697 </xsl:if> 2698 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$worksheetNo)"/></xsl:attribute> 2699 </xsl:element> 2700 </xsl:when> 2701 <xsl:when test="$each-column-value + 1 = $index-value"> 2702 <xsl:element name="table:table-column"> 2703 <xsl:if test="/../../表:工作表内容[@表:式样引用]"> 2704 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="./../../表:工作表内容/@表:式样引用"/></xsl:attribute> 2705 </xsl:if> 2706 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$worksheetNo)"/></xsl:attribute> 2707 </xsl:element> 2708 </xsl:when> 2709 </xsl:choose> 2710 </xsl:for-each> 2711 </xsl:template> 2712 <xsl:template name="condition-row-column-string"> 2713 <xsl:param name="last"/> 2714 <xsl:param name="total"/> 2715 <xsl:param name="index"/> 2716 <xsl:variable name="table-pos" select="count(preceding-sibling::表:工作表)+1"/> 2717 <xsl:variable name="current"> 2718 <xsl:call-template name="parse-range"> 2719 <xsl:with-param name="range-value" select="../../表:公用处理规则/表:条件格式化集/表:条件格式化[position() = $index]/表:范围"/> 2720 </xsl:call-template> 2721 </xsl:variable> 2722 <xsl:variable name="current-value" select="concat('(c',$table-pos,'-',$index,':', $current,');')"/> 2723 <xsl:if test="$index < $total"> 2724 <xsl:call-template name="condition-row-column-string"> 2725 <xsl:with-param name="last" select="concat($last, $current-value)"/> 2726 <xsl:with-param name="total" select="$total"/> 2727 <xsl:with-param name="index" select="$index + 1"/> 2728 </xsl:call-template> 2729 </xsl:if> 2730 <xsl:if test="$index = $total"> 2731 <xsl:value-of select="concat($last, $current-value)"/> 2732 </xsl:if> 2733 </xsl:template> 2734 <xsl:template name="validation-row-column-string"> 2735 <xsl:param name="last"/> 2736 <xsl:param name="total"/> 2737 <xsl:param name="index"/> 2738 <xsl:variable name="table-pos" select="count(preceding-sibling::表:工作表)+1"/> 2739 <xsl:variable name="current"> 2740 <xsl:call-template name="parse-range"> 2741 <xsl:with-param name="range-value" select="../../表:公用处理规则/表:数据有效性集/表:数据有效性[position() = $index]/表:范围"/> 2742 </xsl:call-template> 2743 </xsl:variable> 2744 <xsl:variable name="current-value" select="concat('(v',$index,':', $current,');')"/> 2745 <xsl:if test="$index < $total"> 2746 <xsl:call-template name="validation-row-column-string"> 2747 <xsl:with-param name="last" select="concat($last, $current-value)"/> 2748 <xsl:with-param name="total" select="$total"/> 2749 <xsl:with-param name="index" select="$index + 1"/> 2750 </xsl:call-template> 2751 </xsl:if> 2752 <xsl:if test="$index = $total"> 2753 <xsl:value-of select="concat($last, $current-value)"/> 2754 </xsl:if> 2755 </xsl:template> 2756 <xsl:template name="create-rows"> 2757 <xsl:param name="lastrowpos"/> 2758 <xsl:param name="row-count"/> 2759 <xsl:param name="currentRow"/> 2760 <xsl:param name="condition-pos-str"/> 2761 <xsl:choose> 2762 <xsl:when test="$currentRow < ($row-count + 1)"> 2763 <xsl:variable name="span-value"> 2764 <xsl:choose> 2765 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2766 <xsl:choose> 2767 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2768 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 - $lastrowpos + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"/> 2769 </xsl:when> 2770 <xsl:otherwise> 2771 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 - $lastrowpos"/> 2772 </xsl:otherwise> 2773 </xsl:choose> 2774 </xsl:when> 2775 <xsl:otherwise> 2776 <xsl:choose> 2777 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2778 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度 + 1"/> 2779 </xsl:when> 2780 <xsl:otherwise> 2781 <xsl:value-of select="1"/> 2782 </xsl:otherwise> 2783 </xsl:choose> 2784 </xsl:otherwise> 2785 </xsl:choose> 2786 </xsl:variable> 2787 <xsl:variable name="current-index"> 2788 <xsl:choose> 2789 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2790 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"/> 2791 </xsl:when> 2792 <xsl:otherwise> 2793 <xsl:value-of select="$lastrowpos + 1"/> 2794 </xsl:otherwise> 2795 </xsl:choose> 2796 </xsl:variable> 2797 <xsl:choose> 2798 <xsl:when test="./表:工作表内容/表:分组集/表:行"> 2799 <xsl:for-each select="./表:工作表内容/表:分组集/表:行[1]"> 2800 <xsl:call-template name="table:table-row-group"/> 2801 </xsl:for-each> 2802 <xsl:for-each select="./表:工作表内容/表:行[not(@表:行号)]"> 2803 <xsl:call-template name="create-row"> 2804 <xsl:with-param name="index-value" select="$lastrowpos"/> 2805 <xsl:with-param name="span-value" select="$span-value"/> 2806 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2807 <xsl:with-param name="row-value" select="$currentRow"/> 2808 <xsl:with-param name="times" select="1"/> 2809 <xsl:with-param name="current-index" select="$current-index"/> 2810 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2811 </xsl:call-template> 2812 </xsl:for-each> 2813 </xsl:when> 2814 <xsl:when test="./表:工作表内容/表:分组集 and ( ./表:工作表内容/表:分组集/表:行/@表:起始 >= ($currentRow - 1) and ($currentRow - 1) <= ./表:工作表内容/表:分组集/表:行/@表:终止 )"> 2815 <xsl:element name="table:table-row-group"> 2816 <xsl:variable name="TempStart"> 2817 <xsl:value-of select="./表:工作表内容/表:分组集/表:行/@表:起始"/> 2818 </xsl:variable> 2819 <xsl:variable name="TempEnd"> 2820 <xsl:value-of select="./表:工作表内容/表:分组集/表:行/@表:终止"/> 2821 </xsl:variable> 2822 <xsl:for-each select="./表:工作表内容/表:行"> 2823 <xsl:if test="$TempStart >= ($currentRow - 1) and ($currentRow - 1) <= $TempEnd"> 2824 <xsl:call-template name="create-row"> 2825 <xsl:with-param name="index-value" select="$lastrowpos"/> 2826 <xsl:with-param name="span-value" select="$span-value"/> 2827 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2828 <xsl:with-param name="row-value" select="$currentRow"/> 2829 <xsl:with-param name="times" select="1"/> 2830 <xsl:with-param name="current-index" select="$current-index"/> 2831 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2832 </xsl:call-template> 2833 </xsl:if> 2834 </xsl:for-each> 2835 </xsl:element> 2836 </xsl:when> 2837 <xsl:otherwise> 2838 <xsl:call-template name="create-row"> 2839 <xsl:with-param name="index-value" select="$lastrowpos"/> 2840 <xsl:with-param name="span-value" select="$span-value"/> 2841 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2842 <xsl:with-param name="row-value" select="$currentRow"/> 2843 <xsl:with-param name="times" select="1"/> 2844 <xsl:with-param name="current-index" select="$current-index"/> 2845 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2846 </xsl:call-template> 2847 <xsl:if test="$currentRow < $row-count"> 2848 <xsl:call-template name="create-rows"> 2849 <xsl:with-param name="lastrowpos"> 2850 <xsl:choose> 2851 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2852 <xsl:choose> 2853 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2854 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"/> 2855 </xsl:when> 2856 <xsl:otherwise> 2857 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"/> 2858 </xsl:otherwise> 2859 </xsl:choose> 2860 </xsl:when> 2861 <xsl:otherwise> 2862 <xsl:choose> 2863 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2864 <xsl:value-of select="$lastrowpos + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度 + 1"/> 2865 </xsl:when> 2866 <xsl:otherwise> 2867 <xsl:value-of select="$lastrowpos + 1"/> 2868 </xsl:otherwise> 2869 </xsl:choose> 2870 </xsl:otherwise> 2871 </xsl:choose> 2872 </xsl:with-param> 2873 <xsl:with-param name="row-count" select="$row-count"/> 2874 <xsl:with-param name="currentRow" select="$currentRow + 1"/> 2875 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2876 </xsl:call-template> 2877 </xsl:if> 2878 </xsl:otherwise> 2879 </xsl:choose> 2880 </xsl:when> 2881 <xsl:when test="$currentRow = $row-count"> 2882 <xsl:variable name="last-pos"> 2883 <xsl:choose> 2884 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2885 <xsl:choose> 2886 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2887 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"/> 2888 </xsl:when> 2889 <xsl:otherwise> 2890 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"/> 2891 </xsl:otherwise> 2892 </xsl:choose> 2893 </xsl:when> 2894 <xsl:otherwise> 2895 <xsl:choose> 2896 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2897 <xsl:value-of select="$lastrowpos + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度 + 1"/> 2898 </xsl:when> 2899 <xsl:otherwise> 2900 <xsl:value-of select="$lastrowpos + 1"/> 2901 </xsl:otherwise> 2902 </xsl:choose> 2903 </xsl:otherwise> 2904 </xsl:choose> 2905 </xsl:variable> 2906 <xsl:if test="./表:分页符集/表:分页符/@表:行号 > ($last-pos - 1) or ../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 2907 <xsl:variable name="condition-row-max"> 2908 <xsl:call-template name="condition-row-col-pos-max"> 2909 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2910 <xsl:with-param name="last-value" select="0"/> 2911 <xsl:with-param name="div-value" select="'R'"/> 2912 </xsl:call-template> 2913 </xsl:variable> 2914 <xsl:variable name="condition-col-max"> 2915 <xsl:call-template name="condition-row-col-pos-max"> 2916 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2917 <xsl:with-param name="last-value" select="0"/> 2918 <xsl:with-param name="div-value" select="'C'"/> 2919 </xsl:call-template> 2920 </xsl:variable> 2921 <xsl:variable name="break-row-max"> 2922 <xsl:call-template name="break-row-beyond-max"> 2923 <xsl:with-param name="pos" select="1"/> 2924 <xsl:with-param name="last-value" select="0"/> 2925 <xsl:with-param name="count-value" select="count(./表:分页符集/表:分页符[@表:行号])"/> 2926 </xsl:call-template> 2927 </xsl:variable> 2928 <xsl:variable name="end-value"> 2929 <xsl:choose> 2930 <xsl:when test="$condition-row-max < $break-row-max"> 2931 <xsl:value-of select="$break-row-max"/> 2932 </xsl:when> 2933 <xsl:otherwise> 2934 <xsl:value-of select="$condition-row-max"/> 2935 </xsl:otherwise> 2936 </xsl:choose> 2937 </xsl:variable> 2938 <xsl:call-template name="get-row-beyond-last"> 2939 <xsl:with-param name="index-value" select="$last-pos + 1"/> 2940 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2941 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2942 <xsl:with-param name="end-pos" select="$end-value"/> 2943 <xsl:with-param name="total-col" select="$condition-col-max"/> 2944 </xsl:call-template> 2945 </xsl:if> 2946 <xsl:if test="./表:工作表内容/表:列[@表:式样引用] or ./表:工作表内容[@表:式样引用]"> 2947 <table:table-row table:style-name="ro1" table:number-rows-repeated="31990"> 2948 <table:table-cell table:number-columns-repeated="256"/> 2949 </table:table-row> 2950 <table:table-row table:style-name="ro1"> 2951 <table:table-cell table:number-columns-repeated="256"/> 2952 </table:table-row> 2953 </xsl:if> 2954 </xsl:when> 2955 </xsl:choose> 2956 </xsl:template> 2957 <!-- add row-group 2.6--> 2958 <xsl:template name="table:table-row-group"> 2959 <xsl:param name="start"/> 2960 <xsl:param name="end"/> 2961 <xsl:variable name="start1" select="@表:起始"/> 2962 <xsl:variable name="end1" select="@表:终止"/> 2963 <xsl:variable name="nextstart" select="following-sibling::表:行/@表:起始"/> 2964 <xsl:variable name="nextend" select="following-sibling::表:行/@表:终止"/> 2965 <xsl:variable name="prestart" select="preceding-sibling::表:行/@表:起始"/> 2966 <xsl:variable name="preend" select="preceding-sibling::表:行/@表:终止"/> 2967 <xsl:variable name="numrow" select="$end1 - $start1"/> 2968 <xsl:variable name="position" select="position()"/> 2969 <xsl:choose> 2970 <xsl:when test="$nextstart >= $start1 and $nextend <= $end1"> 2971 <table:table-row-group> 2972 <xsl:call-template name="creategroup"/> 2973 </table:table-row-group> 2974 </xsl:when> 2975 <xsl:when test="$nextstart >= $end1"> 2976 <xsl:choose> 2977 <xsl:when test="$nextend <=$preend"> 2978 <xsl:call-template name="row"> 2979 <xsl:with-param name="start1" select="$start1"/> 2980 <xsl:with-param name="end1" select="$end1"/> 2981 <xsl:with-param name="nextstart" select="$nextstart"/> 2982 <xsl:with-param name="nextend" select="$nextend"/> 2983 <xsl:with-param name="prestart" select="$prestart"/> 2984 <xsl:with-param name="preend" select="$preend"/> 2985 </xsl:call-template> 2986 </xsl:when> 2987 <xsl:otherwise> 2988 <xsl:call-template name="levelgroup"/> 2989 </xsl:otherwise> 2990 </xsl:choose> 2991 </xsl:when> 2992 <xsl:otherwise> 2993 <xsl:call-template name="row"> 2994 <xsl:with-param name="start1" select="$start1"/> 2995 <xsl:with-param name="end1" select="$end1"/> 2996 <xsl:with-param name="nextstart" select="$nextstart"/> 2997 <xsl:with-param name="nextend" select="$nextend"/> 2998 <xsl:with-param name="prestart" select="$prestart"/> 2999 <xsl:with-param name="preend" select="$preend"/> 3000 </xsl:call-template> 3001 </xsl:otherwise> 3002 </xsl:choose> 3003 </xsl:template> 3004 <xsl:template name="levelrowgroup"> 3005 <xsl:param name="start"/> 3006 <xsl:param name="end"/> 3007 <xsl:variable name="start1" select="@表:起始"/> 3008 <xsl:variable name="end1" select="@表:终止"/> 3009 <xsl:variable name="nextstart" select="following-sibling::表:行/@表:起始"/> 3010 <xsl:variable name="nextend" select="following-sibling::表:行/@表:终止"/> 3011 <xsl:variable name="prestart" select="preceding-sibling::表:行/@表:起始"/> 3012 <xsl:variable name="preend" select="preceding-sibling::表:行/@表:终止"/> 3013 <xsl:variable name="numrow" select="$end1 - $start1"/> 3014 <xsl:variable name="position" select="position()"/> 3015 <xsl:call-template name="row"> 3016 <xsl:with-param name="start1" select="$start1"/> 3017 <xsl:with-param name="end1" select="$end1"/> 3018 <xsl:with-param name="nextstart" select="$nextstart"/> 3019 <xsl:with-param name="nextend" select="$nextend"/> 3020 <xsl:with-param name="prestart" select="$prestart"/> 3021 <xsl:with-param name="preend" select="$preend"/> 3022 </xsl:call-template> 3023 </xsl:template> 3024 <xsl:template name="creategroup"> 3025 <xsl:for-each select="following-sibling::表:行"> 3026 <xsl:variable name="start1" select="@表:起始"/> 3027 <xsl:variable name="end1" select="@表:终止"/> 3028 <xsl:variable name="nextstart" select="following-sibling::表:行/@表:起始"/> 3029 <xsl:variable name="nextend" select="following-sibling::表:行/@表:终止"/> 3030 <xsl:variable name="prestart" select="preceding-sibling::表:行/@表:起始"/> 3031 <xsl:variable name="preend" select="preceding-sibling::表:行/@表:终止"/> 3032 <xsl:if test="$start1 >= $prestart and $end1 <= $preend"> 3033 <xsl:call-template name="table:table-row-group"/> 3034 </xsl:if> 3035 </xsl:for-each> 3036 </xsl:template> 3037 <xsl:template name="levelgroup"> 3038 <xsl:for-each select="parent::表:分组集/表:行"> 3039 <xsl:call-template name="levelrowgroup"/> 3040 </xsl:for-each> 3041 </xsl:template> 3042 <xsl:template name="row"> 3043 <xsl:param name="start1"/> 3044 <xsl:param name="end1"/> 3045 <xsl:param name="nextstart"/> 3046 <xsl:param name="nextend"/> 3047 <xsl:param name="prestart"/> 3048 <xsl:param name="preend"/> 3049 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3050 <xsl:variable name="rownum" select="@表:行号"/> 3051 <xsl:variable name="aa" select="$start1 - $prestart"/> 3052 <xsl:if test="$rownum >= $prestart and $rownum <= ($prestart + $aa - 1) and $start1 <= $preend"> 3053 <table:table-row> 3054 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3055 <xsl:call-template name="celldata"/> 3056 </table:table-row> 3057 </xsl:if> 3058 </xsl:for-each> 3059 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3060 <xsl:variable name="rownum" select="@表:行号"/> 3061 <xsl:variable name="ss" select="$start1 - $preend"/> 3062 <xsl:if test="$rownum >= ($preend +1) and $rownum <= ($preend + $ss - 1) and $start1 >= $preend"> 3063 <table:table-row> 3064 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3065 <xsl:call-template name="celldata"/> 3066 </table:table-row> 3067 </xsl:if> 3068 </xsl:for-each> 3069 <table:table-row-group> 3070 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3071 <xsl:variable name="rownum" select="@表:行号"/> 3072 <xsl:if test="$rownum <= $end1"> 3073 <xsl:if test="$rownum >= $start1"> 3074 <table:table-row> 3075 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3076 <xsl:call-template name="celldata"/> 3077 </table:table-row> 3078 </xsl:if> 3079 </xsl:if> 3080 </xsl:for-each> 3081 </table:table-row-group> 3082 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3083 <xsl:variable name="rownum" select="@表:行号"/> 3084 <xsl:variable name="bb" select="$preend - $end1"/> 3085 <xsl:if test="$rownum >= ($end1 + 1) and $rownum <= ($end1 + $bb) and $start1 < $preend"> 3086 <table:table-row> 3087 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3088 <xsl:call-template name="celldata"/> 3089 </table:table-row> 3090 </xsl:if> 3091 </xsl:for-each> 3092 </xsl:template> 3093 <xsl:template name="celldata"> 3094 <xsl:for-each select="./表:单元格"> 3095 <table:table-cell> 3096 <xsl:choose> 3097 <xsl:when test="表:数据/@表:数据类型 = 'number'"> 3098 <xsl:attribute name="office:value-type">float</xsl:attribute> 3099 <xsl:attribute name="office:value"><xsl:choose><xsl:when test="表:数据/@表:数据数值"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:when><xsl:otherwise><xsl:value-of select="表:数据/字:句/字:文本串"/></xsl:otherwise></xsl:choose></xsl:attribute> 3100 </xsl:when> 3101 <xsl:when test="表:数据/@表:数据类型 = 'date'"> 3102 <xsl:attribute name="office:value-type">date</xsl:attribute> 3103 <xsl:attribute name="table:date-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 3104 </xsl:when> 3105 <xsl:when test="表:数据/@表:数据类型 = 'time'"> 3106 <xsl:attribute name="office:value-type">time</xsl:attribute> 3107 <xsl:attribute name="table:time-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 3108 </xsl:when> 3109 <xsl:when test="表:数据/@表:数据类型 = 'boolean'"> 3110 <xsl:attribute name="office:value-type">boolean</xsl:attribute> 3111 <xsl:attribute name="table:boolean-value"><xsl:choose><xsl:when test="表:数据/字:句/字:文本串 = '1'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 3112 </xsl:when> 3113 <xsl:when test="表:数据/@表:数据类型 = 'text'"> 3114 <xsl:attribute name="office:value-type">string</xsl:attribute> 3115 <xsl:attribute name="table:string-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 3116 </xsl:when> 3117 </xsl:choose> 3118 <xsl:if test="表:数据/字:句/字:文本串"> 3119 <text:p> 3120 <xsl:value-of select="表:数据/字:句/字:文本串"/> 3121 </text:p> 3122 </xsl:if> 3123 </table:table-cell> 3124 </xsl:for-each> 3125 </xsl:template> 3126 <!-- add row-group 2.8 --> 3127 <xsl:template name="create-row"> 3128 <xsl:param name="index-value"/> 3129 <xsl:param name="span-value"/> 3130 <xsl:param name="worksheetNo"/> 3131 <xsl:param name="row-value"/> 3132 <xsl:param name="times"/> 3133 <xsl:param name="current-index"/> 3134 <xsl:param name="condition-pos-str"/> 3135 <xsl:element name="table:table-row"> 3136 <xsl:choose> 3137 <xsl:when test="./表:分页符集/表:分页符/@表:行号 = ($index-value + $times - 1)"> 3138 <xsl:choose> 3139 <xsl:when test="($index-value + $times < $current-index) and ($current-index != 0)"> 3140 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob',$worksheetNo)"/></xsl:attribute> 3141 </xsl:when> 3142 <xsl:otherwise> 3143 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob', $worksheetNo, '-', $row-value)"/></xsl:attribute> 3144 </xsl:otherwise> 3145 </xsl:choose> 3146 </xsl:when> 3147 <xsl:otherwise> 3148 <xsl:choose> 3149 <xsl:when test="($index-value + $times < $current-index) and ($current-index != 0)"> 3150 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro',$worksheetNo)"/></xsl:attribute> 3151 </xsl:when> 3152 <xsl:otherwise> 3153 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro', $worksheetNo, '-', $row-value)"/></xsl:attribute> 3154 </xsl:otherwise> 3155 </xsl:choose> 3156 </xsl:otherwise> 3157 </xsl:choose> 3158 <!--chengxiuzhi0617--> 3159 <xsl:if test="./表:工作表内容/表:行[position() = $row-value]/@表:隐藏 = 'true'"> 3160 <xsl:choose> 3161 <xsl:when test="./表:工作表内容/表:行[position() = $row-value]/@表:跨度"> 3162 <xsl:if test="$index-value + $times > ($current-index - 1)"> 3163 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 3164 </xsl:if> 3165 </xsl:when> 3166 <xsl:otherwise> 3167 <xsl:if test="$index-value + $times = $current-index"> 3168 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 3169 </xsl:if> 3170 </xsl:otherwise> 3171 </xsl:choose> 3172 </xsl:if> 3173 <xsl:choose> 3174 <xsl:when test="not(./表:工作表内容/表:行[position() = $row-value]/*)"> 3175 <table:table-cell> 3176 <xsl:for-each select="./表:单元格/表:数据"> 3177 <xsl:choose> 3178 <xsl:when test="@表:数据类型 = 'number'"> 3179 <xsl:attribute name="office:value-type">float</xsl:attribute> 3180 <xsl:attribute name="office:value"><xsl:choose><xsl:when test="@表:数据数值"><xsl:value-of select="@表:数据数值"/></xsl:when><xsl:otherwise><xsl:value-of select="字:句/字:文本串"/></xsl:otherwise></xsl:choose></xsl:attribute> 3181 </xsl:when> 3182 <xsl:when test="@表:数据类型 = 'date'"> 3183 <xsl:attribute name="office:value-type">date</xsl:attribute> 3184 <xsl:attribute name="table:date-value"><xsl:value-of select="@表:数据数值"/></xsl:attribute> 3185 </xsl:when> 3186 <xsl:when test="@表:数据类型 = 'time'"> 3187 <xsl:attribute name="office:value-type">time</xsl:attribute> 3188 <xsl:attribute name="table:time-value"><xsl:value-of select="@表:数据数值"/></xsl:attribute> 3189 </xsl:when> 3190 <xsl:when test="@表:数据类型 = 'boolean'"> 3191 <xsl:attribute name="office:value-type">boolean</xsl:attribute> 3192 <xsl:attribute name="table:boolean-value"><xsl:choose><xsl:when test="字:句/字:文本串 = '1'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 3193 </xsl:when> 3194 <xsl:when test="@表:数据类型 = 'text'"> 3195 <xsl:attribute name="office:value-type">string</xsl:attribute> 3196 <xsl:attribute name="table:string-value"><xsl:value-of select="@表:数据数值"/></xsl:attribute> 3197 </xsl:when> 3198 </xsl:choose> 3199 <xsl:if test="字:句/字:文本串"> 3200 <text:p> 3201 <xsl:value-of select="字:句/字:文本串"/> 3202 </text:p> 3203 </xsl:if> 3204 </xsl:for-each> 3205 </table:table-cell> 3206 </xsl:when> 3207 <xsl:otherwise> 3208 <xsl:choose> 3209 <xsl:when test="$index-value + $times < $current-index"> 3210 <xsl:variable name="current" select="concat('R',($index-value + $times),'C')"/> 3211 <xsl:variable name="col-pos-max"> 3212 <xsl:call-template name="condition-row-col-pos-max"> 3213 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3214 <xsl:with-param name="last-value" select="0"/> 3215 <xsl:with-param name="div-value" select="'C'"/> 3216 </xsl:call-template> 3217 </xsl:variable> 3218 <xsl:choose> 3219 <xsl:when test="contains($condition-pos-str,$current)"> 3220 <xsl:call-template name="get-cell-span-in"> 3221 <xsl:with-param name="row-pos" select="$index-value + $times"/> 3222 <xsl:with-param name="c-start" select="1"/> 3223 <xsl:with-param name="c-end" select="$col-pos-max"/> 3224 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3225 </xsl:call-template> 3226 </xsl:when> 3227 <xsl:otherwise> 3228 <table:table-cell/> 3229 </xsl:otherwise> 3230 </xsl:choose> 3231 </xsl:when> 3232 <xsl:when test="$index-value + $times = $current-index"> 3233 <xsl:apply-templates select="表:工作表内容/表:行[position() = $row-value]" mode="selected"> 3234 <xsl:with-param name="row-pos" select="$index-value + $times"/> 3235 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3236 </xsl:apply-templates> 3237 </xsl:when> 3238 <xsl:otherwise> 3239 <table:table-cell/> 3240 </xsl:otherwise> 3241 </xsl:choose> 3242 </xsl:otherwise> 3243 </xsl:choose> 3244 </xsl:element> 3245 <xsl:if test="$times < $span-value"> 3246 <xsl:call-template name="create-row"> 3247 <xsl:with-param name="index-value" select="$index-value"/> 3248 <xsl:with-param name="span-value" select="$span-value"/> 3249 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 3250 <xsl:with-param name="row-value" select="$row-value"/> 3251 <xsl:with-param name="times" select="$times + 1"/> 3252 <xsl:with-param name="current-index" select="$current-index"/> 3253 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3254 </xsl:call-template> 3255 </xsl:if> 3256 </xsl:template> 3257 <xsl:template name="condition-row-col-pos-max"> 3258 <xsl:param name="condition-pos-str"/> 3259 <xsl:param name="last-value"/> 3260 <xsl:param name="div-value"/> 3261 <xsl:variable name="pre-value"> 3262 <xsl:choose> 3263 <xsl:when test="$div-value = 'R'"> 3264 <xsl:value-of select="substring-before(substring-after($condition-pos-str,$div-value),'C')"/> 3265 </xsl:when> 3266 <xsl:otherwise> 3267 <xsl:value-of select="substring-before(substring-after($condition-pos-str,$div-value),',')"/> 3268 </xsl:otherwise> 3269 </xsl:choose> 3270 </xsl:variable> 3271 <xsl:variable name="end-value"> 3272 <xsl:choose> 3273 <xsl:when test="$last-value < $pre-value"> 3274 <xsl:value-of select="$pre-value"/> 3275 </xsl:when> 3276 <xsl:otherwise> 3277 <xsl:value-of select="$last-value"/> 3278 </xsl:otherwise> 3279 </xsl:choose> 3280 </xsl:variable> 3281 <xsl:choose> 3282 <xsl:when test="contains($condition-pos-str,$div-value)"> 3283 <xsl:call-template name="condition-row-col-pos-max"> 3284 <xsl:with-param name="condition-pos-str" select="substring-after($condition-pos-str,$div-value)"/> 3285 <xsl:with-param name="last-value" select="$end-value"/> 3286 <xsl:with-param name="div-value" select="$div-value"/> 3287 </xsl:call-template> 3288 </xsl:when> 3289 <xsl:otherwise> 3290 <xsl:value-of select="$end-value"/> 3291 </xsl:otherwise> 3292 </xsl:choose> 3293 </xsl:template> 3294 <xsl:template name="break-row-beyond-max"> 3295 <xsl:param name="pos"/> 3296 <xsl:param name="last-value"/> 3297 <xsl:param name="count-value"/> 3298 <xsl:variable name="pre-value" select="./表:分页符集/表:分页符[@表:列号 and (position() = $pos)]/@表:列号"/> 3299 <xsl:variable name="end-value"> 3300 <xsl:choose> 3301 <xsl:when test="$last-value < $pre-value"> 3302 <xsl:value-of select="$pre-value"/> 3303 </xsl:when> 3304 <xsl:otherwise> 3305 <xsl:value-of select="$last-value"/> 3306 </xsl:otherwise> 3307 </xsl:choose> 3308 </xsl:variable> 3309 <xsl:choose> 3310 <xsl:when test="$pos < $count-value"> 3311 <xsl:call-template name="break-row-beyond-max"> 3312 <xsl:with-param name="pos" select="$pos + 1"/> 3313 <xsl:with-param name="last-value" select="$end-value"/> 3314 <xsl:with-param name="count-value" select="$count-value"/> 3315 </xsl:call-template> 3316 </xsl:when> 3317 <xsl:otherwise> 3318 <xsl:value-of select="$end-value"/> 3319 </xsl:otherwise> 3320 </xsl:choose> 3321 </xsl:template> 3322 <xsl:template name="get-row-beyond-last"> 3323 <xsl:param name="index-value"/> 3324 <xsl:param name="worksheetNo"/> 3325 <xsl:param name="condition-pos-str"/> 3326 <xsl:param name="end-pos"/> 3327 <xsl:param name="total-col"/> 3328 <xsl:variable name="current" select="concat('R',$index-value)"/> 3329 <xsl:element name="table:table-row"> 3330 <xsl:choose> 3331 <xsl:when test="./表:分页符集/表:分页符/@行号 = ($index-value - 1)"> 3332 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob',$worksheetNo)"/></xsl:attribute> 3333 </xsl:when> 3334 <xsl:otherwise> 3335 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro',$worksheetNo)"/></xsl:attribute> 3336 </xsl:otherwise> 3337 </xsl:choose> 3338 <xsl:choose> 3339 <xsl:when test="contains($condition-pos-str,$current)"> 3340 <xsl:call-template name="get-cell-span-in"> 3341 <xsl:with-param name="row-pos" select="$index-value"/> 3342 <xsl:with-param name="c-start" select="1"/> 3343 <xsl:with-param name="c-end" select="$total-col"/> 3344 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3345 </xsl:call-template> 3346 </xsl:when> 3347 <xsl:otherwise> 3348 <table:table-cell/> 3349 </xsl:otherwise> 3350 </xsl:choose> 3351 </xsl:element> 3352 <xsl:if test="$index-value < ($end-pos + 1)"> 3353 <xsl:call-template name="get-row-beyond-last"> 3354 <xsl:with-param name="index-value" select="$index-value + 1"/> 3355 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 3356 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3357 <xsl:with-param name="end-pos" select="$end-pos"/> 3358 <xsl:with-param name="total-col" select="$total-col"/> 3359 </xsl:call-template> 3360 </xsl:if> 3361 </xsl:template> 3362 <xsl:template name="get-cell-span-in"> 3363 <xsl:param name="row-pos"/> 3364 <xsl:param name="c-start"/> 3365 <xsl:param name="c-end"/> 3366 <xsl:param name="condition-pos-str"/> 3367 <xsl:variable name="current" select="concat('R',$row-pos,'C',$c-start,',')"/> 3368 <xsl:variable name="style-name"> 3369 <xsl:choose> 3370 <xsl:when test="contains($condition-pos-str,$current)"> 3371 <xsl:variable name="temp-str"> 3372 <xsl:call-template name="condition-str"> 3373 <xsl:with-param name="param-str" select="substring-before($condition-pos-str,$current)"/> 3374 </xsl:call-template> 3375 </xsl:variable> 3376 <xsl:choose> 3377 <xsl:when test="starts-with($temp-str, 'c')"> 3378 <xsl:value-of select="concat('ce', substring-after($temp-str, 'c'))"/> 3379 </xsl:when> 3380 <xsl:when test="starts-with($temp-str, 'v')"> 3381 <xsl:value-of select="concat('val', substring-after($temp-str, 'v'))"/> 3382 </xsl:when> 3383 </xsl:choose> 3384 </xsl:when> 3385 <xsl:otherwise> 3386 <xsl:choose> 3387 <xsl:when test="../表:单元格[position() = position() - 1]/@表:式样引用"> 3388 <xsl:value-of select="../表:单元格[position() = position() - 1]/@表:式样引用 "/> 3389 </xsl:when> 3390 <xsl:when test="../@表:式样引用"> 3391 <xsl:value-of select="../@表:式样引用"/> 3392 </xsl:when> 3393 <xsl:otherwise> 3394 <xsl:value-of select="'Default'"/> 3395 </xsl:otherwise> 3396 </xsl:choose> 3397 </xsl:otherwise> 3398 </xsl:choose> 3399 </xsl:variable> 3400 <xsl:choose> 3401 <xsl:when test="$c-start < $c-end"> 3402 <xsl:call-template name="get-cell-condition-in"> 3403 <xsl:with-param name="style-name" select="$style-name"/> 3404 </xsl:call-template> 3405 <xsl:call-template name="get-cell-span-in"> 3406 <xsl:with-param name="row-pos" select="$row-pos"/> 3407 <xsl:with-param name="c-start" select="$c-start + 1"/> 3408 <xsl:with-param name="c-end" select="$c-end"/> 3409 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3410 </xsl:call-template> 3411 </xsl:when> 3412 <xsl:when test="$c-start = $c-end"> 3413 <xsl:call-template name="get-cell-condition-in"> 3414 <xsl:with-param name="style-name" select="$style-name"/> 3415 </xsl:call-template> 3416 </xsl:when> 3417 <xsl:otherwise> 3418 <table:table-cell/> 3419 </xsl:otherwise> 3420 </xsl:choose> 3421 </xsl:template> 3422 <xsl:template name="get-cell-condition-in"> 3423 <xsl:param name="style-name"/> 3424 <xsl:element name="table:table-cell"> 3425 <xsl:if test="not( contains($style-name, 'Default'))"> 3426 <xsl:choose> 3427 <xsl:when test="starts-with($style-name, 'val')"> 3428 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="$style-name"/></xsl:attribute> 3429 </xsl:when> 3430 <xsl:when test="starts-with($style-name, 'ce')"> 3431 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-name"/></xsl:attribute> 3432 </xsl:when> 3433 <xsl:otherwise> 3434 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-name"/></xsl:attribute> 3435 </xsl:otherwise> 3436 </xsl:choose> 3437 </xsl:if> 3438 <!--chengxiuzhi0617 单元格--> 3439 </xsl:element> 3440 </xsl:template> 3441 <xsl:key match="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:分页符集/表:分页符[@表:列号]" name="ColBreak" use="Column"/> 3442 <xsl:template name="create-default-column"> 3443 <xsl:param name="currentColumn"/> 3444 <xsl:param name="currentColumnNode"/> 3445 <xsl:param name="worksheetNo"/> 3446 <xsl:element name="table:table-column"> 3447 <xsl:attribute name="table:default-cell-style-name"><xsl:call-template name="get-default-cell-style"><xsl:with-param name="currentColumnNode" select="$currentColumnNode"/></xsl:call-template></xsl:attribute> 3448 <xsl:choose> 3449 <xsl:when test="key('ColBreak', $currentColumn)"> 3450 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$worksheetNo)"/></xsl:attribute> 3451 </xsl:when> 3452 <xsl:otherwise> 3453 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('co',$worksheetNo)"/></xsl:attribute> 3454 </xsl:otherwise> 3455 </xsl:choose> 3456 <!--chengxiuzhi0617用key就错--> 3457 </xsl:element> 3458 </xsl:template> 3459 <xsl:template name="get-default-cell-style"> 3460 <xsl:param name="currentColumnNode"/> 3461 <xsl:choose> 3462 <xsl:when test="$currentColumnNode"> 3463 <xsl:choose> 3464 <xsl:when test="$currentColumnNode/@表:式样引用"> 3465 <xsl:value-of select="$currentColumnNode/@表:式样引用"/> 3466 </xsl:when> 3467 <xsl:otherwise>Default</xsl:otherwise> 3468 </xsl:choose> 3469 </xsl:when> 3470 <xsl:otherwise> 3471 <xsl:choose> 3472 <xsl:when test="./表:工作表内容[@表:式样引用]"> 3473 <xsl:value-of select="./表:工作表内容/@表:式样引用"/> 3474 </xsl:when> 3475 <xsl:otherwise>Default</xsl:otherwise> 3476 </xsl:choose> 3477 </xsl:otherwise> 3478 </xsl:choose> 3479 </xsl:template> 3480 <xsl:template match="表:行" mode="selected"> 3481 <xsl:param name="row-pos"/> 3482 <xsl:param name="condition-pos-str"/> 3483 <xsl:choose> 3484 <xsl:when test="表:单元格"> 3485 <xsl:apply-templates select="表:单元格[1]" mode="selected"> 3486 <xsl:with-param name="row-pos" select="$row-pos"/> 3487 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3488 <xsl:with-param name="col-pos-max"> 3489 <xsl:call-template name="condition-row-col-pos-max"> 3490 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3491 <xsl:with-param name="last-value" select="0"/> 3492 <xsl:with-param name="div-value" select="'C'"/> 3493 </xsl:call-template> 3494 </xsl:with-param> 3495 <xsl:with-param name="col-pos-before" select="0"/> 3496 </xsl:apply-templates> 3497 </xsl:when> 3498 <xsl:otherwise> 3499 <xsl:variable name="current" select="concat('R',$row-pos,'C')"/> 3500 <xsl:choose> 3501 <xsl:when test="contains($condition-pos-str,$current)"> 3502 <xsl:call-template name="get-cell-span-in"> 3503 <xsl:with-param name="row-pos" select="$row-pos"/> 3504 <xsl:with-param name="c-start" select="1"/> 3505 <xsl:with-param name="c-end"> 3506 <xsl:call-template name="condition-row-col-pos-max"> 3507 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3508 <xsl:with-param name="last-value" select="0"/> 3509 <xsl:with-param name="div-value" select="'C'"/> 3510 </xsl:call-template> 3511 </xsl:with-param> 3512 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3513 <xsl:with-param name="col-pos" select="1"/> 3514 </xsl:call-template> 3515 </xsl:when> 3516 <xsl:otherwise> 3517 <table:table-cell/> 3518 </xsl:otherwise> 3519 </xsl:choose> 3520 </xsl:otherwise> 3521 </xsl:choose> 3522 </xsl:template> 3523 <xsl:template match="表:单元格" mode="selected"> 3524 <xsl:param name="condition-pos-str"/> 3525 <xsl:param name="col-pos-max"/> 3526 <xsl:param name="col-pos-before"/> 3527 <xsl:param name="row-pos"/> 3528 <xsl:param name="col-repeated" select="1"/> 3529 <xsl:variable name="col-pos"> 3530 <xsl:choose> 3531 <xsl:when test="@表:列号"> 3532 <xsl:choose> 3533 <xsl:when test="@表:合并列数"> 3534 <xsl:value-of select="@表:合并列数 + @表:列号"/> 3535 </xsl:when> 3536 <xsl:otherwise> 3537 <xsl:value-of select="@表:列号"/> 3538 </xsl:otherwise> 3539 </xsl:choose> 3540 </xsl:when> 3541 <xsl:otherwise> 3542 <xsl:choose> 3543 <xsl:when test="@表:合并列数"> 3544 <xsl:value-of select="1 + @表:合并列数 + $col-pos-before"/> 3545 </xsl:when> 3546 <xsl:otherwise> 3547 <xsl:value-of select="1 + $col-pos-before"/> 3548 </xsl:otherwise> 3549 </xsl:choose> 3550 </xsl:otherwise> 3551 </xsl:choose> 3552 </xsl:variable> 3553 <xsl:variable name="next-cell" select="following-sibling::表:单元格[1]"/> 3554 <xsl:variable name="maodian" select="boolean($next-cell/uof:锚点)"/> 3555 <xsl:variable name="cell-is-repeatable" select="not(current()/*) and not($next-cell/*) and not($next-cell/text()) and (@表:式样引用 = $next-cell/@表:式样引用) and not($next-cell/@表:列号)"/> 3556 <xsl:if test="$col-repeated = 1"> 3557 <xsl:if test="@表:列号 != ($col-pos-before + 1)"> 3558 <xsl:call-template name="get-cell-span-in"> 3559 <xsl:with-param name="row-pos" select="$row-pos"/> 3560 <xsl:with-param name="c-start" select="$col-pos-before + 1"/> 3561 <xsl:with-param name="c-end" select="@表:列号 - 1"/> 3562 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3563 </xsl:call-template> 3564 </xsl:if> 3565 <xsl:element name="table:table-cell"> 3566 <xsl:call-template name="create-table-cell-attributes"> 3567 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3568 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3569 <xsl:with-param name="col-pos" select="$col-pos"/> 3570 <xsl:with-param name="row-pos" select="$row-pos"/> 3571 </xsl:call-template> 3572 <xsl:if test="$cell-is-repeatable"> 3573 <xsl:apply-templates select="$next-cell" mode="selected"> 3574 <xsl:with-param name="row-pos" select="$row-pos"/> 3575 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3576 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3577 <xsl:with-param name="col-pos-before" select="$col-pos + 1"/> 3578 <xsl:with-param name="col-repeated" select="$col-repeated + 1"/> 3579 </xsl:apply-templates> 3580 </xsl:if> 3581 <xsl:call-template name="create-table-cell-content"> 3582 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3583 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3584 <xsl:with-param name="col-pos" select="$col-pos"/> 3585 <xsl:with-param name="row-pos" select="$row-pos"/> 3586 </xsl:call-template> 3587 </xsl:element> 3588 <xsl:if test="@表:合并列数"> 3589 <xsl:element name="table:covered-table-cell"> 3590 <xsl:if test="@表:合并列数 > 1"> 3591 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="@表:合并列数"/></xsl:attribute> 3592 </xsl:if> 3593 </xsl:element> 3594 </xsl:if> 3595 </xsl:if> 3596 <xsl:choose> 3597 <xsl:when test="not($cell-is-repeatable and $col-repeated = 1)"> 3598 <xsl:choose> 3599 <xsl:when test="not($cell-is-repeatable) and $col-repeated > 1"> 3600 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$col-repeated"/></xsl:attribute> 3601 </xsl:when> 3602 <xsl:when test="not($next-cell)"> 3603 <xsl:if test="../../../../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 3604 <xsl:call-template name="get-cell-span-in"> 3605 <xsl:with-param name="row-pos" select="$row-pos"/> 3606 <xsl:with-param name="c-start" select="$col-pos"/> 3607 <xsl:with-param name="c-end" select="$col-pos-max"/> 3608 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3609 </xsl:call-template> 3610 </xsl:if> 3611 </xsl:when> 3612 <xsl:when test="not($cell-is-repeatable)"> 3613 <xsl:apply-templates select="$next-cell" mode="selected"> 3614 <xsl:with-param name="row-pos" select="$row-pos"/> 3615 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3616 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3617 <xsl:with-param name="col-pos-before" select="$col-pos"/> 3618 </xsl:apply-templates> 3619 </xsl:when> 3620 <xsl:otherwise> 3621 <xsl:apply-templates select="$next-cell" mode="selected"> 3622 <xsl:with-param name="row-pos" select="$row-pos"/> 3623 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3624 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3625 <xsl:with-param name="col-pos-before" select="$col-pos"/> 3626 <xsl:with-param name="col-repeated" select="$col-repeated + 1"/> 3627 </xsl:apply-templates> 3628 </xsl:otherwise> 3629 </xsl:choose> 3630 </xsl:when> 3631 <xsl:otherwise> 3632 <xsl:if test="$next-cell"> 3633 <xsl:apply-templates select="$next-cell" mode="skip"> 3634 <xsl:with-param name="row-pos" select="$row-pos"/> 3635 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3636 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3637 <xsl:with-param name="col-pos-before" select="$col-pos"/> 3638 </xsl:apply-templates> 3639 </xsl:if> 3640 </xsl:otherwise> 3641 </xsl:choose> 3642 </xsl:template> 3643 <!--Redoffice comment liliang sc0012 06.02.15--> 3644 <!--新增内容--> 3645 <xsl:template match="uof:锚点"> 3646 <xsl:variable name="tuxing1" select="@uof:图形引用"/> 3647 <xsl:choose> 3648 <xsl:when test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]"> 3649 <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='png' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='ipg' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='bmp' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='gif'"> 3650 <xsl:element name="draw:frame"> 3651 <xsl:attribute name="draw:name"><xsl:variable name="pos"><xsl:value-of select="count(preceding::uof:锚点)"/></xsl:variable><xsl:value-of select="concat('图形',$pos)"/></xsl:attribute> 3652 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3653 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 3654 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 3655 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute> 3656 <xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]"> 3657 <xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 3658 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 3659 <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')"> 3660 <xsl:variable name="rotate-angle"> 3661 <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/> 3662 </xsl:variable> 3663 <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute> 3664 </xsl:if> 3665 <xsl:if test="图:文本内容"> 3666 <xsl:apply-templates select="图:文本内容/字:段落"/> 3667 <xsl:apply-templates select="图:文本内容/字:文字表"/> 3668 </xsl:if> 3669 </xsl:for-each> 3670 <xsl:element name="draw:image"> 3671 <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"> 3672 <xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符= $tuxing1]/uof:路径"/></xsl:attribute> 3673 </xsl:if> 3674 <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据"> 3675 <office:binary-data> 3676 <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据"/> 3677 </office:binary-data> 3678 </xsl:if> 3679 </xsl:element> 3680 </xsl:element> 3681 </xsl:if> 3682 </xsl:when> 3683 <xsl:when test="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:文本内容[@图:文本框='true']"> 3684 <draw:text-box text:anchor-type="paragraph"> 3685 <xsl:attribute name="draw:style-name"><xsl:value-of select="$tuxing1"/></xsl:attribute> 3686 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 3687 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute> 3688 <xsl:if test="@uof:x坐标"> 3689 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3690 </xsl:if> 3691 <xsl:if test="@uof:y坐标"> 3692 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 3693 </xsl:if> 3694 <xsl:attribute name="draw:z-index"><xsl:value-of select="/uof:UOF/uof:对象集/图:图形/@图:层次"/></xsl:attribute> 3695 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:文本内容/字:段落"/> 3696 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:文本内容/字:文字表"/> 3697 </draw:text-box> 3698 </xsl:when> 3699 <xsl:otherwise> 3700 <xsl:call-template name="graph"> 3701 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]"/> 3702 <xsl:with-param name="groupx" select="0"/> 3703 <xsl:with-param name="groupy" select="0"/> 3704 </xsl:call-template> 3705 </xsl:otherwise> 3706 </xsl:choose> 3707 </xsl:template> 3708 <xsl:template name="graph"> 3709 <xsl:param name="id"/> 3710 <xsl:param name="groupx"/> 3711 <xsl:param name="groupy"/> 3712 <xsl:for-each select="$id"> 3713 <xsl:variable name="tuxing1"> 3714 <xsl:value-of select="图:预定义图形/图:类别"/> 3715 </xsl:variable> 3716 <xsl:choose> 3717 <xsl:when test="$tuxing1='11'"> 3718 <xsl:call-template name="Rectangle"> 3719 <xsl:with-param name="groupx1" select="$groupx"/> 3720 <xsl:with-param name="groupy1" select="$groupy"/> 3721 </xsl:call-template> 3722 </xsl:when> 3723 <xsl:when test="$tuxing1='19'"> 3724 <xsl:call-template name="Oval"> 3725 <xsl:with-param name="groupx1" select="$groupx"/> 3726 <xsl:with-param name="groupy1" select="$groupy"/> 3727 </xsl:call-template> 3728 </xsl:when> 3729 <xsl:when test="$tuxing1='61'"> 3730 <xsl:call-template name="Line"> 3731 <xsl:with-param name="groupx1" select="$groupx"/> 3732 <xsl:with-param name="groupy1" select="$groupy"/> 3733 </xsl:call-template> 3734 </xsl:when> 3735 <xsl:when test="$tuxing1='64'"> 3736 <xsl:call-template name="Curve"> 3737 <xsl:with-param name="groupx1" select="$groupx"/> 3738 <xsl:with-param name="groupy1" select="$groupy"/> 3739 </xsl:call-template> 3740 </xsl:when> 3741 <xsl:when test="$tuxing1='65'"> 3742 <xsl:call-template name="Freeform"> 3743 <xsl:with-param name="groupx1" select="$groupx"/> 3744 <xsl:with-param name="groupy1" select="$groupy"/> 3745 </xsl:call-template> 3746 </xsl:when> 3747 <xsl:when test="$tuxing1='66'"> 3748 <xsl:call-template name="Scribble"> 3749 <xsl:with-param name="groupx1" select="$groupx"/> 3750 <xsl:with-param name="groupy1" select="$groupy"/> 3751 </xsl:call-template> 3752 </xsl:when> 3753 <xsl:when test="$tuxing1='4'"> 3754 <xsl:element name="draw:g"> 3755 <xsl:variable name="tu"> 3756 <xsl:value-of select="@图:标识符"/> 3757 </xsl:variable> 3758 <xsl:attribute name="draw:style-name"><xsl:value-of select="$tu"/></xsl:attribute> 3759 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 3760 <xsl:variable name="this-group-x"> 3761 <xsl:choose> 3762 <xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:x坐标"> 3763 <xsl:value-of select="key('rel_graphic_name',@图:标识符)/@uof:x坐标"/> 3764 </xsl:when> 3765 <xsl:otherwise> 3766 <xsl:value-of select="number(0)"/> 3767 </xsl:otherwise> 3768 </xsl:choose> 3769 </xsl:variable> 3770 <xsl:variable name="this-group-y"> 3771 <xsl:choose> 3772 <xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:y坐标"> 3773 <xsl:value-of select="key('rel_graphic_name',@图:标识符)/@uof:y坐标"/> 3774 </xsl:when> 3775 <xsl:otherwise> 3776 <xsl:value-of select="number(0)"/> 3777 </xsl:otherwise> 3778 </xsl:choose> 3779 </xsl:variable> 3780 <xsl:variable name="group-x"> 3781 <xsl:value-of select="number($groupx + $this-group-x)"/> 3782 </xsl:variable> 3783 <xsl:variable name="group-y"> 3784 <xsl:value-of select="number($groupy + $this-group-y)"/> 3785 </xsl:variable> 3786 <xsl:call-template name="组合图形"> 3787 <xsl:with-param name="zuheliebiao" select="@图:组合列表"/> 3788 <xsl:with-param name="groupx1" select="$group-x"/> 3789 <xsl:with-param name="groupy1" select="$group-y"/> 3790 </xsl:call-template> 3791 </xsl:element> 3792 </xsl:when> 3793 </xsl:choose> 3794 </xsl:for-each> 3795 </xsl:template> 3796 <xsl:template name="common"> 3797 <xsl:param name="groupx"/> 3798 <xsl:param name="groupy"/> 3799 <xsl:variable name="tuxing"> 3800 <xsl:value-of select="@图:标识符"/> 3801 </xsl:variable> 3802 <xsl:choose> 3803 <xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:x坐标"> 3804 <xsl:for-each select="key('rel_graphic_name',@图:标识符)"> 3805 <xsl:if test="@uof:x坐标"> 3806 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3807 </xsl:if> 3808 <xsl:if test="@uof:y坐标"> 3809 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 3810 </xsl:if> 3811 <xsl:variable name="tuxing1" select="@uof:图形引用"/> 3812 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 3813 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute> 3814 </xsl:for-each> 3815 </xsl:when> 3816 <xsl:otherwise> 3817 <xsl:variable name="zuheweizhi-x"> 3818 <xsl:value-of select="图:组合位置/@图:x坐标"/> 3819 </xsl:variable> 3820 <xsl:variable name="zuheweizhi-y"> 3821 <xsl:value-of select="图:组合位置/@图:y坐标"/> 3822 </xsl:variable> 3823 <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute> 3824 <xsl:attribute name="svg:x"><xsl:value-of select="concat(($groupx + $zuheweizhi-x),$uofUnit)"/></xsl:attribute> 3825 <xsl:attribute name="svg:y"><xsl:value-of select="concat(($groupy + $zuheweizhi-y),$uofUnit)"/></xsl:attribute> 3826 <xsl:attribute name="svg:width"><xsl:value-of select="concat(图:预定义图形/图:属性/图:宽度,$uofUnit)"/></xsl:attribute> 3827 <xsl:attribute name="svg:height"><xsl:value-of select="concat(图:预定义图形/图:属性 /图:高度,$uofUnit)"/></xsl:attribute> 3828 </xsl:otherwise> 3829 </xsl:choose> 3830 <xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 3831 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 3832 <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')"> 3833 <xsl:variable name="rotate-angle"> 3834 <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/> 3835 </xsl:variable> 3836 <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute> 3837 </xsl:if> 3838 <xsl:if test="图:文本内容"> 3839 <xsl:apply-templates select="图:文本内容/字:段落"/> 3840 <xsl:apply-templates select="图:文本内容/字:文字表"/> 3841 </xsl:if> 3842 </xsl:template> 3843 <xsl:template name="组合图形"> 3844 <xsl:param name="zuheliebiao"/> 3845 <xsl:param name="groupx1"/> 3846 <xsl:param name="groupy1"/> 3847 <xsl:variable name="x"> 3848 <xsl:value-of select="$groupx1"/> 3849 </xsl:variable> 3850 <xsl:variable name="y"> 3851 <xsl:value-of select="$groupy1"/> 3852 </xsl:variable> 3853 <xsl:variable name="first-pictures"> 3854 <xsl:value-of select="substring-before($zuheliebiao,',')"/> 3855 </xsl:variable> 3856 <xsl:variable name="other-pictures"> 3857 <xsl:value-of select="substring-after($zuheliebiao,',')"/> 3858 </xsl:variable> 3859 <xsl:choose> 3860 <xsl:when test="contains($other-pictures,',')"> 3861 <xsl:call-template name="graph"> 3862 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/> 3863 <xsl:with-param name="groupx" select="$groupx1"/> 3864 <xsl:with-param name="groupy" select="$groupy1"/> 3865 </xsl:call-template> 3866 <xsl:call-template name="组合图形"> 3867 <xsl:with-param name="zuheliebiao" select="$other-pictures"/> 3868 <xsl:with-param name="groupx1" select="$x"/> 3869 <xsl:with-param name="groupy1" select="$y"/> 3870 </xsl:call-template> 3871 </xsl:when> 3872 <xsl:otherwise> 3873 <xsl:call-template name="graph"> 3874 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/> 3875 <xsl:with-param name="groupx" select="$groupx1"/> 3876 <xsl:with-param name="groupy" select="$groupy1"/> 3877 </xsl:call-template> 3878 <xsl:call-template name="graph"> 3879 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $other-pictures]"/> 3880 <xsl:with-param name="groupx" select="$groupx1"/> 3881 <xsl:with-param name="groupy" select="$groupy1"/> 3882 </xsl:call-template> 3883 </xsl:otherwise> 3884 </xsl:choose> 3885 </xsl:template> 3886 <xsl:template name="Curve"> 3887 <xsl:param name="groupx1"/> 3888 <xsl:param name="groupy1"/> 3889 <xsl:element name="draw:path"> 3890 <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/> 3891 <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/> 3892 <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute> 3893 <xsl:attribute name="svg:d"><xsl:value-of select="图:预定义图形/图:关键点坐标/@图:路径"/></xsl:attribute> 3894 <xsl:call-template name="common"> 3895 <xsl:with-param name="groupx" select="$groupx1"/> 3896 <xsl:with-param name="groupy" select="$groupy1"/> 3897 </xsl:call-template> 3898 </xsl:element> 3899 </xsl:template> 3900 <xsl:template name="Freeform"> 3901 <xsl:param name="groupx1"/> 3902 <xsl:param name="groupy1"/> 3903 <xsl:element name="draw:polygon"> 3904 <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/> 3905 <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/> 3906 <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute> 3907 <xsl:attribute name="draw:points"><xsl:call-template name="drawpoints"><xsl:with-param name="points" select="图:预定义图形/图:关键点坐标/@图:路径"/><xsl:with-param name="value"/></xsl:call-template></xsl:attribute> 3908 <xsl:call-template name="common"> 3909 <xsl:with-param name="groupx" select="$groupx1"/> 3910 <xsl:with-param name="groupy" select="$groupy1"/> 3911 </xsl:call-template> 3912 </xsl:element> 3913 </xsl:template> 3914 <xsl:template name="Scribble"> 3915 <xsl:param name="groupx1"/> 3916 <xsl:param name="groupy1"/> 3917 <xsl:element name="draw:polyline"> 3918 <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/> 3919 <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/> 3920 <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute> 3921 <xsl:attribute name="draw:points"><xsl:call-template name="drawpoints"><xsl:with-param name="points" select="图:预定义图形/图:关键点坐标/@图:路径"/><xsl:with-param name="value"/></xsl:call-template></xsl:attribute> 3922 <xsl:call-template name="common"> 3923 <xsl:with-param name="groupx" select="$groupx1"/> 3924 <xsl:with-param name="groupy" select="$groupy1"/> 3925 </xsl:call-template> 3926 </xsl:element> 3927 </xsl:template> 3928 <xsl:template name="drawpoints"> 3929 <xsl:param name="points"/> 3930 <xsl:param name="value"/> 3931 <xsl:variable name="first-point"> 3932 <xsl:value-of select="substring-before($points,'lineto')"/> 3933 </xsl:variable> 3934 <xsl:variable name="other-points"> 3935 <xsl:value-of select="substring-after($points,'lineto')"/> 3936 </xsl:variable> 3937 <xsl:choose> 3938 <xsl:when test="contains($other-points,'lineto')"> 3939 <xsl:variable name="x-coor"> 3940 <xsl:value-of select="substring-before($first-point,' ') * 1000"/> 3941 </xsl:variable> 3942 <xsl:variable name="y-coor"> 3943 <xsl:value-of select="substring-after($first-point,' ') * 1000"/> 3944 </xsl:variable> 3945 <xsl:variable name="all-points"> 3946 <xsl:value-of select="concat($value,$x-coor,',',$y-coor,' ')"/> 3947 </xsl:variable> 3948 <xsl:call-template name="drawpoints"> 3949 <xsl:with-param name="points" select="$other-points"/> 3950 <xsl:with-param name="value" select="$all-points"/> 3951 </xsl:call-template> 3952 </xsl:when> 3953 <xsl:otherwise> 3954 <xsl:variable name="q-x-coor"> 3955 <xsl:value-of select="substring-before($first-point,' ') * 1000"/> 3956 </xsl:variable> 3957 <xsl:variable name="q-y-coor"> 3958 <xsl:value-of select="substring-after($first-point,' ') * 1000"/> 3959 </xsl:variable> 3960 <xsl:variable name="e-x-coor"> 3961 <xsl:value-of select="substring-before($other-points,' ') * 1000"/> 3962 </xsl:variable> 3963 <xsl:variable name="e-y-coor"> 3964 <xsl:value-of select="substring-after($other-points,' ') * 1000"/> 3965 </xsl:variable> 3966 <xsl:value-of select="concat($value,$q-x-coor,',',$q-y-coor,' ',$e-x-coor,',',$e-y-coor)"/> 3967 </xsl:otherwise> 3968 </xsl:choose> 3969 </xsl:template> 3970 <xsl:template name="Oval"> 3971 <xsl:param name="groupx1"/> 3972 <xsl:param name="groupy1"/> 3973 <xsl:element name="draw:ellipse"> 3974 <xsl:call-template name="common"> 3975 <xsl:with-param name="groupx" select="$groupx1"/> 3976 <xsl:with-param name="groupy" select="$groupy1"/> 3977 </xsl:call-template> 3978 </xsl:element> 3979 </xsl:template> 3980 <xsl:template name="Rectangle"> 3981 <xsl:param name="groupx1"/> 3982 <xsl:param name="groupy1"/> 3983 <xsl:element name="draw:rect"> 3984 <xsl:call-template name="common"> 3985 <xsl:with-param name="groupx" select="$groupx1"/> 3986 <xsl:with-param name="groupy" select="$groupy1"/> 3987 </xsl:call-template> 3988 </xsl:element> 3989 </xsl:template> 3990 <xsl:template name="Line"> 3991 <xsl:param name="groupx1"/> 3992 <xsl:param name="groupy1"/> 3993 <xsl:element name="draw:line"> 3994 <xsl:variable name="tuxing1" select="@图:标识符"/> 3995 <xsl:choose> 3996 <xsl:when test="key('rel_graphic_name',@图:标识符)"> 3997 <xsl:for-each select="key('rel_graphic_name',@图:标识符)"> 3998 <xsl:attribute name="svg:x1"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3999 <xsl:attribute name="svg:y1"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 4000 <xsl:attribute name="svg:x2"><xsl:value-of select="concat((number(@uof:x坐标) + number(@uof:宽度)),$uofUnit)"/></xsl:attribute> 4001 <xsl:attribute name="svg:y2"><xsl:value-of select="concat((number(@uof:y坐标) + number(@uof:高度)),$uofUnit)"/></xsl:attribute> 4002 </xsl:for-each> 4003 </xsl:when> 4004 <xsl:otherwise> 4005 <xsl:variable name="zuheweizhi-x"> 4006 <xsl:value-of select="图:组合位置/@图:x坐标"/> 4007 </xsl:variable> 4008 <xsl:variable name="zuheweizhi-y"> 4009 <xsl:value-of select="图:组合位置/@图:y坐标"/> 4010 </xsl:variable> 4011 <xsl:variable name="hex"> 4012 <xsl:value-of select="concat(number($groupx1 + $zuheweizhi-x),$uofUnit)"/> 4013 </xsl:variable> 4014 <xsl:variable name="hey"> 4015 <xsl:value-of select="concat(number($groupy1 + $zuheweizhi-y),$uofUnit)"/> 4016 </xsl:variable> 4017 <xsl:attribute name="svg:x1"><xsl:value-of select="$hex"/></xsl:attribute> 4018 <xsl:attribute name="svg:y1"><xsl:value-of select="$hey"/></xsl:attribute> 4019 <xsl:attribute name="svg:x2"><xsl:value-of select="concat(($hex + 图:预定义图形/图:属性/图:宽度),$uofUnit)"/></xsl:attribute> 4020 <xsl:attribute name="svg:y2"><xsl:value-of select="concat(($hey + 图:预定义图形/图:属性/图:高度),$uofUnit)"/></xsl:attribute> 4021 </xsl:otherwise> 4022 </xsl:choose> 4023 <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute> 4024 <xsl:attribute name="draw:style-name"><xsl:value-of select="$tuxing1"/></xsl:attribute> 4025 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 4026 <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')"> 4027 <xsl:variable name="rotate-angle"> 4028 <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/> 4029 </xsl:variable> 4030 <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute> 4031 </xsl:if> 4032 <xsl:if test="图:文本内容"> 4033 <xsl:apply-templates select="图:文本内容/字:段落"/> 4034 <xsl:apply-templates select="图:文本内容/字:文字表"/> 4035 </xsl:if> 4036 </xsl:element> 4037 </xsl:template> 4038 <!--Redoffice comment liliang end 06.02.15--> 4039 <xsl:template match="表:单元格" mode="skip"> 4040 <xsl:param name="condition-pos-str"/> 4041 <xsl:param name="col-pos-max"/> 4042 <xsl:param name="col-pos-before"/> 4043 <xsl:param name="row-pos"/> 4044 <xsl:variable name="next-cell" select="following-sibling::表:单元格[1]"/> 4045 <xsl:variable name="cell-is-repeatable" select="not($next-cell/*) and not($next-cell/text()) and (@表:式样引用 = $next-cell/@表:式样引用) and not($next-cell/@表:列号)"/> 4046 <xsl:choose> 4047 <xsl:when test="$cell-is-repeatable"> 4048 <xsl:apply-templates select="$next-cell" mode="skip"> 4049 <xsl:with-param name="row-pos" select="$row-pos"/> 4050 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 4051 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 4052 <xsl:with-param name="col-pos-before" select="$col-pos-before + 1"/> 4053 </xsl:apply-templates> 4054 </xsl:when> 4055 <xsl:otherwise> 4056 <xsl:if test="$next-cell"> 4057 <xsl:apply-templates select="$next-cell" mode="selected"> 4058 <xsl:with-param name="row-pos" select="$row-pos"/> 4059 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 4060 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 4061 <xsl:with-param name="col-pos-before" select="$col-pos-before +1"/> 4062 </xsl:apply-templates> 4063 <!--chengxz0925 no otherwise ,some content cells missed --> 4064 </xsl:if> 4065 <!--chengxz 060418 add if sentence--> 4066 </xsl:otherwise> 4067 </xsl:choose> 4068 </xsl:template> 4069 <!--xsl:template name="create-table-cell-attributes"></xsl:template> 4070<xsl:template name="create-table-cell-content"></xsl:template> 4071<xsl:template name="create-data-content"></xsl:template> 4072<xsl:template name="get-condition-dependent-cell-attributes"></xsl:template--> 4073 <xsl:template name="create-table-cell-attributes"> 4074 <xsl:param name="condition-pos-str"/> 4075 <xsl:param name="col-pos-max"/> 4076 <xsl:param name="col-pos"/> 4077 <xsl:param name="row-pos"/> 4078 <xsl:choose> 4079 <xsl:when test="$condition-pos-str"> 4080 <xsl:call-template name="get-condition-dependent-cell-attributes"> 4081 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 4082 <xsl:with-param name="current-pos-str" select="concat('R',$row-pos,'C',$col-pos,',')"/> 4083 </xsl:call-template> 4084 </xsl:when> 4085 <xsl:otherwise> 4086 <xsl:attribute name="table:style-name"><xsl:choose><xsl:when test="@表:式样引用"><xsl:value-of select="@表:式样引用"/></xsl:when><xsl:when test="../@表:式样引用 and ../@表:式样引用 != ''"><xsl:value-of select="../@表:式样引用"/></xsl:when><xsl:otherwise><xsl:value-of select="'Default'"/></xsl:otherwise></xsl:choose></xsl:attribute> 4087 <!--chengxiuzhi--> 4088 </xsl:otherwise> 4089 </xsl:choose> 4090 <xsl:if test="@表:合并列数 or @表:合并行数"> 4091 <xsl:choose> 4092 <xsl:when test="@表:合并列数"> 4093 <xsl:attribute name="table:number-columns-spanned"><xsl:value-of select="@表:合并列数 + 1"/></xsl:attribute> 4094 </xsl:when> 4095 <xsl:otherwise> 4096 <xsl:attribute name="table:number-columns-spanned">1</xsl:attribute> 4097 </xsl:otherwise> 4098 </xsl:choose> 4099 <xsl:choose> 4100 <xsl:when test="@表:合并行数"> 4101 <xsl:attribute name="table:number-rows-spanned"><xsl:value-of select="@表:合并行数+1"/></xsl:attribute> 4102 </xsl:when> 4103 <xsl:otherwise> 4104 <xsl:attribute name="table:number-rows-spanned">1</xsl:attribute> 4105 </xsl:otherwise> 4106 </xsl:choose> 4107 </xsl:if> 4108 <xsl:if test="表:数据"> 4109 <xsl:if test="表:数据/表:公式"> 4110 <xsl:variable name="calc-formula"> 4111 <xsl:call-template name="translate-expression"> 4112 <xsl:with-param name="cell-row-pos" select="$row-pos"/> 4113 <xsl:with-param name="cell-column-pos" select="$col-pos"/> 4114 <xsl:with-param name="expression" select="表:数据/表:公式"/> 4115 <xsl:with-param name="return-value" select="''"/> 4116 </xsl:call-template> 4117 </xsl:variable> 4118 <xsl:attribute name="table:formula"><xsl:value-of select="$calc-formula"/></xsl:attribute> 4119 </xsl:if> 4120 <!--RedOffice Comment from Zengjh:UOF0020 2006-04-17 Based on Original--> 4121 <xsl:variable name="table-stylename" select="@表:式样引用"/> 4122 <xsl:variable name="data-format"> 4123 <xsl:for-each select="/uof:UOF/uof:式样集/uof:单元格式样"> 4124 <xsl:if test="$table-stylename = ./@ 表:标识符"> 4125 <xsl:value-of select="表:数字格式/@表:分类名称"/> 4126 </xsl:if> 4127 </xsl:for-each> 4128 </xsl:variable> 4129 <xsl:variable name="data-formatcode"> 4130 <xsl:for-each select="/uof:UOF/uof:式样集/uof:单元格式样"> 4131 <xsl:if test="$table-stylename= ./@表:标识符"> 4132 <xsl:value-of select="表:数字格式/@表:格式码"/> 4133 </xsl:if> 4134 </xsl:for-each> 4135 </xsl:variable> 4136 <xsl:choose> 4137 <xsl:when test="表:数据/@表:数据类型 = 'number'"> 4138 <xsl:choose> 4139 <xsl:when test="$data-format = 'percentage' or contains( $data-formatcode, '%')"> 4140 <xsl:attribute name="office:value-type">percentage</xsl:attribute> 4141 </xsl:when> 4142 <xsl:when test="contains($data-format, 'currency')"> 4143 <xsl:attribute name="office:value-type">currency</xsl:attribute> 4144 <xsl:attribute name="office:currency">CNY</xsl:attribute> 4145 </xsl:when> 4146 <xsl:otherwise> 4147 <xsl:attribute name="office:value-type">float</xsl:attribute> 4148 </xsl:otherwise> 4149 </xsl:choose> 4150 <xsl:attribute name="office:value"><xsl:choose><xsl:when test="表:数据/@表:数据数值"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:when><xsl:otherwise><xsl:value-of select="表:数据/字:句/字:文本串"/></xsl:otherwise></xsl:choose></xsl:attribute> 4151 </xsl:when> 4152 <xsl:when test="表:数据/@表:数据类型 = 'date'"> 4153 <xsl:attribute name="office:value-type">date</xsl:attribute> 4154 <xsl:attribute name="office:date-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 4155 </xsl:when> 4156 <xsl:when test="表:数据/@表:数据类型 = 'time'"> 4157 <xsl:attribute name="office:value-type">time</xsl:attribute> 4158 <xsl:attribute name="office:time-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 4159 </xsl:when> 4160 <xsl:when test="表:数据/@表:数据类型 = 'boolean'"> 4161 <xsl:attribute name="office:value-type">boolean</xsl:attribute> 4162 <xsl:attribute name="office:boolean-value"><xsl:choose><xsl:when test="表:数据/字:句/字:文本串 = '1'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 4163 </xsl:when> 4164 <xsl:when test="表:数据/@表:数据类型 = 'text'"> 4165 <xsl:attribute name="office:value-type">string</xsl:attribute> 4166 <xsl:attribute name="office:string-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 4167 </xsl:when> 4168 </xsl:choose> 4169 </xsl:if> 4170 <!-- zhangying ok and /uof:UOF/uof:电子表格/表:公共处理规则/表:数据有效性集--> 4171 <xsl:if test="表:数据"> 4172 <xsl:variable name="validation-name"> 4173 <xsl:call-template name="zyvalidationtest"> 4174 <xsl:with-param name="column-num" select="$col-pos"/> 4175 <xsl:with-param name="row-num" select="$row-pos"/> 4176 <xsl:with-param name="table-name" select="ancestor::表:工作表/@表:名称"/> 4177 <xsl:with-param name="validation-set" select="/uof:UOF/uof:电子表格/表:公用处理规则/表:数据有效性集/表:数据有效性"/> 4178 <xsl:with-param name="validation-num" select="'1'"/> 4179 </xsl:call-template> 4180 </xsl:variable> 4181 <xsl:if test="$validation-name!=''"> 4182 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="$validation-name"/></xsl:attribute> 4183 </xsl:if> 4184 </xsl:if> 4185 <!-- zhangying mod end --> 4186 </xsl:template> 4187 <!-- zhangying o --> 4188 <xsl:template name="zyvalidationtest"> 4189 <xsl:param name="row-num"/> 4190 <xsl:param name="column-num"/> 4191 <xsl:param name="table-name"/> 4192 <xsl:param name="validation-set"/> 4193 <xsl:param name="validation-num"/> 4194 <xsl:if test="$validation-set"> 4195 <xsl:variable name="zone" select="$validation-set/表:区域/text()"/> 4196 <xsl:variable name="success"> 4197 <xsl:choose> 4198 <xsl:when test="$table-name=substring-after(substring-before($zone,'.'),'$')"> 4199 <xsl:variable name="validation-row-left-top" select="substring-before(substring-after(substring-after(substring-after($zone,'$'),'$'),'$'),':')"/> 4200 <xsl:variable name="validation-row-right-bottom" select="substring-after(substring-after(substring-after($zone,':$'),'$'),'$')"/> 4201 <xsl:choose> 4202 <xsl:when test="($row-num >= $validation-row-left-top and $row-num <= $validation-row-right-bottom) or $validation-row-left-top=$validation-row-right-bottom"> 4203 <xsl:variable name="validation-column-left-top"> 4204 <xsl:call-template name="translate-column-char-to-number"> 4205 <xsl:with-param name="string" select="substring-before(substring-after(substring-after($zone,'$'),'$'),'$')"/> 4206 </xsl:call-template> 4207 </xsl:variable> 4208 <xsl:variable name="validation-column-right-bottom"> 4209 <xsl:call-template name="translate-column-char-to-number"> 4210 <xsl:with-param name="string" select="substring-before(substring-after(substring-after($zone,':$'),'$'),'$')"/> 4211 </xsl:call-template> 4212 </xsl:variable> 4213 <xsl:choose> 4214 <xsl:when test="($column-num >= $validation-column-left-top) and ($column-num <= $validation-column-right-bottom)">yes</xsl:when> 4215 <xsl:otherwise/> 4216 </xsl:choose> 4217 </xsl:when> 4218 <xsl:otherwise/> 4219 </xsl:choose> 4220 </xsl:when> 4221 <xsl:otherwise/> 4222 </xsl:choose> 4223 </xsl:variable> 4224 <xsl:choose> 4225 <xsl:when test="$success='yes'"> 4226 <xsl:value-of select="concat('val',$validation-num)"/> 4227 </xsl:when> 4228 <xsl:otherwise> 4229 <xsl:call-template name="zyvalidationtest"> 4230 <xsl:with-param name="table-name" select="$table-name"/> 4231 <xsl:with-param name="row-num" select="$row-num"/> 4232 <xsl:with-param name="column-num" select="$column-num"/> 4233 <xsl:with-param name="validation-set" select="$validation-set[position()!=1]"/> 4234 <xsl:with-param name="validation-num" select="$validation-num + 1"/> 4235 </xsl:call-template> 4236 </xsl:otherwise> 4237 </xsl:choose> 4238 </xsl:if> 4239 </xsl:template> 4240 <!--zhangying mod end --> 4241 <xsl:template name="create-table-cell-content"> 4242 <xsl:param name="condition-pos-str"/> 4243 <xsl:param name="col-pos-max"/> 4244 <xsl:param name="col-pos"/> 4245 <xsl:param name="row-pos"/> 4246 <!--Redoffice comment liliang SC0011 06.02.15 --> 4247 <!--新增内容--> 4248 <xsl:apply-templates select="uof:锚点"/> 4249 <!--Redoffice comment liliang end 06.02.15 --> 4250 <xsl:apply-templates select="表:批注" mode="body"/> 4251 <!--RedOffice Comment from Zengjh:UOF0020 2006-04-26 charts--> 4252 <xsl:apply-templates select="表:图表"/> 4253 <xsl:if test="表:数据/字:句"> 4254 <text:p> 4255 <xsl:call-template name="create-data-content"> 4256 <xsl:with-param name="style-id" select="../../@表:式样引用"/> 4257 </xsl:call-template> 4258 </text:p> 4259 </xsl:if> 4260 <!--chengxz0701多个句不能读入--> 4261 </xsl:template> 4262 <xsl:template name="create-data-content"> 4263 <xsl:param name="style-id" select="@表:式样引用"/> 4264 <xsl:variable name="html-children" select="表:式样引用/descendant-or-self::*[namespace-uri()='http://www.w3.org/TR/REC-html40'][string-length(text()) != 0]"/> 4265 <xsl:choose> 4266 <xsl:when test="$html-children and $html-children != ''"> 4267 <xsl:for-each select="$html-children"> 4268 <text:span text:style-name="{concat($style-id, 'T', count(preceding::表:数据/字:句/字:文本串[child::html:*]), '_', position())}"> 4269 <xsl:copy-of select="text()"/> 4270 </text:span> 4271 </xsl:for-each> 4272 </xsl:when> 4273 <xsl:when test="@表:超链接引用"> 4274 <text:a xlink:href="{@表:超链接引用}"> 4275 <xsl:value-of select="表:数据/字:句/字:文本串"/> 4276 </text:a> 4277 </xsl:when> 4278 <xsl:otherwise> 4279 <xsl:for-each select="表:数据/字:句"> 4280 <xsl:choose> 4281 <xsl:when test="name(descendant::*[1])='字:句属性'"> 4282 <text:span> 4283 <xsl:attribute name="text:style-name"><xsl:value-of select="descendant::*[1]/@字:式样引用"/></xsl:attribute> 4284 <xsl:value-of select="./字:文本串"/> 4285 </text:span> 4286 </xsl:when> 4287 <xsl:otherwise> 4288 <xsl:value-of select="./字:文本串"/> 4289 </xsl:otherwise> 4290 </xsl:choose> 4291 </xsl:for-each> 4292 </xsl:otherwise> 4293 </xsl:choose> 4294 </xsl:template> 4295 <xsl:template name="create-comment-data-content"> 4296 <xsl:param name="style-id" select="@表:式样引用"/> 4297 <xsl:variable name="html-children" select="表:式样引用/descendant-or-self::*[namespace-uri()='http://www.w3.org/TR/REC-html40'][string-length(text()) != 0]"/> 4298 <xsl:choose> 4299 <xsl:when test="$html-children and $html-children != ''"> 4300 <xsl:for-each select="$html-children"> 4301 <text:span text:style-name="{concat($style-id, 'T', count(preceding::图:文本内容/字:段落/字:句/字:文本串[child::html:*]), '_', position())}"> 4302 <xsl:copy-of select="text()"/> 4303 </text:span> 4304 </xsl:for-each> 4305 </xsl:when> 4306 <xsl:when test="@表:超链接引用"> 4307 <text:a xlink:href="{@表:超链接引用}"> 4308 <xsl:value-of select="图:文本内容/字:段落/字:句/字:文本串"/> 4309 </text:a> 4310 </xsl:when> 4311 <xsl:otherwise> 4312 <xsl:value-of select="图:文本内容/字:段落/字:句/字:文本串"/> 4313 </xsl:otherwise> 4314 </xsl:choose> 4315 </xsl:template> 4316 <xsl:template name="get-condition-dependent-cell-attributes"> 4317 <xsl:param name="condition-pos-str"/> 4318 <xsl:param name="current-pos-str"/> 4319 <xsl:variable name="temp-str"> 4320 <xsl:call-template name="condition-str"> 4321 <xsl:with-param name="param-str" select="substring-before($condition-pos-str,$current-pos-str)"/> 4322 </xsl:call-template> 4323 </xsl:variable> 4324 <xsl:variable name="style-name"> 4325 <xsl:choose> 4326 <xsl:when test="contains($condition-pos-str, $current-pos-str) and starts-with($temp-str, 'c')"> 4327 <xsl:value-of select="concat('ce', substring-after($temp-str, 'c'))"/> 4328 </xsl:when> 4329 <xsl:otherwise> 4330 <xsl:choose> 4331 <xsl:when test="@表:式样引用"> 4332 <xsl:value-of select="@表:式样引用"/> 4333 </xsl:when> 4334 <xsl:when test="../@表:式样引用"> 4335 <xsl:value-of select="../@表:式样引用"/> 4336 </xsl:when> 4337 <xsl:otherwise> 4338 <xsl:value-of select="'Default'"/> 4339 </xsl:otherwise> 4340 </xsl:choose> 4341 </xsl:otherwise> 4342 </xsl:choose> 4343 </xsl:variable> 4344 <xsl:if test="not( contains($style-name, 'Default'))"> 4345 <xsl:choose> 4346 <xsl:when test="starts-with($style-name, 'val')"> 4347 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="$style-name"/></xsl:attribute> 4348 </xsl:when> 4349 <xsl:otherwise> 4350 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-name"/></xsl:attribute> 4351 </xsl:otherwise> 4352 </xsl:choose> 4353 </xsl:if> 4354 <xsl:if test="contains($style-name, 'Default')"> 4355 <xsl:variable name="style-nametemp"> 4356 <xsl:choose> 4357 <xsl:when test="@表:式样引用"> 4358 <xsl:value-of select="@表:式样引用"/> 4359 </xsl:when> 4360 <xsl:when test="../@表:式样引用"> 4361 <xsl:value-of select="../@表:式样引用"/> 4362 </xsl:when> 4363 <xsl:otherwise> 4364 <xsl:value-of select="'Default'"/> 4365 </xsl:otherwise> 4366 </xsl:choose> 4367 </xsl:variable> 4368 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-nametemp"/></xsl:attribute> 4369 <!--xsl:attribute name="style:data-style-name"><xsl:value-of select="N104" /></xsl:attribute--> 4370 </xsl:if> 4371 <!--chengxz--> 4372 <xsl:if test="contains($condition-pos-str, $current-pos-str)"> 4373 <xsl:choose> 4374 <xsl:when test="starts-with($temp-str, 'v')"> 4375 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="concat('val', substring-after($temp-str, 'v'))"/></xsl:attribute> 4376 </xsl:when> 4377 <xsl:otherwise> 4378 <xsl:variable name="after-str" select="substring-after($condition-pos-str, $current-pos-str)"/> 4379 <xsl:if test="contains( $after-str, $current-pos-str)"> 4380 <xsl:variable name="temp-str-2"> 4381 <xsl:call-template name="condition-str"> 4382 <xsl:with-param name="param-str" select="substring-before( $after-str,$current-pos-str)"/> 4383 </xsl:call-template> 4384 </xsl:variable> 4385 <xsl:if test="starts-with( $temp-str-2, 'v')"> 4386 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="concat('val', substring-after($temp-str-2, 'v'))"/></xsl:attribute> 4387 </xsl:if> 4388 </xsl:if> 4389 </xsl:otherwise> 4390 </xsl:choose> 4391 </xsl:if> 4392 </xsl:template> 4393 <xsl:template match="表:工作表内容"> 4394 <xsl:variable name="default-column-width"> 4395 <xsl:choose> 4396 <xsl:when test="@表:缺省列宽"> 4397 <xsl:call-template name="convert2cm"> 4398 <xsl:with-param name="value" select="concat(@表:缺省列宽,'pt')"/> 4399 </xsl:call-template> 4400 <xsl:text>cm</xsl:text> 4401 </xsl:when> 4402 <xsl:otherwise>2.096cm</xsl:otherwise> 4403 </xsl:choose> 4404 </xsl:variable> 4405 <xsl:variable name="table-pos"> 4406 <xsl:value-of select="count(../preceding-sibling::表:工作表)+1"/> 4407 </xsl:variable> 4408 <xsl:choose> 4409 <xsl:when test="表:列"> 4410 <xsl:call-template name="get-column-style-name"> 4411 <xsl:with-param name="finishedColumns" select="0"/> 4412 <xsl:with-param name="columnCount" select="count(./表:列)"/> 4413 <xsl:with-param name="currentCount" select="1"/> 4414 <xsl:with-param name="table-pos" select="$table-pos"/> 4415 <xsl:with-param name="default-column-width" select="$default-column-width"/> 4416 </xsl:call-template> 4417 </xsl:when> 4418 </xsl:choose> 4419 <xsl:if test="../表:分页符集/表:分页符[@表:列号]"> 4420 <style:style style:name="{concat('cob',$table-pos)}" style:family="table-column"> 4421 <xsl:element name="style:table-column-properties"> 4422 <xsl:attribute name="style:column-width"><xsl:value-of select="$default-column-width"/></xsl:attribute> 4423 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4424 </xsl:element> 4425 </style:style> 4426 </xsl:if> 4427 <xsl:variable name="default-row-height"> 4428 <xsl:choose> 4429 <xsl:when test="@表:缺省行高"> 4430 <xsl:call-template name="convert2cm"> 4431 <xsl:with-param name="value" select="concat(@表:缺省行高,'pt')"/> 4432 </xsl:call-template> 4433 <xsl:text>cm</xsl:text> 4434 </xsl:when> 4435 <xsl:otherwise>0.503cm</xsl:otherwise> 4436 </xsl:choose> 4437 </xsl:variable> 4438 <style:style style:family="table-row" style:name="{concat('ro', $table-pos)}"> 4439 <style:table-row-properties style:row-height="{$default-row-height}" style:use-optimal-row-height="false"/> 4440 </style:style> 4441 <xsl:if test="表:行"> 4442 <xsl:call-template name="get-row-style-name"> 4443 <xsl:with-param name="lastrowpos" select="0"/> 4444 <xsl:with-param name="row-count" select="count(./表:行)"/> 4445 <xsl:with-param name="currentRow" select="1"/> 4446 <xsl:with-param name="table-pos" select="$table-pos"/> 4447 <xsl:with-param name="default-row-height" select="$default-row-height"/> 4448 </xsl:call-template> 4449 </xsl:if> 4450 <!--RedOffice Comment from Zengjh:UOF0020 2006-06-11 charts--> 4451 <xsl:for-each select="//表:图表"> 4452 <xsl:variable name="chart-current"> 4453 <xsl:number level="any" count="表:图表" format="1"/> 4454 </xsl:variable> 4455 <style:style style:family="graphics" style:name="{concat('chart', $chart-current)}"> 4456 <style:graphic-properties> 4457 <xsl:choose> 4458 <xsl:when test="@表:随动方式='none'"> 4459 <xsl:attribute name="draw:move-protect">true</xsl:attribute> 4460 <xsl:attribute name="draw:size-protect">true</xsl:attribute> 4461 </xsl:when> 4462 <xsl:when test="@表:随动方式='move'"> 4463 <xsl:attribute name="draw:size-protect">true</xsl:attribute> 4464 </xsl:when> 4465 <xsl:otherwise/> 4466 </xsl:choose> 4467 </style:graphic-properties> 4468 </style:style> 4469 </xsl:for-each> 4470 <!--RedOffice comment (Zengjh) end charts--> 4471 <xsl:if test="../表:分页符集/表:分页符[@行号]"> 4472 <style:style style:name="{concat('rob',$table-pos)}" style:family="table-row"> 4473 <xsl:element name="style:table-row-properties"> 4474 <xsl:attribute name="style:row-height"><xsl:value-of select="$default-row-height"/></xsl:attribute> 4475 <xsl:attribute name="style:use-optimal-row-height">false</xsl:attribute> 4476 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4477 </xsl:element> 4478 </style:style> 4479 </xsl:if> 4480 <xsl:element name="style:style"> 4481 <xsl:attribute name="style:name"><xsl:value-of select="concat( 'ta', $table-pos)"/></xsl:attribute> 4482 <xsl:attribute name="style:family">table</xsl:attribute> 4483 <xsl:attribute name="style:master-page-name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="concat( 'TAB_',../@表:名称)"/></xsl:call-template></xsl:attribute> 4484 <xsl:element name="style:properties"> 4485 <xsl:choose> 4486 <xsl:when test="../@表:隐藏 = 'true'"> 4487 <xsl:attribute name="table:display">false</xsl:attribute> 4488 </xsl:when> 4489 <xsl:otherwise> 4490 <xsl:attribute name="table:display">true</xsl:attribute> 4491 </xsl:otherwise> 4492 </xsl:choose> 4493 </xsl:element> 4494 </xsl:element> 4495 </xsl:template> 4496 <xsl:template name="get-column-style-name"> 4497 <xsl:param name="finishedColumns"/> 4498 <xsl:param name="columnCount"/> 4499 <xsl:param name="currentCount"/> 4500 <xsl:param name="table-pos"/> 4501 <xsl:param name="default-column-width"/> 4502 <xsl:if test="$currentCount < ($columnCount + 1)"> 4503 <xsl:variable name="span-value"> 4504 <xsl:choose> 4505 <xsl:when test="./表:列[position() = $currentCount]/@表:跨度"> 4506 <xsl:value-of select="./表:跨度[position() = $currentCount]/@表:跨度 + 1"/> 4507 </xsl:when> 4508 <xsl:otherwise> 4509 <xsl:value-of select="0"/> 4510 </xsl:otherwise> 4511 </xsl:choose> 4512 </xsl:variable> 4513 <xsl:variable name="current-index"> 4514 <xsl:choose> 4515 <xsl:when test="./表:列[position() = $currentCount]/@表:列号"> 4516 <xsl:value-of select="./表:列[position() = $currentCount]/@表:列号 - 1"/> 4517 </xsl:when> 4518 <xsl:otherwise> 4519 <xsl:value-of select="$finishedColumns"/> 4520 </xsl:otherwise> 4521 </xsl:choose> 4522 </xsl:variable> 4523 <xsl:variable name="column-break"> 4524 <xsl:choose> 4525 <xsl:when test="$span-value = 0"> 4526 <xsl:if test="../表:分页符集/表:分页符/表:列 = $current-index"> 4527 <xsl:value-of select="1"/> 4528 </xsl:if> 4529 </xsl:when> 4530 <xsl:otherwise> 4531 <xsl:if test="../表:分页符集/表:分页符[(@表:列号 > $finishedColumns) and (@表:列号 < ($finishedColumns + $span-value))]"> 4532 <xsl:value-of select="1"/> 4533 </xsl:if> 4534 </xsl:otherwise> 4535 </xsl:choose> 4536 </xsl:variable> 4537 <xsl:if test="$column-break = 1"> 4538 <xsl:element name="style:style"> 4539 <xsl:attribute name="style:name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="concat('cob', $table-pos, '-',$currentCount)"/></xsl:call-template></xsl:attribute> 4540 <xsl:attribute name="style:family">table-column</xsl:attribute> 4541 <xsl:element name="style:table-column-properties"> 4542 <xsl:choose> 4543 <xsl:when test="./表:列[position() = $currentCount]/@表:列宽"> 4544 <xsl:attribute name="style:column-width"><xsl:call-template name="convert2cm"><xsl:with-param name="value" select="concat(./表:列[position() = $currentCount]/@表:列宽,'pt')"/></xsl:call-template><xsl:text>cm</xsl:text></xsl:attribute> 4545 </xsl:when> 4546 <xsl:otherwise> 4547 <xsl:attribute name="style:column-width"><xsl:value-of select="$default-column-width"/></xsl:attribute> 4548 </xsl:otherwise> 4549 </xsl:choose> 4550 <xsl:choose> 4551 <xsl:when test="./表:列[position() = $currentCount]/@表:列宽 > 0"> 4552 <xsl:attribute name="style:use-optimal-column-width">false</xsl:attribute> 4553 </xsl:when> 4554 <xsl:otherwise> 4555 <xsl:attribute name="style:use-optimal-column-width">true</xsl:attribute> 4556 </xsl:otherwise> 4557 </xsl:choose> 4558 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4559 </xsl:element> 4560 </xsl:element> 4561 </xsl:if> 4562 <style:style style:name="{concat('co', $table-pos, '-',$currentCount)}" style:family="table-column"> 4563 <xsl:element name="style:table-column-properties"> 4564 <xsl:choose> 4565 <xsl:when test="./表:列[position() = $currentCount]/@表:列宽"> 4566 <xsl:attribute name="style:column-width"><xsl:call-template name="convert2cm"><xsl:with-param name="value" select="concat(./表:列[position() = $currentCount]/@表:列宽,'pt')"/></xsl:call-template><xsl:text>cm</xsl:text></xsl:attribute> 4567 </xsl:when> 4568 <xsl:otherwise> 4569 <xsl:attribute name="style:column-width"><xsl:value-of select="$default-column-width"/></xsl:attribute> 4570 </xsl:otherwise> 4571 </xsl:choose> 4572 <xsl:attribute name="fo:break-before">auto</xsl:attribute> 4573 </xsl:element> 4574 </style:style> 4575 <xsl:if test="$currentCount < $columnCount"> 4576 <xsl:call-template name="get-column-style-name"> 4577 <xsl:with-param name="finishedColumns"> 4578 <xsl:choose> 4579 <xsl:when test="./表:列[position() = $currentCount]/@表:列号"> 4580 <xsl:choose> 4581 <xsl:when test="./表:列[position() = $currentCount]/@表:跨度"> 4582 <xsl:value-of select="./表:列[position() = $currentCount]/@表:列宽 + ./表:列[position() = $currentCount]/@表:跨度"/> 4583 </xsl:when> 4584 <xsl:otherwise> 4585 <xsl:value-of select="./表:列[position() = $currentCount]/@表:列号"/> 4586 </xsl:otherwise> 4587 </xsl:choose> 4588 </xsl:when> 4589 <xsl:otherwise> 4590 <xsl:choose> 4591 <xsl:when test="./表:列[position() = $currentCount]/@表:跨度"> 4592 <xsl:value-of select="$finishedColumns + ./表:列[position() = $currentCount]/@表:跨度 + 1"/> 4593 </xsl:when> 4594 <xsl:otherwise> 4595 <xsl:value-of select="$finishedColumns + 1"/> 4596 </xsl:otherwise> 4597 </xsl:choose> 4598 </xsl:otherwise> 4599 </xsl:choose> 4600 </xsl:with-param> 4601 <xsl:with-param name="columnCount" select="$columnCount"/> 4602 <xsl:with-param name="currentCount" select="$currentCount + 1"/> 4603 <xsl:with-param name="table-pos" select="$table-pos"/> 4604 <xsl:with-param name="default-column-width" select="$default-column-width"/> 4605 </xsl:call-template> 4606 </xsl:if> 4607 </xsl:if> 4608 </xsl:template> 4609 <xsl:template name="get-row-style-name"> 4610 <xsl:param name="lastrowpos"/> 4611 <xsl:param name="row-count"/> 4612 <xsl:param name="currentRow"/> 4613 <xsl:param name="table-pos"/> 4614 <xsl:param name="default-row-height"/> 4615 <xsl:if test="$currentRow < ($row-count + 1)"> 4616 <xsl:variable name="span-value"> 4617 <xsl:choose> 4618 <xsl:when test="./表:行[position() = $currentRow]/@表:行号"> 4619 <xsl:choose> 4620 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4621 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号 - $lastrowpos+ ./表:行[position() = $currentRow]/@表:跨度"/> 4622 </xsl:when> 4623 <xsl:otherwise> 4624 <xsl:value-of select="0"/> 4625 </xsl:otherwise> 4626 </xsl:choose> 4627 </xsl:when> 4628 <xsl:otherwise> 4629 <xsl:choose> 4630 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4631 <xsl:value-of select="./表:行[position() = $currentRow]/@表:跨度 + 1"/> 4632 </xsl:when> 4633 <xsl:otherwise> 4634 <xsl:value-of select="0"/> 4635 </xsl:otherwise> 4636 </xsl:choose> 4637 </xsl:otherwise> 4638 </xsl:choose> 4639 </xsl:variable> 4640 <xsl:variable name="current-index"> 4641 <xsl:choose> 4642 <xsl:when test="./表:行[position() = $currentRow]/@表:行号"> 4643 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号 - 1"/> 4644 </xsl:when> 4645 <xsl:otherwise> 4646 <xsl:value-of select="$lastrowpos"/> 4647 </xsl:otherwise> 4648 </xsl:choose> 4649 </xsl:variable> 4650 <xsl:variable name="row-break"> 4651 <xsl:choose> 4652 <xsl:when test="$span-value = 0"> 4653 <xsl:if test="../表:分页符集/表:分页符/@表:行号 = $current-index"> 4654 <xsl:value-of select="1"/> 4655 </xsl:if> 4656 </xsl:when> 4657 <xsl:otherwise> 4658 <xsl:if test="../表:分页符集/表:分页符[(@表:行号 > $lastrowpos) and (@表:行号 < ($lastrowpos + $span-value))]"> 4659 <xsl:value-of select="1"/> 4660 </xsl:if> 4661 </xsl:otherwise> 4662 </xsl:choose> 4663 </xsl:variable> 4664 <xsl:if test="$row-break = 1"> 4665 <style:style style:name="{concat('rob', $table-pos, '-',$currentRow)}" style:family="table-row"> 4666 <xsl:element name="style:table-row-properties"> 4667 <xsl:choose> 4668 <xsl:when test="./表:行[position() = $currentRow]/@表:行高"> 4669 <xsl:attribute name="style:row-height"><xsl:call-template name="convert2cm"><xsl:with-param name="value" select="concat(./表:行[position() = $currentRow]/@表:行高,'pt')"/></xsl:call-template><xsl:text>cm</xsl:text></xsl:attribute> 4670 </xsl:when> 4671 <xsl:otherwise> 4672 <xsl:attribute name="style:row-height"><xsl:value-of select="$default-row-height"/></xsl:attribute> 4673 </xsl:otherwise> 4674 </xsl:choose> 4675 <xsl:choose> 4676 <xsl:when test="./表:行[position() = $currentRow]/@表:行高 > 0"> 4677 <xsl:attribute name="style:use-optimal-row-height">false</xsl:attribute> 4678 </xsl:when> 4679 <xsl:otherwise> 4680 <xsl:attribute name="style:use-optimal-row-height">true</xsl:attribute> 4681 </xsl:otherwise> 4682 </xsl:choose> 4683 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4684 </xsl:element> 4685 </style:style> 4686 </xsl:if> 4687 <style:style style:name="{concat('ro', $table-pos, '-',$currentRow)}" style:family="table-row"> 4688 <xsl:element name="style:table-row-properties"> 4689 <xsl:choose> 4690 <xsl:when test="./表:行[position() = $currentRow]/@表:行高"> 4691 <xsl:attribute name="style:row-height"><xsl:call-template name="convert2cm"><xsl:with-param name="value" select="concat(./表:行[position() = $currentRow]/@表:行高,'pt')"/></xsl:call-template><xsl:text>cm</xsl:text></xsl:attribute> 4692 </xsl:when> 4693 <xsl:otherwise> 4694 <xsl:attribute name="style:row-height"><xsl:value-of select="$default-row-height"/></xsl:attribute> 4695 </xsl:otherwise> 4696 </xsl:choose> 4697 <xsl:attribute name="style:use-optimal-row-height">true</xsl:attribute> 4698 <xsl:choose> 4699 <xsl:when test="./表:行[position() = $currentRow]/@表:行高 > 0"> 4700 <xsl:attribute name="style:use-optimal-row-height">false</xsl:attribute> 4701 </xsl:when> 4702 <xsl:otherwise> 4703 <xsl:attribute name="style:use-optimal-row-height">true</xsl:attribute> 4704 </xsl:otherwise> 4705 </xsl:choose> 4706 <xsl:attribute name="fo:break-before">auto</xsl:attribute> 4707 </xsl:element> 4708 </style:style> 4709 <xsl:if test="$currentRow < $row-count"> 4710 <xsl:call-template name="get-row-style-name"> 4711 <xsl:with-param name="lastrowpos"> 4712 <xsl:choose> 4713 <xsl:when test="./表:行[position() = $currentRow]/@表:行号"> 4714 <xsl:choose> 4715 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4716 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号 + ./表:行[position() = $currentRow]/@表:跨度"/> 4717 </xsl:when> 4718 <xsl:otherwise> 4719 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号"/> 4720 </xsl:otherwise> 4721 </xsl:choose> 4722 </xsl:when> 4723 <xsl:otherwise> 4724 <xsl:choose> 4725 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4726 <xsl:value-of select="$lastrowpos + ./表:行[position() = $currentRow]/@表:跨度 + 1"/> 4727 </xsl:when> 4728 <xsl:otherwise> 4729 <xsl:value-of select="$lastrowpos + 1"/> 4730 </xsl:otherwise> 4731 </xsl:choose> 4732 </xsl:otherwise> 4733 </xsl:choose> 4734 </xsl:with-param> 4735 <xsl:with-param name="row-count" select="$row-count"/> 4736 <xsl:with-param name="currentRow" select="$currentRow + 1"/> 4737 <xsl:with-param name="table-pos" select="$table-pos"/> 4738 <xsl:with-param name="default-row-height" select="$default-row-height"/> 4739 </xsl:call-template> 4740 </xsl:if> 4741 </xsl:if> 4742 </xsl:template> 4743 <xsl:template name="encode-as-nc-name"> 4744 <xsl:param name="string"/> 4745 <xsl:value-of select="translate($string, '. %()/\+', '')"/> 4746 </xsl:template> 4747 <xsl:key match="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/表:单元格" name="cells" use="@表:式样引用"/> 4748 <xsl:template match="表:数字格式"> 4749 <xsl:variable name="unit-count" select="string-length(@表:格式码) - string-length(translate(@表:格式码,';','')) + 1"/> 4750 <xsl:variable name="style-id" select="../@表:标识符"/> 4751 <xsl:variable name="number-format-name"> 4752 <xsl:choose> 4753 <xsl:when test="@表:分类名称='fraction' or @表:分类名称='scientific'">number</xsl:when> 4754 <xsl:otherwise> 4755 <xsl:value-of select="@表:分类名称"/> 4756 </xsl:otherwise> 4757 </xsl:choose> 4758 </xsl:variable> 4759 <xsl:call-template name="process-number-format"> 4760 <xsl:with-param name="number-format-name" select="$number-format-name"/> 4761 <xsl:with-param name="number-format-unit" select="@表:格式码"/> 4762 <xsl:with-param name="style-id" select="concat($style-id,'F')"/> 4763 <xsl:with-param name="format-type" select="key('cells', $style-id)/表:数据/@表:数据类型"/> 4764 <xsl:with-param name="total-unit" select="$unit-count"/> 4765 <xsl:with-param name="current-unit" select="0"/> 4766 </xsl:call-template> 4767 </xsl:template> 4768 <xsl:template name="process-number-format"> 4769 <xsl:param name="number-format-name"/> 4770 <xsl:param name="number-format-unit"/> 4771 <xsl:param name="style-id"/> 4772 <xsl:param name="format-type"/> 4773 <xsl:param name="total-unit"/> 4774 <xsl:param name="current-unit"/> 4775 <xsl:choose> 4776 <xsl:when test="$current-unit < ($total-unit -1)"> 4777 <xsl:variable name="style-name"> 4778 <xsl:choose> 4779 <xsl:when test="contains(substring-before($number-format-unit,';'),'[$')">currency</xsl:when> 4780 <xsl:when test="contains(substring-before($number-format-unit,';'),'%')">percentage</xsl:when> 4781 <xsl:otherwise>number</xsl:otherwise> 4782 </xsl:choose> 4783 </xsl:variable> 4784 <xsl:element name="{concat('number:',$style-name,'-style')}"> 4785 <xsl:attribute name="style:name"><xsl:value-of select="concat( $style-id, 'P',$current-unit)"/></xsl:attribute> 4786 <xsl:attribute name="style:volatile">true</xsl:attribute> 4787 <xsl:call-template name="general-number"> 4788 <xsl:with-param name="number-format-unit" select="substring-before($number-format-unit,';')"/> 4789 </xsl:call-template> 4790 </xsl:element> 4791 <xsl:call-template name="process-number-format"> 4792 <xsl:with-param name="number-format-name" select="$number-format-name"/> 4793 <xsl:with-param name="number-format-unit" select="substring-after($number-format-unit,';')"/> 4794 <xsl:with-param name="style-id" select="$style-id"/> 4795 <xsl:with-param name="format-type" select="$format-type"/> 4796 <xsl:with-param name="total-unit" select="$total-unit"/> 4797 <xsl:with-param name="current-unit" select="$current-unit +1"/> 4798 </xsl:call-template> 4799 </xsl:when> 4800 <xsl:otherwise> 4801 <xsl:element name="{concat('number:',$number-format-name,'-style')}"> 4802 <xsl:attribute name="style:name"><xsl:value-of select="$style-id"/></xsl:attribute> 4803 <xsl:call-template name="element-attribute"> 4804 <xsl:with-param name="number-format-unit" select="string($number-format-unit)"/> 4805 </xsl:call-template> 4806 <xsl:call-template name="general-number"> 4807 <xsl:with-param name="number-format-unit" select="string($number-format-unit)"/> 4808 </xsl:call-template> 4809 <xsl:call-template name="style-map"> 4810 <xsl:with-param name="number-format-name" select="@表:分类名称"/> 4811 <xsl:with-param name="number-format-unit" select="@表:格式码"/> 4812 <xsl:with-param name="style-id" select="$style-id"/> 4813 <xsl:with-param name="format-type" select="$format-type"/> 4814 <xsl:with-param name="total-unit" select="$total-unit"/> 4815 <xsl:with-param name="current-unit" select="0"/> 4816 </xsl:call-template> 4817 </xsl:element> 4818 </xsl:otherwise> 4819 </xsl:choose> 4820 </xsl:template> 4821 <xsl:template name="style-map"> 4822 <xsl:param name="number-format-name"/> 4823 <xsl:param name="number-format-unit"/> 4824 <xsl:param name="style-id"/> 4825 <xsl:param name="format-type"/> 4826 <xsl:param name="total-unit"/> 4827 <xsl:param name="current-unit"/> 4828 <xsl:if test="$current-unit < ($total-unit -1)"> 4829 <xsl:variable name="stylecondition" select="substring-after(substring-before($number-format-unit,']'),'[')"/> 4830 <style:map style:condition="{$stylecondition}" style:apply-style-name="{concat( $style-id, 'P',$current-unit)}"/> 4831 <xsl:call-template name="style-map"> 4832 <xsl:with-param name="number-format-name" select="$number-format-name"/> 4833 <xsl:with-param name="number-format-unit" select="substring-after($number-format-unit,';')"/> 4834 <xsl:with-param name="style-id" select="$style-id"/> 4835 <xsl:with-param name="format-type" select="$format-type"/> 4836 <xsl:with-param name="total-unit" select="$total-unit"/> 4837 <xsl:with-param name="current-unit" select="$current-unit +1"/> 4838 </xsl:call-template> 4839 </xsl:if> 4840 </xsl:template> 4841 <xsl:template name="general-number"> 4842 <xsl:param name="number-format-unit"/> 4843 <xsl:call-template name="number-format-color"> 4844 <xsl:with-param name="number-format-unit" select="$number-format-unit"/> 4845 </xsl:call-template> 4846 <xsl:call-template name="number-format-currency"> 4847 <xsl:with-param name="number-format-unit" select="$number-format-unit"/> 4848 </xsl:call-template> 4849 <xsl:choose> 4850 <xsl:when test="starts-with($number-format-unit,'"')"> 4851 <number:text> 4852 <xsl:value-of select="substring-before(substring-after($number-format-unit,'"'),'"')"/> 4853 </number:text> 4854 </xsl:when> 4855 <xsl:when test="starts-with($number-format-unit,'@')"> 4856 <number:text-content/> 4857 </xsl:when> 4858 <xsl:when test="starts-with($number-format-unit,'-') or starts-with($number-format-unit,'$') or starts-with($number-format-unit,'¥')"> 4859 <number:text> 4860 <xsl:value-of select="substring($number-format-unit,1,1)"/> 4861 </number:text> 4862 </xsl:when> 4863 <xsl:when test="starts-with($number-format-unit,'YYYY')"> 4864 <number:year number:style="long"/> 4865 </xsl:when> 4866 <xsl:when test="starts-with($number-format-unit,'YY')"> 4867 <number:year number:style="rolong"/> 4868 </xsl:when> 4869 <xsl:when test="starts-with($number-format-unit,'MMMM')"> 4870 <number:month number:style="long" number:textual="true"/> 4871 </xsl:when> 4872 <xsl:when test="starts-with($number-format-unit,'MMM')"> 4873 <number:month number:style="rolong" number:textual="true"/> 4874 </xsl:when> 4875 <xsl:when test="starts-with($number-format-unit,'DD')"> 4876 <number:day number:style="long"/> 4877 </xsl:when> 4878 <xsl:when test="starts-with($number-format-unit,'D')"> 4879 <number:day number:style="rolong"/> 4880 </xsl:when> 4881 <xsl:when test="starts-with($number-format-unit,'[HH]')"> 4882 <number:hours number:style="long"/> 4883 </xsl:when> 4884 <xsl:when test="starts-with($number-format-unit,'HH')"> 4885 <number:hours number:style="long"/> 4886 </xsl:when> 4887 <xsl:when test="starts-with($number-format-unit,'H')"> 4888 <number:hours/> 4889 </xsl:when> 4890 <xsl:when test="starts-with($number-format-unit,'SS.00')"> 4891 <number:seconds number:style="long" number:decimal-places="2"/> 4892 </xsl:when> 4893 <xsl:when test="starts-with($number-format-unit,'SS')"> 4894 <number:seconds number:style="long"/> 4895 </xsl:when> 4896 <xsl:when test="starts-with($number-format-unit,'S')"> 4897 <number:seconds/> 4898 </xsl:when> 4899 <xsl:when test="starts-with($number-format-unit,'AM/PM')"> 4900 <number:am-pm/> 4901 </xsl:when> 4902 <xsl:when test="starts-with($number-format-unit,'NNNN')"> 4903 <number:day-of-week number:style="long"/> 4904 </xsl:when> 4905 <xsl:when test="starts-with($number-format-unit,'NNN')"> 4906 <number:day-of-week/> 4907 </xsl:when> 4908 <xsl:when test="starts-with($number-format-unit,'QQ')"> 4909 <number:quarter number:style="long"/> 4910 </xsl:when> 4911 <xsl:when test="starts-with($number-format-unit,'Q')"> 4912 <number:quarter/> 4913 </xsl:when> 4914 <xsl:when test="starts-with($number-format-unit,'WW')"> 4915 <number:week-of-year/> 4916 </xsl:when> 4917 <xsl:when test="starts-with($number-format-unit,'MM')"> 4918 <xsl:choose> 4919 <xsl:when test="starts-with(substring($number-format-unit,3),'S') or (starts-with(substring($number-format-unit,3),'"') and starts-with(substring-after(substring-after($number-format-unit,'"'),'"'),'S'))"> 4920 <number:minutes number:style="long"/> 4921 </xsl:when> 4922 <xsl:otherwise> 4923 <number:month number:style="long"/> 4924 </xsl:otherwise> 4925 </xsl:choose> 4926 </xsl:when> 4927 <xsl:when test="starts-with($number-format-unit,'M')"> 4928 <xsl:choose> 4929 <xsl:when test="starts-with(substring($number-format-unit,2),'S') or (starts-with(substring($number-format-unit,2),'"') and starts-with(substring-after(substring-after($number-format-unit,'"'),'"'),'S'))"> 4930 <number:minutes/> 4931 </xsl:when> 4932 <xsl:otherwise> 4933 <number:month/> 4934 </xsl:otherwise> 4935 </xsl:choose> 4936 </xsl:when> 4937 <xsl:when test="starts-with($number-format-unit,'#') or starts-with($number-format-unit,'0')"> 4938 <xsl:variable name="digits-part"> 4939 <xsl:choose> 4940 <xsl:when test="contains($number-format-unit,'"')"> 4941 <xsl:value-of select="substring-before($number-format-unit,'"')"/> 4942 </xsl:when> 4943 <xsl:otherwise> 4944 <xsl:value-of select="$number-format-unit"/> 4945 </xsl:otherwise> 4946 </xsl:choose> 4947 </xsl:variable> 4948 <xsl:call-template name="decimal-integer-exponent-fraction"> 4949 <xsl:with-param name="digits-part" select="$digits-part"/> 4950 </xsl:call-template> 4951 </xsl:when> 4952 </xsl:choose> 4953 <xsl:variable name="unit-length"> 4954 <xsl:choose> 4955 <xsl:when test="starts-with($number-format-unit,'[value()')"> 4956 <xsl:value-of select="string-length(substring-before($number-format-unit,']')) +2"/> 4957 </xsl:when> 4958 <xsl:when test="starts-with($number-format-unit,'[NatNum')"> 4959 <xsl:value-of select="string-length(substring-before($number-format-unit,']')) +2"/> 4960 </xsl:when> 4961 <xsl:when test="starts-with($number-format-unit,'[$-804]')">8</xsl:when> 4962 <xsl:when test="starts-with($number-format-unit,'"')"> 4963 <xsl:value-of select="string-length(substring-before(substring-after($number-format-unit,'"'),'"')) +3"/> 4964 </xsl:when> 4965 <xsl:when test="starts-with($number-format-unit,'@')">2</xsl:when> 4966 <xsl:when test="starts-with($number-format-unit,'-') or starts-with($number-format-unit,'$') or starts-with($number-format-unit,'¥')">2</xsl:when> 4967 <xsl:when test="starts-with($number-format-unit,'YYYY')">5</xsl:when> 4968 <xsl:when test="starts-with($number-format-unit,'YY')">3</xsl:when> 4969 <xsl:when test="starts-with($number-format-unit,'MMMM')">5</xsl:when> 4970 <xsl:when test="starts-with($number-format-unit,'MMM')">4</xsl:when> 4971 <xsl:when test="starts-with($number-format-unit,'MM')">3</xsl:when> 4972 <xsl:when test="starts-with($number-format-unit,'M')">2</xsl:when> 4973 <xsl:when test="starts-with($number-format-unit,'DD')">3</xsl:when> 4974 <xsl:when test="starts-with($number-format-unit,'D')">2</xsl:when> 4975 <xsl:when test="starts-with($number-format-unit,'[HH]')">5</xsl:when> 4976 <xsl:when test="starts-with($number-format-unit,'HH')">3</xsl:when> 4977 <xsl:when test="starts-with($number-format-unit,'H')">2</xsl:when> 4978 <xsl:when test="starts-with($number-format-unit,'SS.00')">6</xsl:when> 4979 <xsl:when test="starts-with($number-format-unit,'SS')">3</xsl:when> 4980 <xsl:when test="starts-with($number-format-unit,'S')">2</xsl:when> 4981 <xsl:when test="starts-with($number-format-unit,'AM/PM')">6</xsl:when> 4982 <xsl:when test="starts-with($number-format-unit,'NNNN')">5</xsl:when> 4983 <xsl:when test="starts-with($number-format-unit,'NNN')">4</xsl:when> 4984 <xsl:when test="starts-with($number-format-unit,'QQ')">3</xsl:when> 4985 <xsl:when test="starts-with($number-format-unit,'Q')">2</xsl:when> 4986 <xsl:when test="starts-with($number-format-unit,'WW')">3</xsl:when> 4987 <xsl:when test="starts-with($number-format-unit,'#') or starts-with($number-format-unit,'0')"> 4988 <xsl:choose> 4989 <xsl:when test="contains($number-format-unit,'"')"> 4990 <xsl:value-of select="string-length(substring-before($number-format-unit,'"')) +1"/> 4991 </xsl:when> 4992 <xsl:otherwise> 4993 <xsl:value-of select="string-length($number-format-unit) +1"/> 4994 </xsl:otherwise> 4995 </xsl:choose> 4996 </xsl:when> 4997 <xsl:otherwise>1</xsl:otherwise> 4998 </xsl:choose> 4999 </xsl:variable> 5000 <xsl:if test="$unit-length >1 and $unit-length <=string-length($number-format-unit)"> 5001 <xsl:call-template name="general-number"> 5002 <xsl:with-param name="number-format-unit" select="substring($number-format-unit,$unit-length)"/> 5003 </xsl:call-template> 5004 </xsl:if> 5005 </xsl:template> 5006 <xsl:template name="decimal-integer-exponent-fraction"> 5007 <xsl:param name="digits-part"/> 5008 <xsl:variable name="decimal-digits"> 5009 <xsl:choose> 5010 <xsl:when test="contains($digits-part,'.')"> 5011 <xsl:choose> 5012 <xsl:when test="contains($digits-part,' ')"> 5013 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),' '))"/> 5014 </xsl:when> 5015 <xsl:when test="contains(substring-after($digits-part,'.'),',')"> 5016 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),','))"/> 5017 </xsl:when> 5018 <xsl:when test="contains($digits-part,'E')"> 5019 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),'E'))"/> 5020 </xsl:when> 5021 <xsl:when test="contains($digits-part,'e')"> 5022 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),'e'))"/> 5023 </xsl:when> 5024 <xsl:otherwise> 5025 <xsl:value-of select="string-length(substring-after($digits-part,'.'))"/> 5026 </xsl:otherwise> 5027 </xsl:choose> 5028 </xsl:when> 5029 <xsl:otherwise>0</xsl:otherwise> 5030 </xsl:choose> 5031 </xsl:variable> 5032 <xsl:variable name="decimal-replacement"> 5033 <xsl:choose> 5034 <xsl:when test="contains($digits-part,'.')"> 5035 <xsl:choose> 5036 <xsl:when test="contains($digits-part,' ') and contains(substring-before(substring-after($digits-part,'.'),' '),'#')">true</xsl:when> 5037 <xsl:when test="contains($digits-part,'E') and contains(substring-before(substring-after($digits-part,'.'),'E'),'#')">true</xsl:when> 5038 <xsl:when test="contains($digits-part,'e') and contains(substring-before(substring-after($digits-part,'.'),'e'),'#')">true</xsl:when> 5039 <xsl:otherwise> 5040 <xsl:choose> 5041 <xsl:when test="contains(substring-after($digits-part,'.'),'#')">true</xsl:when> 5042 <xsl:otherwise>false</xsl:otherwise> 5043 </xsl:choose> 5044 </xsl:otherwise> 5045 </xsl:choose> 5046 </xsl:when> 5047 <xsl:otherwise>false</xsl:otherwise> 5048 </xsl:choose> 5049 </xsl:variable> 5050 <xsl:variable name="integer-digits"> 5051 <xsl:choose> 5052 <xsl:when test="contains($digits-part,'.')"> 5053 <xsl:value-of select="string-length(substring-before($digits-part,'.')) - string-length(translate(substring-before($digits-part,'.'),'0',''))"/> 5054 </xsl:when> 5055 <xsl:otherwise> 5056 <xsl:value-of select="string-length($digits-part) - string-length(translate($digits-part,'0',''))"/> 5057 </xsl:otherwise> 5058 </xsl:choose> 5059 </xsl:variable> 5060 <xsl:variable name="factor-digits"> 5061 <xsl:call-template name="display-factor-digits"> 5062 <xsl:with-param name="digits-part" select="$digits-part"/> 5063 <xsl:with-param name="count" select="0"/> 5064 </xsl:call-template> 5065 </xsl:variable> 5066 <xsl:variable name="grouping"> 5067 <xsl:choose> 5068 <xsl:when test="(string-length($digits-part) - string-length(translate($digits-part,',',''))) >$factor-digits">true</xsl:when> 5069 <xsl:otherwise>false</xsl:otherwise> 5070 </xsl:choose> 5071 </xsl:variable> 5072 <xsl:variable name="exponent-digits"> 5073 <xsl:choose> 5074 <xsl:when test="contains($digits-part,'E')"> 5075 <xsl:value-of select="string-length(substring-after($digits-part,'E')) -1"/> 5076 </xsl:when> 5077 <xsl:when test="contains($digits-part,'e')"> 5078 <xsl:value-of select="string-length(substring-after($digits-part,'e')) -1"/> 5079 </xsl:when> 5080 <xsl:otherwise>0</xsl:otherwise> 5081 </xsl:choose> 5082 </xsl:variable> 5083 <xsl:variable name="numerator-digits"> 5084 <xsl:choose> 5085 <xsl:when test="contains($digits-part,' ')"> 5086 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,' '),'/'))"/> 5087 </xsl:when> 5088 <xsl:otherwise>0</xsl:otherwise> 5089 </xsl:choose> 5090 </xsl:variable> 5091 <xsl:variable name="denominator-digits"> 5092 <xsl:choose> 5093 <xsl:when test="contains($digits-part,' ')"> 5094 <xsl:value-of select="string-length(substring-after(substring-after($digits-part,' '),'/'))"/> 5095 </xsl:when> 5096 <xsl:otherwise>0</xsl:otherwise> 5097 </xsl:choose> 5098 </xsl:variable> 5099 <xsl:variable name="number-type"> 5100 <xsl:choose> 5101 <xsl:when test="$exponent-digits >0">number:scientific-number</xsl:when> 5102 <xsl:when test="($numerator-digits >0) or ($denominator-digits >0)">number:fraction</xsl:when> 5103 <xsl:otherwise>number:number</xsl:otherwise> 5104 </xsl:choose> 5105 </xsl:variable> 5106 <xsl:element name="{$number-type}"> 5107 <xsl:if test="$decimal-digits >=0"> 5108 <xsl:attribute name="number:decimal-places"><xsl:value-of select="$decimal-digits"/></xsl:attribute> 5109 </xsl:if> 5110 <xsl:if test="$decimal-replacement='true'"> 5111 <xsl:attribute name="number:decimal-replacement"/> 5112 </xsl:if> 5113 <xsl:if test="$integer-digits >=0"> 5114 <xsl:attribute name="number:min-integer-digits"><xsl:value-of select="$integer-digits"/></xsl:attribute> 5115 </xsl:if> 5116 <xsl:if test="$grouping='true'"> 5117 <xsl:attribute name="number:grouping"><xsl:value-of select="$grouping"/></xsl:attribute> 5118 </xsl:if> 5119 <xsl:if test="$factor-digits >0"> 5120 <xsl:attribute name="number:display-factor"><xsl:choose><xsl:when test="$factor-digits=1">1000</xsl:when><xsl:when test="$factor-digits=2">1000000</xsl:when><xsl:when test="$factor-digits=3">1000000000</xsl:when><xsl:when test="$factor-digits=4">1000000000000</xsl:when><xsl:when test="$factor-digits=5">1000000000000000</xsl:when><xsl:when test="$factor-digits=6">1000000000000000000</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:attribute> 5121 </xsl:if> 5122 <xsl:if test="$exponent-digits >0"> 5123 <xsl:attribute name="number:min-exponent-digits"><xsl:value-of select="$exponent-digits"/></xsl:attribute> 5124 </xsl:if> 5125 <xsl:if test="$numerator-digits >0"> 5126 <xsl:attribute name="number:min-numerator-digits"><xsl:value-of select="$numerator-digits"/></xsl:attribute> 5127 </xsl:if> 5128 <xsl:if test="$denominator-digits >0"> 5129 <xsl:attribute name="number:min-denominator-digits"><xsl:value-of select="$denominator-digits"/></xsl:attribute> 5130 </xsl:if> 5131 </xsl:element> 5132 </xsl:template> 5133 <xsl:template name="number-format-color"> 5134 <xsl:param name="number-format-unit"/> 5135 <xsl:choose> 5136 <xsl:when test="starts-with($number-format-unit,'[Black]')"> 5137 <style:text-properties fo:color="#000000"/> 5138 </xsl:when> 5139 <xsl:when test="starts-with($number-format-unit,'[Blue]')"> 5140 <style:text-properties fo:color="#0000ff"/> 5141 </xsl:when> 5142 <xsl:when test="starts-with($number-format-unit,'[Cyan]')"> 5143 <style:text-properties fo:color="#00ffff"/> 5144 </xsl:when> 5145 <xsl:when test="starts-with($number-format-unit,'[Green]')"> 5146 <style:text-properties fo:color="#00ff00"/> 5147 </xsl:when> 5148 <xsl:when test="starts-with($number-format-unit,'[Magenta]')"> 5149 <style:text-properties fo:color="#ff00ff"/> 5150 </xsl:when> 5151 <xsl:when test="starts-with($number-format-unit,'[Red]')"> 5152 <style:text-properties fo:color="#ff0000"/> 5153 </xsl:when> 5154 <xsl:when test="starts-with($number-format-unit,'[White]')"> 5155 <style:text-properties fo:color="#ffffff"/> 5156 </xsl:when> 5157 <xsl:when test="starts-with($number-format-unit,'[Yellow]')"> 5158 <style:text-properties fo:color="#ffff00"/> 5159 </xsl:when> 5160 </xsl:choose> 5161 <xsl:variable name="unit-length"> 5162 <xsl:choose> 5163 <xsl:when test="starts-with($number-format-unit,'[Black]')">8</xsl:when> 5164 <xsl:when test="starts-with($number-format-unit,'[Blue]')">7</xsl:when> 5165 <xsl:when test="starts-with($number-format-unit,'[Cyan]')">7</xsl:when> 5166 <xsl:when test="starts-with($number-format-unit,'[Green]')">8</xsl:when> 5167 <xsl:when test="starts-with($number-format-unit,'[Magenta]')">10</xsl:when> 5168 <xsl:when test="starts-with($number-format-unit,'[Red]')">6</xsl:when> 5169 <xsl:when test="starts-with($number-format-unit,'[White]')">8</xsl:when> 5170 <xsl:when test="starts-with($number-format-unit,'[Yellow]')">9</xsl:when> 5171 <xsl:otherwise>1</xsl:otherwise> 5172 </xsl:choose> 5173 </xsl:variable> 5174 <xsl:if test="$unit-length >1 and $unit-length <=string-length($number-format-unit)"> 5175 <xsl:call-template name="general-number"> 5176 <xsl:with-param name="number-format-unit" select="substring($number-format-unit,$unit-length)"/> 5177 </xsl:call-template> 5178 </xsl:if> 5179 </xsl:template> 5180 <xsl:template name="number-format-currency"> 5181 <xsl:param name="number-format-unit"/> 5182 <xsl:choose> 5183 <xsl:when test="starts-with($number-format-unit,'[$¥-804]')"> 5184 <number:currency-symbol number:language="zh" number:country="CN">¥</number:currency-symbol> 5185 </xsl:when> 5186 <xsl:when test="starts-with($number-format-unit,'[$$-409]')"> 5187 <number:currency-symbol number:language="en" number:country="US">$</number:currency-symbol> 5188 </xsl:when> 5189 <xsl:when test="starts-with($number-format-unit,'[$$-2C0A]')"> 5190 <number:currency-symbol number:language="es" number:country="AR">$</number:currency-symbol> 5191 </xsl:when> 5192 <xsl:when test="starts-with($number-format-unit,'[$$-C0C]')"> 5193 <number:currency-symbol number:language="fr" number:country="CA">$</number:currency-symbol> 5194 </xsl:when> 5195 <xsl:when test="starts-with($number-format-unit,'[$CNY]')"> 5196 <number:currency-symbol>CNY</number:currency-symbol> 5197 </xsl:when> 5198 <xsl:when test="starts-with($number-format-unit,'[$AFA]')"> 5199 <number:currency-symbol>AFA</number:currency-symbol> 5200 </xsl:when> 5201 <xsl:when test="starts-with($number-format-unit,'CNY')"> 5202 <number:currency-symbol>CNY</number:currency-symbol> 5203 </xsl:when> 5204 <xsl:when test="starts-with($number-format-unit,'CCC')"> 5205 <number:currency-symbol>CCC</number:currency-symbol> 5206 </xsl:when> 5207 </xsl:choose> 5208 <xsl:variable name="unit-length"> 5209 <xsl:choose> 5210 <xsl:when test="starts-with($number-format-unit,'[$¥-804]')">9</xsl:when> 5211 <xsl:when test="starts-with($number-format-unit,'[$$-409]')">9</xsl:when> 5212 <xsl:when test="starts-with($number-format-unit,'[$$-2C0A]')">10</xsl:when> 5213 <xsl:when test="starts-with($number-format-unit,'[$$-C0C]')">9</xsl:when> 5214 <xsl:when test="starts-with($number-format-unit,'[$CNY]')">7</xsl:when> 5215 <xsl:when test="starts-with($number-format-unit,'[$AFA]')">7</xsl:when> 5216 <xsl:when test="starts-with($number-format-unit,'CNY')">4</xsl:when> 5217 <xsl:when test="starts-with($number-format-unit,'CCC')">4</xsl:when> 5218 <xsl:otherwise>1</xsl:otherwise> 5219 </xsl:choose> 5220 </xsl:variable> 5221 <xsl:if test="$unit-length >1 and $unit-length <=string-length($number-format-unit)"> 5222 <xsl:call-template name="general-number"> 5223 <xsl:with-param name="number-format-unit" select="substring($number-format-unit,$unit-length)"/> 5224 </xsl:call-template> 5225 </xsl:if> 5226 </xsl:template> 5227 <xsl:template name="display-factor-digits"> 5228 <xsl:param name="digits-part"/> 5229 <xsl:param name="count"/> 5230 <xsl:choose> 5231 <xsl:when test="not(substring($digits-part,string-length($digits-part),1) =',')"> 5232 <xsl:value-of select="$count"/> 5233 </xsl:when> 5234 <xsl:otherwise> 5235 <xsl:call-template name="display-factor-digits"> 5236 <xsl:with-param name="digits-part" select="substring($digits-part,1,string-length($digits-part) -1)"/> 5237 <xsl:with-param name="count" select="$count +1"/> 5238 </xsl:call-template> 5239 </xsl:otherwise> 5240 </xsl:choose> 5241 </xsl:template> 5242 <xsl:template name="element-attribute"> 5243 <xsl:param name="number-format-unit"/> 5244 <xsl:if test="contains($number-format-unit,'[HH]')"> 5245 <xsl:attribute name="number:truncate-on-overflow">false</xsl:attribute> 5246 </xsl:if> 5247 <xsl:if test="starts-with($number-format-unit,'[NatNum1]')"> 5248 <xsl:attribute name="number:transliteration-format">一</xsl:attribute> 5249 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5250 </xsl:if> 5251 <xsl:if test="starts-with($number-format-unit,'[NatNum2]')"> 5252 <xsl:attribute name="number:transliteration-format">壹</xsl:attribute> 5253 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5254 </xsl:if> 5255 <xsl:if test="starts-with($number-format-unit,'[NatNum3]')"> 5256 <xsl:attribute name="number:transliteration-format">1</xsl:attribute> 5257 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5258 </xsl:if> 5259 <xsl:if test="starts-with($number-format-unit,'[NatNum4]')"> 5260 <xsl:attribute name="number:transliteration-format">一</xsl:attribute> 5261 <xsl:attribute name="number:transliteration-style">long</xsl:attribute> 5262 </xsl:if> 5263 <xsl:if test="starts-with($number-format-unit,'[NatNum5]')"> 5264 <xsl:attribute name="number:transliteration-format">壹</xsl:attribute> 5265 <xsl:attribute name="number:transliteration-style">long</xsl:attribute> 5266 </xsl:if> 5267 <xsl:if test="starts-with($number-format-unit,'[NatNum6]')"> 5268 <xsl:attribute name="number:transliteration-format">1</xsl:attribute> 5269 <xsl:attribute name="number:transliteration-style">long</xsl:attribute> 5270 </xsl:if> 5271 <xsl:if test="starts-with($number-format-unit,'[NatNum7]')"> 5272 <xsl:attribute name="number:transliteration-format">一</xsl:attribute> 5273 <xsl:attribute name="number:transliteration-style">medium</xsl:attribute> 5274 </xsl:if> 5275 <xsl:if test="starts-with($number-format-unit,'[NatNum8]')"> 5276 <xsl:attribute name="number:transliteration-format">壹</xsl:attribute> 5277 <xsl:attribute name="number:transliteration-style">medium</xsl:attribute> 5278 </xsl:if> 5279 <xsl:if test="starts-with($number-format-unit,'[NatNum0]')"> 5280 <xsl:attribute name="number:transliteration-format">1</xsl:attribute> 5281 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5282 </xsl:if> 5283 <xsl:if test="contains($number-format-unit,'[$-804]')"> 5284 <xsl:attribute name="number:transliteration-language">zh</xsl:attribute> 5285 <xsl:attribute name="number:transliteration-country">CN</xsl:attribute> 5286 </xsl:if> 5287 </xsl:template> 5288 <xsl:key name="pz" match="/uof:UOF/uof:对象集/图:图形" use="@图:标识符"/> 5289 <xsl:template match="表:批注" mode="body"> 5290 <xsl:element name="office:annotation"> 5291 <xsl:if test="@表:是否显示 = 'true'"> 5292 <xsl:attribute name="office:display">true</xsl:attribute> 5293 </xsl:if> 5294 <xsl:attribute name="draw:style-name"><xsl:value-of select="uof:锚点/@uof:图形引用"/></xsl:attribute> 5295 <xsl:attribute name="svg:height"><xsl:value-of select="concat(uof:锚点/@uof:高度,$uofUnit)"/></xsl:attribute> 5296 <xsl:attribute name="svg:x"><xsl:value-of select="concat(uof:锚点/@uof:x坐标,$uofUnit)"/></xsl:attribute> 5297 <xsl:attribute name="svg:y"><xsl:value-of select="concat(uof:锚点/@uof:y坐标,$uofUnit)"/></xsl:attribute> 5298 <xsl:attribute name="svg:width"><xsl:value-of select="concat(uof:锚点/@uof:宽度,$uofUnit)"/></xsl:attribute> 5299 <xsl:variable name="w"> 5300 <xsl:value-of select="./uof:锚点/@uof:图形引用"/> 5301 </xsl:variable> 5302 <xsl:choose> 5303 <xsl:when test="key('pz',$w)/图:文本内容/字:句/字:文本串"> 5304 <text:p> 5305 <xsl:for-each select="key('pz',$w)/图:文本内容/字:句"> 5306 <text:span> 5307 <xsl:if test="字:句属性/@字:式样引用"> 5308 <xsl:attribute name="text:style-name"><xsl:value-of select="字:句属性/@字:式样引用"/></xsl:attribute> 5309 </xsl:if> 5310 <xsl:value-of select="字:文本串"/> 5311 </text:span> 5312 </xsl:for-each> 5313 </text:p> 5314 </xsl:when> 5315 </xsl:choose> 5316 <!--xsl:if test="图:文本内容/字:段落/字:句/字:文本串"> 5317 <text:p> 5318 <xsl:call-template name="create-comment-data-content"> 5319 <xsl:with-param name="style-id" select="../@表:式样引用"/> 5320 </xsl:call-template> 5321 </text:p> 5322 </xsl:if--> 5323 </xsl:element> 5324 </xsl:template> 5325 <xsl:template name="auto-filter-condition"> 5326 <xsl:param name="conditon-set"/> 5327 <xsl:param name="zone-left-column-num"/> 5328 <xsl:if test="$conditon-set"> 5329 <xsl:variable name="first-condition" select="$conditon-set[1]"/> 5330 <xsl:element name="table:filter-condition"> 5331 <xsl:attribute name="table:field-number"><xsl:value-of select="$first-condition/@表:列号 - $zone-left-column-num"/></xsl:attribute> 5332 <xsl:attribute name="office:value"><xsl:choose><xsl:when test="$first-condition/表:普通"><xsl:value-of select="$first-condition/表:普通/@表:值"/></xsl:when><xsl:when test="$first-condition/表:自定义"><xsl:value-of select="$first-condition/表:自定义/表:操作条件/表:值"/></xsl:when></xsl:choose></xsl:attribute> 5333 <xsl:variable name="operator"> 5334 <xsl:choose> 5335 <xsl:when test="$first-condition/表:普通"> 5336 <xsl:variable name="general" select="$first-condition/表:普通/@表:类型"/> 5337 <xsl:choose> 5338 <xsl:when test="$general ='topitem'">top values</xsl:when> 5339 </xsl:choose> 5340 </xsl:when> 5341 <xsl:when test="$first-condition/表:自定义"> 5342 <xsl:variable name="operator-text" select="$first-condition/表:自定义/表:操作条件/表:操作码/text()"/> 5343 <xsl:choose> 5344 <xsl:when test="$operator-text ='less than'"><</xsl:when> 5345 <xsl:when test="$operator-text ='greater than'">></xsl:when> 5346 <xsl:when test="$operator-text ='equal to'"> 5347 <xsl:value-of select="'='"/> 5348 </xsl:when> 5349 <xsl:when test="$operator-text ='greater than or equal to'"> 5350 <xsl:value-of select="'>='"/> 5351 </xsl:when> 5352 <xsl:when test="$operator-text ='less than or equal to'"> 5353 <xsl:value-of select="'<='"/> 5354 </xsl:when> 5355 <xsl:when test="$operator-text ='not equal to'"> 5356 <xsl:value-of select="'!='"/> 5357 </xsl:when> 5358 </xsl:choose> 5359 </xsl:when> 5360 </xsl:choose> 5361 </xsl:variable> 5362 <xsl:attribute name="table:operator"><xsl:value-of select="$operator"/></xsl:attribute> 5363 </xsl:element> 5364 <xsl:call-template name="auto-filter-condition"> 5365 <xsl:with-param name="conditon-set" select="$conditon-set[position()!=1]"/> 5366 <xsl:with-param name="zone-left-column-num" select="$zone-left-column-num"/> 5367 </xsl:call-template> 5368 </xsl:if> 5369 </xsl:template> 5370 <xsl:template name="translate-column-char-to-number"> 5371 <xsl:param name="string"/> 5372 <xsl:choose> 5373 <xsl:when test="string-length($string)=1"> 5374 <xsl:call-template name="char-to-number"> 5375 <xsl:with-param name="char" select="$string"/> 5376 </xsl:call-template> 5377 </xsl:when> 5378 <xsl:otherwise> 5379 <xsl:variable name="tens-place"> 5380 <xsl:call-template name="char-to-number"> 5381 <xsl:with-param name="char" select="substring($string,1,1)"/> 5382 </xsl:call-template> 5383 </xsl:variable> 5384 <xsl:variable name="units-place"> 5385 <xsl:call-template name="char-to-number"> 5386 <xsl:with-param name="char" select="substring($string,2,1)"/> 5387 </xsl:call-template> 5388 </xsl:variable> 5389 <xsl:value-of select="$tens-place * 26 + $units-place"/> 5390 </xsl:otherwise> 5391 </xsl:choose> 5392 </xsl:template> 5393 <xsl:template name="char-to-number"> 5394 <xsl:param name="char"/> 5395 <xsl:choose> 5396 <xsl:when test="$char='A'">1</xsl:when> 5397 <xsl:when test="$char='B'">2</xsl:when> 5398 <xsl:when test="$char='C'">3</xsl:when> 5399 <xsl:when test="$char='D'">4</xsl:when> 5400 <xsl:when test="$char='E'">5</xsl:when> 5401 <xsl:when test="$char='F'">6</xsl:when> 5402 <xsl:when test="$char='G'">7</xsl:when> 5403 <xsl:when test="$char='H'">8</xsl:when> 5404 <xsl:when test="$char='I'">9</xsl:when> 5405 <xsl:when test="$char='J'">10</xsl:when> 5406 <xsl:when test="$char='K'">11</xsl:when> 5407 <xsl:when test="$char='L'">12</xsl:when> 5408 <xsl:when test="$char='M'">13</xsl:when> 5409 <xsl:when test="$char='N'">14</xsl:when> 5410 <xsl:when test="$char='O'">15</xsl:when> 5411 <xsl:when test="$char='P'">16</xsl:when> 5412 <xsl:when test="$char='Q'">17</xsl:when> 5413 <xsl:when test="$char='R'">18</xsl:when> 5414 <xsl:when test="$char='S'">19</xsl:when> 5415 <xsl:when test="$char='T'">20</xsl:when> 5416 <xsl:when test="$char='U'">21</xsl:when> 5417 <xsl:when test="$char='V'">22</xsl:when> 5418 <xsl:when test="$char='W'">23</xsl:when> 5419 <xsl:when test="$char='X'">24</xsl:when> 5420 <xsl:when test="$char='Y'">25</xsl:when> 5421 <xsl:when test="$char='Z'">26</xsl:when> 5422 </xsl:choose> 5423 </xsl:template> 5424 <xsl:template name="translate-expression2"> 5425 <xsl:param name="expression2"/> 5426 <xsl:choose> 5427 <xsl:when test="contains($expression2,':')"> 5428 <xsl:variable name="column-one"> 5429 <xsl:value-of select="substring(substring-before($expression2,':'),1,1)"/> 5430 </xsl:variable> 5431 <xsl:variable name="row-one"> 5432 <xsl:value-of select="substring(substring-before($expression2,':'),2)"/> 5433 </xsl:variable> 5434 <xsl:variable name="column-two"> 5435 <xsl:value-of select="substring(substring-after($expression2,':'),1,1)"/> 5436 </xsl:variable> 5437 <xsl:variable name="row-two"> 5438 <xsl:value-of select="substring(substring-after($expression2,':'),2)"/> 5439 </xsl:variable> 5440 <xsl:variable name="column-value1"> 5441 <xsl:call-template name="character-to-column"> 5442 <xsl:with-param name="column-value" select="$column-one"/> 5443 </xsl:call-template> 5444 </xsl:variable> 5445 <xsl:variable name="column-value2"> 5446 <xsl:call-template name="character-to-column"> 5447 <xsl:with-param name="column-value" select="$column-two"/> 5448 </xsl:call-template> 5449 </xsl:variable> 5450 <xsl:value-of select="concat('R',$row-one,'C',$column-value1,':','R',$row-two,'C',$column-value2)"/> 5451 </xsl:when> 5452 <xsl:otherwise> 5453 <xsl:variable name="column-one"> 5454 <xsl:value-of select="substring($expression2,1,1)"/> 5455 </xsl:variable> 5456 <xsl:variable name="row-one"> 5457 <xsl:value-of select="substring($expression2,2)"/> 5458 </xsl:variable> 5459 <xsl:variable name="column-value1"> 5460 <xsl:call-template name="character-to-column"> 5461 <xsl:with-param name="column-value" select="$column-one"/> 5462 </xsl:call-template> 5463 </xsl:variable> 5464 <xsl:value-of select="concat('R',$row-one,'C',$column-value1)"/> 5465 </xsl:otherwise> 5466 </xsl:choose> 5467 </xsl:template> 5468 <xsl:template name="character-to-column"> 5469 <xsl:param name="column-value"/> 5470 <xsl:choose> 5471 <xsl:when test="$column-value= 'A'">1</xsl:when> 5472 <xsl:when test="$column-value= 'B'">2</xsl:when> 5473 <xsl:when test="$column-value= 'C'">3</xsl:when> 5474 <xsl:when test="$column-value= 'D'">4</xsl:when> 5475 <xsl:when test="$column-value= 'E'">5</xsl:when> 5476 <xsl:when test="$column-value= 'F'">6</xsl:when> 5477 <xsl:when test="$column-value= 'G'">7</xsl:when> 5478 <xsl:when test="$column-value= 'H'">8</xsl:when> 5479 <xsl:when test="$column-value= 'I'">9</xsl:when> 5480 <xsl:when test="$column-value= 'J'">10</xsl:when> 5481 <xsl:when test="$column-value= 'K'">11</xsl:when> 5482 <xsl:when test="$column-value= 'L'">12</xsl:when> 5483 <xsl:when test="$column-value= 'M'">13</xsl:when> 5484 <xsl:when test="$column-value= 'N'">14</xsl:when> 5485 <xsl:when test="$column-value= 'O'">15</xsl:when> 5486 <xsl:when test="$column-value= 'P'">16</xsl:when> 5487 <xsl:when test="$column-value= 'Q'">17</xsl:when> 5488 <xsl:when test="$column-value= 'R'">18</xsl:when> 5489 <xsl:when test="$column-value= 'S'">19</xsl:when> 5490 <xsl:when test="$column-value= 'T'">20</xsl:when> 5491 <xsl:when test="$column-value= 'U'">21</xsl:when> 5492 <xsl:when test="$column-value= 'V'">22</xsl:when> 5493 <xsl:when test="$column-value= 'W'">23</xsl:when> 5494 <xsl:when test="$column-value= 'X'">24</xsl:when> 5495 <xsl:when test="$column-value= 'Y'">25</xsl:when> 5496 <xsl:when test="$column-value= 'Z'">26</xsl:when> 5497 <xsl:otherwise/> 5498 </xsl:choose> 5499 </xsl:template> 5500 <!--chenjh end 20050611--> 5501 <xsl:template name="工作表属性"> 5502 <!--office:settings--> 5503 <xsl:variable name="sheetprop" select="/uof:UOF/uof:电子表格/表:主体/表:工作表"/> 5504 <config:config-item-set config:name="ooo:view-settings"> 5505 <xsl:variable name="ratio" select="15"/> 5506 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/表:单元格/表:数据/字:句/字:修订开始"> 5507 <config:config-item-set config:name="TrackedChangesViewSettings"> 5508 <config:config-item config:name="ShowChanges" config:type="boolean">true</config:config-item> 5509 <config:config-item config:name="ShowAcceptedChanges" config:type="boolean">false</config:config-item> 5510 <config:config-item config:name="ShowRejectedChanges" config:type="boolean">false</config:config-item> 5511 <config:config-item config:name="ShowChangesByDatetime" config:type="boolean">false</config:config-item> 5512 <config:config-item config:name="ShowChangesByDatetimeMode" config:type="short">0</config:config-item> 5513 <config:config-item config:name="ShowChangesByDatetimeFirstDatetime" config:type="datetime">2007-01-17T10:56:46.21</config:config-item> 5514 <config:config-item config:name="ShowChangesByDatetimeSecondDatetime" config:type="datetime">2007-01-17T10:56:46.21</config:config-item> 5515 <config:config-item config:name="ShowChangesByAuthor" config:type="boolean">false</config:config-item> 5516 <config:config-item config:name="ShowChangesByAuthorName" config:type="string"/> 5517 <config:config-item config:name="ShowChangesByComment" config:type="boolean">false</config:config-item> 5518 <config:config-item config:name="ShowChangesByCommentText" config:type="string"/> 5519 <config:config-item config:name="ShowChangesByRanges" config:type="boolean">false</config:config-item> 5520 <config:config-item config:name="ShowChangesByRangesList" config:type="string"/> 5521 </config:config-item-set> 5522 </xsl:if> 5523 <config:config-item-map-indexed config:name="Views"> 5524 <config:config-item-map-entry> 5525 <config:config-item config:name="ViewId" config:type="string">View1</config:config-item> 5526 <config:config-item-map-named config:name="Tables"> 5527 <xsl:for-each select="$sheetprop/表:工作表属性/表:视图"> 5528 <xsl:element name="config:config-item-map-entry"> 5529 <xsl:attribute name="config:name"><xsl:value-of select="ancestor::表:工作表/@表:名称"/></xsl:attribute> 5530 <xsl:element name="config:config-item"> 5531 <xsl:attribute name="config:name">HorizontalSplitMode</xsl:attribute> 5532 <xsl:attribute name="config:type">short</xsl:attribute> 5533 <xsl:choose> 5534 <xsl:when test="表:冻结 and 表:冻结/@表:列号!=0">2</xsl:when> 5535 <xsl:when test="表:冻结 and 表:冻结/@表:列号=0">0</xsl:when> 5536 <xsl:when test="表:拆分 and 表:拆分/@表:宽度!=0">1</xsl:when> 5537 <xsl:when test="表:拆分 and 表:拆分/@表:宽度=0">0</xsl:when> 5538 </xsl:choose> 5539 </xsl:element> 5540 <xsl:element name="config:config-item"> 5541 <xsl:attribute name="config:name">VerticalSplitMode</xsl:attribute> 5542 <xsl:attribute name="config:type">short</xsl:attribute> 5543 <xsl:choose> 5544 <xsl:when test="表:冻结 and 表:冻结/@表:行号!=0">2</xsl:when> 5545 <xsl:when test="表:冻结 and 表:冻结/@表:行号=0">0</xsl:when> 5546 <xsl:when test="表:拆分 and 表:拆分/@表:高度!=0">1</xsl:when> 5547 <xsl:when test="表:拆分 and 表:拆分/@表:高度=0">0</xsl:when> 5548 </xsl:choose> 5549 </xsl:element> 5550 <xsl:element name="config:config-item"> 5551 <xsl:attribute name="config:name">HorizontalSplitPosition</xsl:attribute> 5552 <xsl:attribute name="config:type">int</xsl:attribute> 5553 <xsl:choose> 5554 <xsl:when test="表:冻结 and 表:冻结/@表:列号=0">0</xsl:when> 5555 <xsl:when test="表:冻结 and 表:冻结/@表:列号!=0"> 5556 <xsl:value-of select="表:冻结/@表:列号"/> 5557 </xsl:when> 5558 <xsl:when test="表:拆分 and 表:拆分/@表:宽度=0">0</xsl:when> 5559 <xsl:when test="表:拆分 and 表:拆分/@表:宽度!=0"> 5560 <xsl:value-of select="表:拆分/@表:宽度"/> 5561 </xsl:when> 5562 </xsl:choose> 5563 </xsl:element> 5564 <xsl:element name="config:config-item"> 5565 <xsl:attribute name="config:name">VerticalSplitPosition</xsl:attribute> 5566 <xsl:attribute name="config:type">int</xsl:attribute> 5567 <xsl:choose> 5568 <xsl:when test="表:冻结 and 表:冻结/@表:行号=0">0</xsl:when> 5569 <xsl:when test="表:冻结 and 表:冻结/@表:行号!=0"> 5570 <xsl:value-of select="表:冻结/@表:行号"/> 5571 </xsl:when> 5572 <xsl:when test="表:拆分 and 表:拆分/@表:高度=0">0</xsl:when> 5573 <xsl:when test="表:拆分 and 表:拆分/@表:高度!=0"> 5574 <xsl:value-of select="表:拆分/@表:高度"/> 5575 </xsl:when> 5576 </xsl:choose> 5577 </xsl:element> 5578 <xsl:variable name="position-top"> 5579 <xsl:choose> 5580 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:最上行"> 5581 <xsl:value-of select="//表:工作表属性/表:视图/表:最上行"/> 5582 </xsl:when> 5583 <xsl:otherwise>0</xsl:otherwise> 5584 </xsl:choose> 5585 </xsl:variable> 5586 <xsl:variable name="position-left"> 5587 <xsl:choose> 5588 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:最左列"> 5589 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图/表:最左列"/> 5590 </xsl:when> 5591 <xsl:otherwise>0</xsl:otherwise> 5592 </xsl:choose> 5593 </xsl:variable> 5594 <config:config-item config:name="PositionRight" config:type="int"> 5595 <xsl:value-of select="$position-left"/> 5596 </config:config-item> 5597 <config:config-item config:name="PositionBottom" config:type="int"> 5598 <xsl:value-of select="$position-top"/> 5599 </config:config-item> 5600 </xsl:element> 5601 </xsl:for-each> 5602 </config:config-item-map-named> 5603 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:当前视图"> 5604 <xsl:element name="config:config-item"> 5605 <xsl:attribute name="config:name">ShowPageBreakPreview</xsl:attribute> 5606 <xsl:attribute name="config:type">boolean</xsl:attribute> 5607 <xsl:choose> 5608 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:当前视图/@表:类型='normal'">false</xsl:when> 5609 <xsl:otherwise>true</xsl:otherwise> 5610 </xsl:choose> 5611 </xsl:element> 5612 </xsl:if> 5613 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:网格"> 5614 <xsl:element name="config:config-item"> 5615 <xsl:attribute name="config:name">ShowGrid</xsl:attribute> 5616 <xsl:attribute name="config:type">boolean</xsl:attribute> 5617 <xsl:choose> 5618 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:网格/@表:值=1 or $sheetprop/表:工作表属性/表:视图/表:网格/@表:值='true'">true</xsl:when> 5619 <xsl:otherwise>false</xsl:otherwise> 5620 </xsl:choose> 5621 </xsl:element> 5622 </xsl:if> 5623 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:网格颜色"> 5624 <xsl:element name="config:config-item"> 5625 <xsl:attribute name="config:name">GridColor</xsl:attribute> 5626 <xsl:attribute name="config:type">long</xsl:attribute> 5627 <xsl:call-template name="transform-hex-to-decimal"> 5628 <xsl:with-param name="number" select="//表:视图/表:网格颜色/text()"/> 5629 </xsl:call-template> 5630 </xsl:element> 5631 </xsl:if> 5632 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:选中"> 5633 <xsl:element name="config:config-item"> 5634 <xsl:attribute name="config:name">ActiveTable</xsl:attribute> 5635 <xsl:attribute name="config:type">string</xsl:attribute> 5636 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图[表:选中]/ancestor::表:工作表/@表:名称"/> 5637 </xsl:element> 5638 </xsl:if> 5639 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:缩放"> 5640 <config:config-item config:name="ZoomValue" config:type="int"> 5641 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图/表:缩放/text()"/> 5642 </config:config-item> 5643 </xsl:if> 5644 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:分页缩放"> 5645 <config:config-item config:name="PageViewZoomValue" config:type="int"> 5646 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图/表:分页缩放/text()"/> 5647 </config:config-item> 5648 </xsl:if> 5649 </config:config-item-map-entry> 5650 </config:config-item-map-indexed> 5651 </config:config-item-set> 5652 </xsl:template> 5653 <xsl:template name="create-page-master"> 5654 <xsl:param name="worksheetoptions"/> 5655 <xsl:for-each select="$worksheetoptions"> 5656 <xsl:element name="style:page-layout"> 5657 <xsl:attribute name="style:name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="concat( 'pm_', ../@表:名称)"/></xsl:call-template></xsl:attribute> 5658 <xsl:element name="style:page-layout-properties"> 5659 <xsl:if test="表:页面设置/表:纸张/@uof:宽度"> 5660 <xsl:attribute name="fo:page-width"><xsl:value-of select="concat(表:页面设置/表:纸张/@uof:宽度,$uofUnit)"/></xsl:attribute> 5661 </xsl:if> 5662 <xsl:if test="表:页面设置/表:纸张/@uof:高度"> 5663 <xsl:attribute name="fo:page-height"><xsl:value-of select="concat(表:页面设置/表:纸张/@uof:高度,$uofUnit)"/></xsl:attribute> 5664 </xsl:if> 5665 <xsl:if test="表:页面设置/表:纸张方向"> 5666 <xsl:attribute name="style:print-orientation"><xsl:value-of select="表:页面设置/表:纸张方向"/></xsl:attribute> 5667 </xsl:if> 5668 <xsl:if test="表:页面设置/表:缩放"> 5669 <xsl:attribute name="style:scale-to"><xsl:value-of select="concat(表:页面设置/表:缩放,'%')"/></xsl:attribute> 5670 </xsl:if> 5671 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/@表:背景"> 5672 <xsl:attribute name="fo:background-color"><xsl:value-of select="/uof:UOF/uof:电子表格/表:主体/表:工作表/@表:背景"/></xsl:attribute> 5673 </xsl:if> 5674 <xsl:attribute name="style:first-page-number">continue</xsl:attribute> 5675 <xsl:if test="表:页面设置/表:页边距"> 5676 <xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:上,$uofUnit)"/></xsl:attribute> 5677 <xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:下,$uofUnit)"/></xsl:attribute> 5678 <xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:左,$uofUnit)"/></xsl:attribute> 5679 <xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:右,$uofUnit)"/></xsl:attribute> 5680 </xsl:if> 5681 <xsl:if test="表:页面设置/表:打印/@表:先列后行='true'"> 5682 <xsl:attribute name="style:print-page-order">ltr</xsl:attribute> 5683 </xsl:if> 5684 <xsl:if test="表:页面设置/表:垂直对齐/@表:对齐方式"> 5685 <xsl:attribute name="style:table-centering">vertical</xsl:attribute> 5686 </xsl:if> 5687 <xsl:if test="表:页面设置/表:水平对齐/@表:对齐方式"> 5688 <xsl:attribute name="style:table-centering">horizontal</xsl:attribute> 5689 </xsl:if> 5690 </xsl:element> 5691 <xsl:element name="style:header-style"> 5692 <xsl:element name="style:header-footer-properties"> 5693 <xsl:attribute name="fo:min-height">0.75cm</xsl:attribute> 5694 <xsl:choose> 5695 <xsl:when test="表:页面设置/表:页眉页脚/@uof:边距"> 5696 <xsl:attribute name="fo:margin-bottom"><xsl:call-template name="convert2cm"><xsl:with-param name="value" select="concat(表:页面设置/表:页眉页脚/@uof:边距,'pt')"/></xsl:call-template><xsl:text>cm</xsl:text></xsl:attribute> 5697 </xsl:when> 5698 <xsl:otherwise> 5699 <xsl:attribute name="fo:margin-bottom">0.25cm</xsl:attribute> 5700 </xsl:otherwise> 5701 </xsl:choose> 5702 </xsl:element> 5703 </xsl:element> 5704 <xsl:element name="style:footer-style"> 5705 <xsl:element name="style:header-footer-properties"> 5706 <xsl:attribute name="fo:min-height">0.75cm</xsl:attribute> 5707 <xsl:choose> 5708 <xsl:when test="表:页面设置/表:页眉页脚/@uof:边距"> 5709 <xsl:attribute name="fo:margin-top"><xsl:call-template name="convert2cm"><xsl:with-param name="value" select="concat(表:页面设置/表:页眉页脚/@uof:边距,'pt')"/></xsl:call-template><xsl:text>cm</xsl:text></xsl:attribute> 5710 </xsl:when> 5711 <xsl:otherwise> 5712 <xsl:attribute name="fo:margin-top">0.25cm</xsl:attribute> 5713 </xsl:otherwise> 5714 </xsl:choose> 5715 </xsl:element> 5716 </xsl:element> 5717 </xsl:element> 5718 </xsl:for-each> 5719 </xsl:template> 5720 <xsl:template match="字:文本串"> 5721 <xsl:value-of select="text()"/> 5722 </xsl:template> 5723 <xsl:template match="字:换行符"> 5724 <xsl:element name="text:line-break"/> 5725 </xsl:template> 5726 <xsl:template match="字:制表符"> 5727 <xsl:element name="text:tab-stop"/> 5728 </xsl:template> 5729 <xsl:template match="字:区域开始"> 5730 <xsl:if test="@字:类型='hyperlink'"> 5731 <xsl:variable name="superlink" select="//uof:超级链接[@uof:标识符=current()/@字:标识符]"/> 5732 <xsl:element name="text:a"> 5733 <xsl:attribute name="xlink:href"><xsl:value-of select="$superlink/@uof:目标"/></xsl:attribute> 5734 <xsl:value-of select="$superlink/@uof:提示"/> 5735 </xsl:element> 5736 </xsl:if> 5737 </xsl:template> 5738 <xsl:template match="字:空格符"> 5739 <xsl:element name="text:s"> 5740 <xsl:if test="@字:个数"> 5741 <xsl:attribute name="text:c"><xsl:value-of select="@字:个数"/></xsl:attribute> 5742 </xsl:if> 5743 </xsl:element> 5744 </xsl:template> 5745 <xsl:template name="create-page-header-footer-text-p"> 5746 <xsl:param name="paragragh-set"/> 5747 <xsl:choose> 5748 <xsl:when test="$paragragh-set"> 5749 <xsl:element name="text:p"> 5750 <xsl:for-each select="$paragragh-set[1]/字:句"> 5751 <xsl:choose> 5752 <xsl:when test="not(字:句属性)"> 5753 <xsl:apply-templates select="字:文本串 | 字:空格符 | 字:换行符"/> 5754 </xsl:when> 5755 <xsl:when test="字:句属性"> 5756 <xsl:element name="text:span"> 5757 <xsl:attribute name="text:style-name"><xsl:value-of select="//uof:句式样[@字:标识符=current()/字:句属性/@字:式样引用]/@字:名称"/></xsl:attribute> 5758 <xsl:apply-templates select="字:空格符 | 字:文本串 | 字:换行符 | 字:制表符"/> 5759 </xsl:element> 5760 </xsl:when> 5761 </xsl:choose> 5762 </xsl:for-each> 5763 </xsl:element> 5764 <xsl:call-template name="create-page-header-footer-text-p"> 5765 <xsl:with-param name="paragragh-set" select="$paragragh-set[position()!=1]"/> 5766 </xsl:call-template> 5767 </xsl:when> 5768 <xsl:otherwise/> 5769 </xsl:choose> 5770 </xsl:template> 5771 <!--Redoffice comment lilliang SC0016 06.02.16 --> 5772 <!--新增内容--> 5773 <xsl:template match="字:段落"> 5774 <xsl:element name="text:p"> 5775 <xsl:choose> 5776 <xsl:when test="字:段落属性"> 5777 <xsl:attribute name="text:style-name">P<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/></xsl:attribute> 5778 </xsl:when> 5779 <xsl:when test="generate-id(ancestor::字:主体/descendant::字:段落[1]) = generate-id(.)"> 5780 <!-- create the leading paragraph style name in one section for master page style application, glu --> 5781 <xsl:variable name="paragraph-number"> 5782 <xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/> 5783 </xsl:variable> 5784 <xsl:attribute name="text:style-name">P<xsl:value-of select="number($paragraph-number)"/>_1</xsl:attribute> 5785 </xsl:when> 5786 <xsl:when test="not(字:段落属性) and (descendant::字:分栏符 or ancestor::字:分节/descendant::字:节属性[字:分栏/@字:栏数 > 1])"> 5787 <xsl:attribute name="text:style-name">ColumnBreakPara</xsl:attribute> 5788 </xsl:when> 5789 <xsl:when test="字:句"> 5790 <xsl:apply-templates select="字:句/字:文本串"/> 5791 </xsl:when> 5792 </xsl:choose> 5793 </xsl:element> 5794 </xsl:template> 5795 <!--Redoffice comment liliang end 06.02.16--> 5796 <xsl:template name="create-master-styles"> 5797 <xsl:param name="worksheetoptions"/> 5798 <xsl:for-each select="$worksheetoptions"> 5799 <xsl:element name="style:master-page"> 5800 <xsl:attribute name="style:name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="concat( 'TAB_', ../@表:名称)"/></xsl:call-template></xsl:attribute> 5801 <!--xsl:attribute name="style:page-layout-name"--> 5802 <xsl:attribute name="style:page-layout-name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="concat( 'pm_', ../@表:名称)"/></xsl:call-template></xsl:attribute> 5803 <xsl:attribute name="style:display-name"><xsl:value-of select="concat( 'PageStyle_', ../@表:名称)"/></xsl:attribute> 5804 <style:header> 5805 <xsl:for-each select="表:页面设置/表:页眉页脚"> 5806 <xsl:variable name="temp" select="@表:位置"/> 5807 <xsl:choose> 5808 <xsl:when test="contains($temp,'header')"> 5809 <xsl:if test="字:段落"> 5810 <xsl:choose> 5811 <xsl:when test="@表:位置='headerleft'"> 5812 <xsl:element name="style:region-left"> 5813 <xsl:call-template name="create-page-header-footer-text-p"> 5814 <xsl:with-param name="paragragh-set" select="字:段落"/> 5815 </xsl:call-template> 5816 </xsl:element> 5817 </xsl:when> 5818 <xsl:when test="@表:位置='headercenter'"> 5819 <xsl:element name="style:region-center"> 5820 <xsl:call-template name="create-page-header-footer-text-p"> 5821 <xsl:with-param name="paragragh-set" select="字:段落"/> 5822 </xsl:call-template> 5823 </xsl:element> 5824 </xsl:when> 5825 <xsl:when test="@表:位置='headerright'"> 5826 <xsl:element name="style:region-right"> 5827 <xsl:call-template name="create-page-header-footer-text-p"> 5828 <xsl:with-param name="paragragh-set" select="字:段落"/> 5829 </xsl:call-template> 5830 </xsl:element> 5831 </xsl:when> 5832 <xsl:otherwise/> 5833 </xsl:choose> 5834 </xsl:if> 5835 </xsl:when> 5836 <xsl:otherwise/> 5837 </xsl:choose> 5838 </xsl:for-each> 5839 </style:header> 5840 <style:footer> 5841 <xsl:for-each select="表:页面设置/表:页眉页脚"> 5842 <xsl:variable name="temp" select="@表:位置"/> 5843 <xsl:choose> 5844 <xsl:when test="contains($temp,'footer')"> 5845 <xsl:if test="字:段落"> 5846 <xsl:choose> 5847 <xsl:when test="@表:位置='footerleft'"> 5848 <xsl:element name="style:region-left"> 5849 <xsl:call-template name="create-page-header-footer-text-p"> 5850 <xsl:with-param name="paragragh-set" select="字:段落"/> 5851 </xsl:call-template> 5852 </xsl:element> 5853 </xsl:when> 5854 <xsl:when test="@表:位置='footercenter'"> 5855 <xsl:element name="style:region-center"> 5856 <xsl:call-template name="create-page-header-footer-text-p"> 5857 <xsl:with-param name="paragragh-set" select="字:段落"/> 5858 </xsl:call-template> 5859 </xsl:element> 5860 </xsl:when> 5861 <xsl:when test="@表:位置='footerright'"> 5862 <xsl:element name="style:region-right"> 5863 <xsl:call-template name="create-page-header-footer-text-p"> 5864 <xsl:with-param name="paragragh-set" select="字:段落"/> 5865 </xsl:call-template> 5866 </xsl:element> 5867 </xsl:when> 5868 <xsl:otherwise/> 5869 </xsl:choose> 5870 </xsl:if> 5871 </xsl:when> 5872 <xsl:otherwise/> 5873 </xsl:choose> 5874 </xsl:for-each> 5875 </style:footer> 5876 </xsl:element> 5877 </xsl:for-each> 5878 </xsl:template> 5879 <!--xsl:template name="create-page-master"> 5880 </xsl:template> 5881 <xsl:template match="表:页面设置"> 5882 </xsl:template> 5883 5884 <xsl:template name="create-master-styles"> 5885 </xsl:template> 5886 <xsl:template name="表:工作表属性"> 5887 </xsl:template--> 5888 <!--00000000000--> 5889 <xsl:template match="uof:元数据"> 5890 <office:meta> 5891 <xsl:if test="uof:创建应用程序"> 5892 <meta:generator> 5893 <xsl:value-of select="uof:创建应用程序"/> 5894 </meta:generator> 5895 </xsl:if> 5896 <xsl:if test="uof:标题"> 5897 <dc:title> 5898 <xsl:value-of select="uof:标题"/> 5899 </dc:title> 5900 </xsl:if> 5901 <xsl:if test="uof:摘要"> 5902 <dc:description> 5903 <xsl:value-of select="uof:摘要"/> 5904 </dc:description> 5905 </xsl:if> 5906 <xsl:if test="uof:主题"> 5907 <dc:subject> 5908 <xsl:value-of select="uof:主题"/> 5909 </dc:subject> 5910 </xsl:if> 5911 <xsl:if test="uof:作者"> 5912 <meta:initial-creator> 5913 <xsl:value-of select="uof:作者"/> 5914 </meta:initial-creator> 5915 </xsl:if> 5916 <xsl:if test="uof:创建日期"> 5917 <meta:creation-date> 5918 <xsl:value-of select="uof:创建日期"/> 5919 </meta:creation-date> 5920 </xsl:if> 5921 <xsl:if test="uof:最后作者"> 5922 <dc:creator> 5923 <xsl:value-of select="uof:最后作者"/> 5924 </dc:creator> 5925 </xsl:if> 5926 <xsl:if test="uof:编辑时间"> 5927 <meta:editing-duration> 5928 <xsl:value-of select="uof:编辑时间"/> 5929 </meta:editing-duration> 5930 </xsl:if> 5931 <dc:language/> 5932 <meta:keyword> 5933 <xsl:value-of select="uof:关键字集/uof:关键字"/> 5934 </meta:keyword> 5935 <xsl:if test="uof:编辑次数"> 5936 <meta:editing-cycles> 5937 <xsl:value-of select="uof:编辑次数"/> 5938 </meta:editing-cycles> 5939 </xsl:if> 5940 <xsl:if test="uof:分类"> 5941 <meta:user-defined meta:name="Category"> 5942 <xsl:value-of select="uof:分类"/> 5943 </meta:user-defined> 5944 </xsl:if> 5945 <xsl:if test="uof:经理名称"> 5946 <meta:user-defined meta:name="Manager"> 5947 <xsl:value-of select="uof:经理名称"/> 5948 </meta:user-defined> 5949 </xsl:if> 5950 <xsl:if test="uof:公司名称"> 5951 <meta:user-defined meta:name="Company"> 5952 <xsl:value-of select="uof:公司名称"/> 5953 </meta:user-defined> 5954 </xsl:if> 5955 <xsl:apply-templates select="uof:用户自定义元数据集"/> 5956 </office:meta> 5957 </xsl:template> 5958 <xsl:template match="uof:用户自定义元数据集"> 5959 <xsl:for-each select="uof:用户自定义元数据"> 5960 <meta:user-defined meta:name="{@uof:名称}"> 5961 <xsl:value-of select="."/> 5962 </meta:user-defined> 5963 </xsl:for-each> 5964 </xsl:template> 5965 <xsl:template name="parse-range"> 5966 <xsl:param name="range-value"/> 5967 <xsl:param name="last"/> 5968 <xsl:variable name="first-pit"> 5969 <xsl:choose> 5970 <xsl:when test="contains($range-value,',')"> 5971 <xsl:value-of select="substring-before($range-value,',')"/> 5972 </xsl:when> 5973 <xsl:otherwise> 5974 <xsl:value-of select="$range-value"/> 5975 </xsl:otherwise> 5976 </xsl:choose> 5977 </xsl:variable> 5978 <xsl:variable name="current"> 5979 <xsl:choose> 5980 <xsl:when test="contains($first-pit,':')"> 5981 <xsl:variable name="R-start" select="substring-before(substring-after($first-pit,'R'),'C')"/> 5982 <xsl:variable name="C-start" select="substring-before(substring-after($first-pit,'C'),':')"/> 5983 <xsl:variable name="second-pit" select="substring-after($first-pit,':')"/> 5984 <xsl:variable name="R-end" select="substring-before(substring-after($second-pit,'R'),'C')"/> 5985 <xsl:variable name="C-end" select="substring-after($second-pit,'C')"/> 5986 <xsl:variable name="the-str"> 5987 <xsl:call-template name="condition-rc-str"> 5988 <xsl:with-param name="r-start" select="$R-start"/> 5989 <xsl:with-param name="r-end" select="$R-end"/> 5990 <xsl:with-param name="c-start" select="$C-start"/> 5991 <xsl:with-param name="c-end" select="$C-end"/> 5992 <xsl:with-param name="last" select="''"/> 5993 </xsl:call-template> 5994 </xsl:variable> 5995 <xsl:value-of select="$the-str"/> 5996 </xsl:when> 5997 <xsl:otherwise> 5998 <xsl:value-of select="concat($first-pit,',')"/> 5999 </xsl:otherwise> 6000 </xsl:choose> 6001 </xsl:variable> 6002 <xsl:choose> 6003 <xsl:when test="contains($range-value,',')"> 6004 <xsl:call-template name="parse-range"> 6005 <xsl:with-param name="range-value" select="substring-after($range-value,',')"/> 6006 <xsl:with-param name="last" select="concat($last,$current)"/> 6007 </xsl:call-template> 6008 </xsl:when> 6009 <xsl:otherwise> 6010 <xsl:value-of select="concat($last,$current)"/> 6011 </xsl:otherwise> 6012 </xsl:choose> 6013 </xsl:template> 6014 <xsl:template name="condition-rc-str"> 6015 <!-- dealing the range of row\column --> 6016 <xsl:param name="r-start"/> 6017 <xsl:param name="r-end"/> 6018 <xsl:param name="c-start"/> 6019 <xsl:param name="c-end"/> 6020 <xsl:param name="last"/> 6021 <xsl:variable name="current"> 6022 <xsl:call-template name="condition-c-str"> 6023 <xsl:with-param name="rc-str" select="concat('R',$r-start)"/> 6024 <xsl:with-param name="start" select="$c-start"/> 6025 <xsl:with-param name="end" select="$c-end"/> 6026 <xsl:with-param name="last" select="''"/> 6027 </xsl:call-template> 6028 </xsl:variable> 6029 <xsl:if test="$r-start < $r-end"> 6030 <xsl:call-template name="condition-rc-str"> 6031 <xsl:with-param name="r-start" select="$r-start + 1"/> 6032 <xsl:with-param name="r-end" select="$r-end"/> 6033 <xsl:with-param name="c-start" select="$c-start"/> 6034 <xsl:with-param name="c-end" select="$c-end"/> 6035 <xsl:with-param name="last" select="concat($last,$current)"/> 6036 </xsl:call-template> 6037 </xsl:if> 6038 <xsl:if test="$r-start = $r-end"> 6039 <xsl:value-of select="concat($last,$current)"/> 6040 </xsl:if> 6041 </xsl:template> 6042 <xsl:template name="condition-c-str"> 6043 <!-- return value for the template condition-rc-str --> 6044 <xsl:param name="rc-str"/> 6045 <xsl:param name="start"/> 6046 <xsl:param name="end"/> 6047 <xsl:param name="last"/> 6048 <xsl:variable name="current" select="concat($rc-str,'C',$start,',')"/> 6049 <xsl:if test="$start < $end"> 6050 <xsl:call-template name="condition-c-str"> 6051 <xsl:with-param name="rc-str" select="$rc-str"/> 6052 <xsl:with-param name="start" select="$start + 1"/> 6053 <xsl:with-param name="end" select="$end"/> 6054 <xsl:with-param name="last" select="concat($last,$current)"/> 6055 </xsl:call-template> 6056 </xsl:if> 6057 <xsl:if test="$start = $end"> 6058 <xsl:value-of select="concat($last,$current)"/> 6059 </xsl:if> 6060 </xsl:template> 6061 <xsl:template name="condition-str"> 6062 <xsl:param name="param-str"/> 6063 <xsl:choose> 6064 <xsl:when test="contains($param-str,'(')"> 6065 <xsl:call-template name="condition-str"> 6066 <xsl:with-param name="param-str" select="substring-after($param-str,'(')"/> 6067 </xsl:call-template> 6068 </xsl:when> 6069 <xsl:otherwise> 6070 <xsl:value-of select="substring-before($param-str,':')"/> 6071 </xsl:otherwise> 6072 </xsl:choose> 6073 </xsl:template> 6074 <xsl:template name="encode-as-cell-range-address"> 6075 <xsl:param name="string"/> 6076 <xsl:value-of select="$string"/> 6077 </xsl:template> 6078 <xsl:template name="encode-as-cell-address"> 6079 <xsl:param name="string"/> 6080 <xsl:value-of select="$string"/> 6081 </xsl:template> 6082 <!--chengxiuzhi 111111111111111111111111111111111111111111111111111111111111111--> 6083 <!-- measure_conversion.xsl Begin--> 6084 <xsl:param name="dpi" select="111"/> 6085 <xsl:param name="centimeter-in-mm" select="10"/> 6086 <xsl:param name="inch-in-mm" select="25.4"/> 6087 <xsl:param name="didot-point-in-mm" select="0.376065"/> 6088 <xsl:param name="pica-in-mm" select="4.2333333"/> 6089 <xsl:param name="point-in-mm" select="0.3527778"/> 6090 <xsl:param name="twip-in-mm" select="0.017636684"/> 6091 <xsl:param name="pixel-in-mm" select="$inch-in-mm div $dpi"/> 6092 <!-- ***** MEASUREMENT CONVERSIONS ***** 6093 PARAM 'value' 6094 The measure to be converted. 6095 The current measure is judged by a substring (e.g. 'mm', 'cm', 'in', 'pica'...) 6096 directly added to the number. 6097 6098 PARAM 'rounding-factor' 6099 Is used for the rounding of decimal places. 6100 The parameter number is the product of 1 and some '10', where 6101 every zero represents a decimal place. 6102 6103 For example, providing as parameter: 6104 <xsl:param name="rounding-factor" select="10000" /> 6105 Gives by default four decimal places. 6106 6107 To round two decimal places, basically the following is done: 6108 <xsl:value-of select="round(100 * value) div 100"/> 6109 6110 RETURN The converted number, by default rounded to four decimal places. 6111 In case the input measure could not be matched the same value is 6112 returned and a warning message is written out. 6113 6114 6115 6116 MEASURE LIST: 6117 * 1 millimeter (mm), the basic measure 6118 6119 * 1 centimeter (cm) = 10 mm 6120 6121 * 1 inch (in) = 25.4 mm 6122 While the English have already seen the light (read: the metric system), the US 6123 remains loyal to this medieval system. 6124 6125 * 1 point (pt) = 0.35277777.. mm 6126 Sometimes called PostScript point (ppt), as when Adobe created PostScript, they added their own system of points. 6127 There are exactly 72 PostScript points in 1 inch. 6128 6129 * 1 twip = twentieth of a (PostScript) point 6130 A twip (twentieth of a point) is a 1/20th of a PostScript point, a traditional measure in printing. 6131 6132 * 1 didot point (dpt) = 0.376065 mm 6133 Didot point after the French typographer Firmin Didot (1764-1836). 6134 6135 More details under 6136 http://www.unc.edu/~rowlett/units/dictP.html: 6137 "A unit of length used by typographers and printers. When printing was done 6138 from hand-set metal type, one point represented the smallest element of type 6139 that could be handled, roughly 1/64 inch. Eventually, the point was standardized 6140 in Britain and America as exactly 1/72.27 = 0.013 837 inch, which is 6141 about 0.35 mm (351.46 micrometers). In continental Europe, typographers 6142 traditionally used a slightly larger point of 0.014 83 inch (about 6143 1/72 pouce, 0.377 mm, or roughly 1/67 English inch), called a Didot point 6144 after the French typographer Firmin Didot (1764-1836). In the U.S., 6145 Adobe software defines the point to be exactly 1/72 inch (0.013 888 9 inch 6146 or 0.352 777 8 millimeters) and TeX software uses a slightly smaller point 6147 of 0.351 459 8035 mm. The German standards agency DIN has proposed that 6148 all these units be replaced by multiples of 0.25 millimeters (1/101.6 inch). 6149 6150 * 1 pica = 4.233333 mm 6151 1/6 inch or 12 points 6152 6153 * 1 pixel (px) = 0.26458333.. mm (relative to 'DPI', here: 96 dpi) 6154 Most pictures have the 96 dpi resolution, but the dpi variable may vary by stylesheet parameter 6155 6156 6157 --> 6158 <!-- changing measure to mm --> 6159 <xsl:template name="convert2mm"> 6160 <xsl:param name="value"/> 6161 <xsl:param name="rounding-factor" select="10000"/> 6162 <xsl:choose> 6163 <xsl:when test="contains($value, 'mm')"> 6164 <xsl:value-of select="substring-before($value, 'mm')"/> 6165 </xsl:when> 6166 <xsl:when test="contains($value, 'cm')"> 6167 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm' ) * $centimeter-in-mm)) div $rounding-factor"/> 6168 </xsl:when> 6169 <xsl:when test="contains($value, 'in')"> 6170 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in' ) * $inch-in-mm)) div $rounding-factor"/> 6171 </xsl:when> 6172 <xsl:when test="contains($value, 'pt')"> 6173 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') * $point-in-mm)) div $rounding-factor"/> 6174 </xsl:when> 6175 <xsl:when test="contains($value, 'twip')"> 6176 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') * $twip-in-mm)) div $rounding-factor"/> 6177 </xsl:when> 6178 <xsl:when test="contains($value, 'dpt')"> 6179 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') * $didot-point-in-mm)) div $rounding-factor"/> 6180 </xsl:when> 6181 <xsl:when test="contains($value, 'pica')"> 6182 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') * $pica-in-mm)) div $rounding-factor"/> 6183 </xsl:when> 6184 <xsl:when test="contains($value, 'px')"> 6185 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') * $pixel-in-mm)) div $rounding-factor"/> 6186 </xsl:when> 6187 <xsl:otherwise> 6188 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'mm'!</xsl:message> 6189 <xsl:value-of select="$value"/> 6190 </xsl:otherwise> 6191 </xsl:choose> 6192 </xsl:template> 6193 <!-- changing measure to cm --> 6194 <xsl:template name="convert2cm"> 6195 <xsl:param name="value"/> 6196 <xsl:param name="rounding-factor" select="10000"/> 6197 <xsl:choose> 6198 <xsl:when test="contains($value, 'mm')"> 6199 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $centimeter-in-mm)) div $rounding-factor"/> 6200 </xsl:when> 6201 <xsl:when test="contains($value, 'cm')"> 6202 <xsl:value-of select="substring-before($value, 'cm')"/> 6203 </xsl:when> 6204 <xsl:when test="contains($value, 'in')"> 6205 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $centimeter-in-mm * $inch-in-mm)) div $rounding-factor"/> 6206 </xsl:when> 6207 <xsl:when test="contains($value, 'pt')"> 6208 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $centimeter-in-mm * $point-in-mm)) div $rounding-factor"/> 6209 </xsl:when> 6210 <xsl:when test="contains($value, 'dpt')"> 6211 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $centimeter-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6212 </xsl:when> 6213 <xsl:when test="contains($value, 'pica')"> 6214 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $centimeter-in-mm * $pica-in-mm)) div $rounding-factor"/> 6215 </xsl:when> 6216 <xsl:when test="contains($value, 'twip')"> 6217 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $centimeter-in-mm * $twip-in-mm)) div $rounding-factor"/> 6218 </xsl:when> 6219 <xsl:when test="contains($value, 'px')"> 6220 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $centimeter-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6221 </xsl:when> 6222 <xsl:otherwise> 6223 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'cm'!</xsl:message> 6224 <xsl:value-of select="$value"/> 6225 </xsl:otherwise> 6226 </xsl:choose> 6227 </xsl:template> 6228 <!-- changing measure to inch (cp. section comment) --> 6229 <xsl:template name="convert2in"> 6230 <xsl:param name="value"/> 6231 <xsl:param name="rounding-factor" select="10000"/> 6232 <xsl:choose> 6233 <xsl:when test="contains($value, 'mm')"> 6234 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $inch-in-mm)) div $rounding-factor"/> 6235 </xsl:when> 6236 <xsl:when test="contains($value, 'cm')"> 6237 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $inch-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6238 </xsl:when> 6239 <xsl:when test="contains($value, 'in')"> 6240 <xsl:value-of select="substring-before($value, 'in')"/> 6241 </xsl:when> 6242 <xsl:when test="contains($value, 'pt')"> 6243 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $inch-in-mm * $point-in-mm)) div $rounding-factor"/> 6244 </xsl:when> 6245 <xsl:when test="contains($value, 'dpt')"> 6246 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $inch-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6247 </xsl:when> 6248 <xsl:when test="contains($value, 'pica')"> 6249 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $inch-in-mm * $pica-in-mm)) div $rounding-factor"/> 6250 </xsl:when> 6251 <xsl:when test="contains($value, 'twip')"> 6252 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $inch-in-mm * $twip-in-mm)) div $rounding-factor"/> 6253 </xsl:when> 6254 <xsl:when test="contains($value, 'px')"> 6255 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $inch-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6256 </xsl:when> 6257 <xsl:otherwise> 6258 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'in'!</xsl:message> 6259 <xsl:value-of select="$value"/> 6260 </xsl:otherwise> 6261 </xsl:choose> 6262 </xsl:template> 6263 <!-- changing measure to dpt (cp. section comment) --> 6264 <xsl:template name="convert2dpt"> 6265 <xsl:param name="value"/> 6266 <xsl:param name="rounding-factor" select="10000"/> 6267 <xsl:choose> 6268 <xsl:when test="contains($value, 'mm')"> 6269 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $didot-point-in-mm)) div $rounding-factor"/> 6270 </xsl:when> 6271 <xsl:when test="contains($value, 'cm')"> 6272 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $didot-point-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6273 </xsl:when> 6274 <xsl:when test="contains($value, 'in')"> 6275 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $didot-point-in-mm * $inch-in-mm)) div $rounding-factor"/> 6276 </xsl:when> 6277 <xsl:when test="contains($value, 'pt')"> 6278 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $didot-point-in-mm * $point-in-mm)) div $rounding-factor"/> 6279 </xsl:when> 6280 <xsl:when test="contains($value, 'dpt')"> 6281 <xsl:value-of select="substring-before($value, 'dpt')"/> 6282 </xsl:when> 6283 <xsl:when test="contains($value, 'pica')"> 6284 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $didot-point-in-mm * $pica-in-mm)) div $rounding-factor"/> 6285 </xsl:when> 6286 <xsl:when test="contains($value, 'twip')"> 6287 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $didot-point-in-mm * $twip-in-mm)) div $rounding-factor"/> 6288 </xsl:when> 6289 <xsl:when test="contains($value, 'px')"> 6290 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $didot-point-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6291 </xsl:when> 6292 <xsl:otherwise> 6293 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'dpt'!</xsl:message> 6294 <xsl:value-of select="$value"/> 6295 </xsl:otherwise> 6296 </xsl:choose> 6297 </xsl:template> 6298 <!-- changing measure to pica (cp. section comment) --> 6299 <xsl:template name="convert2pica"> 6300 <xsl:param name="value"/> 6301 <xsl:param name="rounding-factor" select="10000"/> 6302 <xsl:choose> 6303 <xsl:when test="contains($value, 'mm')"> 6304 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $pica-in-mm)) div $rounding-factor"/> 6305 </xsl:when> 6306 <xsl:when test="contains($value, 'cm')"> 6307 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $pica-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6308 </xsl:when> 6309 <xsl:when test="contains($value, 'in')"> 6310 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $pica-in-mm * $inch-in-mm)) div $rounding-factor"/> 6311 </xsl:when> 6312 <xsl:when test="contains($value, 'pt')"> 6313 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $pica-in-mm * $point-in-mm)) div $rounding-factor"/> 6314 </xsl:when> 6315 <xsl:when test="contains($value, 'dpt')"> 6316 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $pica-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6317 </xsl:when> 6318 <xsl:when test="contains($value, 'pica')"> 6319 <xsl:value-of select="substring-before($value, 'pica')"/> 6320 </xsl:when> 6321 <xsl:when test="contains($value, 'twip')"> 6322 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $pica-in-mm * $twip-in-mm)) div $rounding-factor"/> 6323 </xsl:when> 6324 <xsl:when test="contains($value, 'px')"> 6325 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $pica-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6326 </xsl:when> 6327 <xsl:otherwise> 6328 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pica'!</xsl:message> 6329 <xsl:value-of select="$value"/> 6330 </xsl:otherwise> 6331 </xsl:choose> 6332 </xsl:template> 6333 <!-- changing measure to pt (cp. section comment) --> 6334 <xsl:template name="convert2pt"> 6335 <xsl:param name="value"/> 6336 <xsl:param name="rounding-factor" select="10000"/> 6337 <xsl:choose> 6338 <xsl:when test="contains($value, 'mm')"> 6339 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $point-in-mm)) div $rounding-factor"/> 6340 </xsl:when> 6341 <xsl:when test="contains($value, 'cm')"> 6342 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $point-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6343 </xsl:when> 6344 <xsl:when test="contains($value, 'in')"> 6345 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $point-in-mm * $inch-in-mm)) div $rounding-factor"/> 6346 </xsl:when> 6347 <xsl:when test="contains($value, 'pt')"> 6348 <xsl:value-of select="substring-before($value, 'pt')"/> 6349 </xsl:when> 6350 <xsl:when test="contains($value, 'dpt')"> 6351 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $point-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6352 </xsl:when> 6353 <xsl:when test="contains($value, 'pica')"> 6354 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $point-in-mm * $pica-in-mm)) div $rounding-factor"/> 6355 </xsl:when> 6356 <xsl:when test="contains($value, 'twip')"> 6357 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $point-in-mm * $twip-in-mm)) div $rounding-factor"/> 6358 </xsl:when> 6359 <xsl:when test="contains($value, 'px')"> 6360 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $point-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6361 </xsl:when> 6362 <xsl:otherwise> 6363 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pt'!</xsl:message> 6364 <xsl:value-of select="$value"/> 6365 </xsl:otherwise> 6366 </xsl:choose> 6367 </xsl:template> 6368 <!-- changing measure to pt (cp. section comment) --> 6369 <xsl:template name="convert2twip"> 6370 <xsl:param name="value"/> 6371 <xsl:param name="rounding-factor" select="10000"/> 6372 <xsl:choose> 6373 <xsl:when test="contains($value, 'mm')"> 6374 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $twip-in-mm)) div $rounding-factor"/> 6375 </xsl:when> 6376 <xsl:when test="contains($value, 'cm')"> 6377 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $twip-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6378 </xsl:when> 6379 <xsl:when test="contains($value, 'in')"> 6380 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $twip-in-mm * $inch-in-mm)) div $rounding-factor"/> 6381 </xsl:when> 6382 <xsl:when test="contains($value, 'pt')"> 6383 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $twip-in-mm * $point-in-mm)) div $rounding-factor"/> 6384 </xsl:when> 6385 <xsl:when test="contains($value, 'dpt')"> 6386 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $twip-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6387 </xsl:when> 6388 <xsl:when test="contains($value, 'pica')"> 6389 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $twip-in-mm * $pica-in-mm)) div $rounding-factor"/> 6390 </xsl:when> 6391 <xsl:when test="contains($value, 'twip')"> 6392 <xsl:value-of select="substring-before($value, 'twip')"/> 6393 </xsl:when> 6394 <xsl:when test="contains($value, 'px')"> 6395 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $twip-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6396 </xsl:when> 6397 <xsl:otherwise> 6398 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'twip'!</xsl:message> 6399 <xsl:value-of select="$value"/> 6400 </xsl:otherwise> 6401 </xsl:choose> 6402 </xsl:template> 6403 <!-- changing measure to pixel by via parameter provided dpi (dots per inch) standard factor (cp. section comment) --> 6404 <xsl:template name="convert2px"> 6405 <xsl:param name="value"/> 6406 <xsl:choose> 6407 <xsl:when test="contains($value, 'mm')"> 6408 <xsl:value-of select="round(number(substring-before($value, 'mm')) div $pixel-in-mm)"/> 6409 </xsl:when> 6410 <xsl:when test="contains($value, 'cm')"> 6411 <xsl:value-of select="round(number(substring-before($value, 'cm')) div $pixel-in-mm * $centimeter-in-mm)"/> 6412 </xsl:when> 6413 <xsl:when test="contains($value, 'in')"> 6414 <xsl:value-of select="round(number(substring-before($value, 'in')) div $pixel-in-mm * $inch-in-mm)"/> 6415 </xsl:when> 6416 <xsl:when test="contains($value, 'pt')"> 6417 <xsl:value-of select="round(number(substring-before($value, 'pt')) div $pixel-in-mm * $point-in-mm)"/> 6418 </xsl:when> 6419 <xsl:when test="contains($value, 'dpt')"> 6420 <xsl:value-of select="round(number(substring-before($value, 'dpt')) div $pixel-in-mm * $didot-point-in-mm)"/> 6421 </xsl:when> 6422 <xsl:when test="contains($value, 'pica')"> 6423 <xsl:value-of select="round(number(substring-before($value, 'pica')) div $pixel-in-mm * $pica-in-mm)"/> 6424 </xsl:when> 6425 <xsl:when test="contains($value, 'twip')"> 6426 <xsl:value-of select="round(number(substring-before($value, 'twip')) div $pixel-in-mm * $twip-in-mm)"/> 6427 </xsl:when> 6428 <xsl:when test="contains($value, 'px')"> 6429 <xsl:value-of select="$value"/> 6430 </xsl:when> 6431 <xsl:otherwise> 6432 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'px'!</xsl:message> 6433 <xsl:value-of select="$value"/> 6434 </xsl:otherwise> 6435 </xsl:choose> 6436 </xsl:template> 6437 <!-- chenjh zhangying--> 6438 <xsl:template name="create-content-validations"> 6439 <xsl:param name="validation-set"/> 6440 <xsl:if test="$validation-set"> 6441 <xsl:variable name="first-validation" select="$validation-set[1]"/> 6442 <xsl:variable name="condition-text"> 6443 <xsl:choose> 6444 <xsl:when test="$first-validation/表:校验类型/text()='whole number'"> 6445 <xsl:choose> 6446 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6447 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6448 </xsl:when> 6449 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6450 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6451 </xsl:when> 6452 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6453 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6454 </xsl:when> 6455 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6456 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6457 </xsl:when> 6458 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6459 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6460 </xsl:when> 6461 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6462 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6463 </xsl:when> 6464 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6465 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6466 </xsl:when> 6467 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6468 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6469 </xsl:when> 6470 </xsl:choose> 6471 </xsl:when> 6472 <xsl:when test="$first-validation/表:校验类型/text()='decimal'"> 6473 <xsl:choose> 6474 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6475 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6476 </xsl:when> 6477 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6478 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6479 </xsl:when> 6480 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6481 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6482 </xsl:when> 6483 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6484 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6485 </xsl:when> 6486 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6487 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6488 </xsl:when> 6489 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6490 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6491 </xsl:when> 6492 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6493 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6494 </xsl:when> 6495 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6496 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6497 </xsl:when> 6498 </xsl:choose> 6499 </xsl:when> 6500 <xsl:when test="$first-validation/表:校验类型/text()='date'"> 6501 <xsl:choose> 6502 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6503 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6504 </xsl:when> 6505 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6506 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6507 </xsl:when> 6508 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6509 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6510 </xsl:when> 6511 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6512 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6513 </xsl:when> 6514 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6515 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6516 </xsl:when> 6517 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6518 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6519 </xsl:when> 6520 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6521 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6522 </xsl:when> 6523 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6524 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6525 </xsl:when> 6526 </xsl:choose> 6527 </xsl:when> 6528 <xsl:when test="$first-validation/表:校验类型/text()='time'"> 6529 <xsl:choose> 6530 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6531 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6532 </xsl:when> 6533 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6534 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6535 </xsl:when> 6536 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6537 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6538 </xsl:when> 6539 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6540 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6541 </xsl:when> 6542 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6543 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6544 </xsl:when> 6545 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6546 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6547 </xsl:when> 6548 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6549 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6550 </xsl:when> 6551 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6552 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6553 </xsl:when> 6554 </xsl:choose> 6555 </xsl:when> 6556 <!-- add 20060317 --> 6557 <xsl:when test="$first-validation/表:校验类型/text()='cell range'"> 6558 <xsl:value-of select="concat('oooc:cell-content-is-in-list',$first-validation/表:第一操作数/text())"/> 6559 </xsl:when> 6560 <xsl:when test="$first-validation/表:校验类型/text()='list'"> 6561 <xsl:value-of select="concat('oooc:cell-content-is-in-list',$first-validation/表:第一操作数/text())"/> 6562 </xsl:when> 6563 <!-- add 20060317 end --> 6564 <xsl:when test="$first-validation/表:校验类型/text()='text length'"> 6565 <xsl:choose> 6566 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6567 <xsl:value-of select="concat('oooc:cell-content-text-length-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6568 </xsl:when> 6569 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6570 <xsl:value-of select="concat('oooc:cell-content-text-length-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6571 </xsl:when> 6572 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6573 <xsl:value-of select="concat('oooc:cell-content-text-length()=',$first-validation/表:第一操作数/text())"/> 6574 </xsl:when> 6575 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6576 <xsl:value-of select="concat('oooc:cell-content-text-length()!=',$first-validation/表:第一操作数/text())"/> 6577 </xsl:when> 6578 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6579 <xsl:value-of select="concat('oooc:cell-content-text-length()>',$first-validation/表:第一操作数/text())"/> 6580 </xsl:when> 6581 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6582 <xsl:value-of select="concat('oooc:cell-content-text-length()<',$first-validation/表:第一操作数/text())"/> 6583 </xsl:when> 6584 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6585 <xsl:value-of select="concat('oooc:cell-content-text-length()>=',$first-validation/表:第一操作数/text())"/> 6586 </xsl:when> 6587 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6588 <xsl:value-of select="concat('oooc:cell-content-text-length()<=',$first-validation/表:第一操作数/text())"/> 6589 </xsl:when> 6590 </xsl:choose> 6591 </xsl:when> 6592 </xsl:choose> 6593 </xsl:variable> 6594 <xsl:element name="table:content-validation"> 6595 <xsl:attribute name="table:name"><xsl:value-of select="concat('val',count($first-validation/preceding-sibling::表:数据有效性)+1)"/></xsl:attribute> 6596 <xsl:attribute name="table:condition"><xsl:value-of select="$condition-text"/></xsl:attribute> 6597 <xsl:attribute name="table:allow-empty-cell"><xsl:value-of select="$first-validation/表:忽略空格/@表:值"/></xsl:attribute> 6598 <xsl:attribute name="table:base-cell-address"><xsl:value-of select="translate(substring-after($first-validation/表:区域/text(),':'),'$','')"/></xsl:attribute> 6599 <xsl:if test="$first-validation/表:输入提示"> 6600 <xsl:element name="table:help-message"> 6601 <xsl:attribute name="table:title"><xsl:value-of select="$first-validation/表:输入提示/@表:标题"/></xsl:attribute> 6602 <xsl:attribute name="table:display"><xsl:value-of select="$first-validation/表:输入提示/@表:显示"/></xsl:attribute> 6603 <xsl:element name="text:p"> 6604 <xsl:value-of select="$first-validation/表:输入提示/@表:内容"/> 6605 </xsl:element> 6606 </xsl:element> 6607 </xsl:if> 6608 <xsl:if test="$first-validation/表:错误提示"> 6609 <xsl:element name="table:error-message"> 6610 <xsl:attribute name="table:title"><xsl:value-of select="$first-validation/表:错误提示/@表:标题"/></xsl:attribute> 6611 <xsl:attribute name="table:display"><xsl:value-of select="$first-validation/表:错误提示/@表:显示"/></xsl:attribute> 6612 <xsl:attribute name="table:message-type"><xsl:value-of select="$first-validation/表:错误提示/@表:类型"/></xsl:attribute> 6613 <xsl:element name="text:p"> 6614 <xsl:value-of select="$first-validation/表:错误提示/@表:内容"/> 6615 </xsl:element> 6616 </xsl:element> 6617 </xsl:if> 6618 </xsl:element> 6619 <xsl:call-template name="create-content-validations"> 6620 <xsl:with-param name="validation-set" select="$validation-set[position()!=1]"/> 6621 </xsl:call-template> 6622 </xsl:if> 6623 </xsl:template> 6624 <!--RedOffice Comment from Zengjh:UOF0020 2006-04-26 charts--> 6625 <xsl:template match="表:图表"> 6626 <xsl:param name="table-name"/> 6627 <xsl:element name="draw:frame"> 6628 <xsl:attribute name="draw:z-index"><xsl:value-of select="'0'"/></xsl:attribute> 6629 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@表:宽度,$uofUnit)"/></xsl:attribute> 6630 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@表:高度,$uofUnit)"/></xsl:attribute> 6631 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@表:x坐标,$uofUnit)"/></xsl:attribute> 6632 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@表:y坐标,$uofUnit)"/></xsl:attribute> 6633 <xsl:variable name="chart-current"> 6634 <xsl:number level="any" count="表:图表" format="1"/> 6635 </xsl:variable> 6636 <xsl:attribute name="draw:style-name"><xsl:value-of select="concat('chart', $chart-current)"/></xsl:attribute> 6637 <xsl:variable name="series-value-start"> 6638 <xsl:for-each select="表:数据源/表:系列[position()='1']"> 6639 <xsl:value-of select="@表:系列值"/> 6640 </xsl:for-each> 6641 </xsl:variable> 6642 <xsl:variable name="series-value-end"> 6643 <xsl:for-each select="表:数据源/表:系列[position()=last()]"> 6644 <xsl:value-of select="@表:系列值"/> 6645 </xsl:for-each> 6646 </xsl:variable> 6647 <xsl:variable name="series-generate-type"> 6648 <xsl:choose> 6649 <xsl:when test="表:数据源/@表序号产生"> 6650 <xsl:value-of select="表:数据源/@表序号产生"/> 6651 </xsl:when> 6652 <xsl:when test="substring(substring-after($series-value-start,'!'),2,1)=substring(substring-after($series-value-start,':'),2,1)">row</xsl:when> 6653 <xsl:otherwise>col</xsl:otherwise> 6654 </xsl:choose> 6655 </xsl:variable> 6656 <xsl:element name="draw:object"> 6657 <xsl:attribute name="draw:notify-on-update-of-ranges"><xsl:value-of select="表:数据源/@表:数据区域"/></xsl:attribute> 6658 <office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" office:version="1.0" office:mimetype="application/vnd.oasis.opendocument.chart"> 6659 <xsl:call-template name="表:元数据"> 6660 <xsl:with-param name="table-name" select="$table-name"/> 6661 <xsl:with-param name="table-type" select="@表:类型"/> 6662 <xsl:with-param name="table-subtype" select="@表:子类型"/> 6663 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6664 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6665 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6666 </xsl:call-template> 6667 <xsl:call-template name="表:式样集"> 6668 <xsl:with-param name="table-name" select="$table-name"/> 6669 <xsl:with-param name="table-type" select="@表:类型"/> 6670 <xsl:with-param name="table-subtype" select="@表:子类型"/> 6671 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6672 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6673 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6674 </xsl:call-template> 6675 <xsl:call-template name="表:主体"> 6676 <xsl:with-param name="table-name" select="$table-name"/> 6677 <xsl:with-param name="table-type" select="@表:类型"/> 6678 <xsl:with-param name="table-subtype" select="@表:子类型"/> 6679 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6680 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6681 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6682 </xsl:call-template> 6683 </office:document> 6684 </xsl:element> 6685 <xsl:element name="draw:image"> 6686 <office:binary-data> 6687 <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象/uof:数据"/> 6688 </office:binary-data> 6689 </xsl:element> 6690 </xsl:element> 6691 </xsl:template> 6692 <xsl:template name="表:元数据"> 6693 <xsl:param name="table-name"/> 6694 <xsl:param name="table-type"/> 6695 <xsl:param name="table-subtype"/> 6696 <xsl:param name="series-value-start"/> 6697 <xsl:param name="series-value-end"/> 6698 <xsl:param name="series-generate-type"/> 6699 <xsl:for-each select="/uof:UOF/uof:元数据"> 6700 <office:meta> 6701 <meta:generator>OpenOffice.org 1.1.3 (Win32)</meta:generator> 6702 <xsl:if test="uof:标题"> 6703 <dc:title> 6704 <xsl:value-of select="uof:标题"/> 6705 </dc:title> 6706 </xsl:if> 6707 <xsl:if test="uof:摘要"> 6708 <dc:description> 6709 <xsl:value-of select="uof:摘要"/> 6710 </dc:description> 6711 </xsl:if> 6712 <xsl:if test="uof:主题"> 6713 <dc:subject> 6714 <xsl:value-of select="uof:主题"/> 6715 </dc:subject> 6716 </xsl:if> 6717 <xsl:if test="uof:作者"> 6718 <meta:initial-creator> 6719 <xsl:value-of select="uof:作者"/> 6720 </meta:initial-creator> 6721 </xsl:if> 6722 <xsl:if test="uof:创建日期"> 6723 <meta:creation-date> 6724 <xsl:value-of select="uof:创建日期"/> 6725 </meta:creation-date> 6726 </xsl:if> 6727 <xsl:if test="uof:最后作者"> 6728 <dc:creator> 6729 <xsl:value-of select="uof:最后作者"/> 6730 </dc:creator> 6731 </xsl:if> 6732 <xsl:if test="uof:编辑时间"> 6733 <meta:editing-duration> 6734 <xsl:value-of select="uof:编辑时间"/> 6735 </meta:editing-duration> 6736 </xsl:if> 6737 <dc:language/> 6738 <meta:keywords> 6739 <meta:keyword> 6740 <xsl:value-of select="uof:关键字集/uof:关键字"/> 6741 </meta:keyword> 6742 </meta:keywords> 6743 <xsl:if test="uof:编辑次数"> 6744 <meta:editing-cycles> 6745 <xsl:value-of select="uof:编辑次数"/> 6746 </meta:editing-cycles> 6747 </xsl:if> 6748 <xsl:if test="uof:分类"> 6749 <meta:user-defined meta:name="Category"> 6750 <xsl:value-of select="uof:分类"/> 6751 </meta:user-defined> 6752 </xsl:if> 6753 <xsl:if test="uof:经理名称"> 6754 <meta:user-defined meta:name="Manager"> 6755 <xsl:value-of select="uof:经理名称"/> 6756 </meta:user-defined> 6757 </xsl:if> 6758 <xsl:if test="uof:公司名称"> 6759 <meta:user-defined meta:name="Company"> 6760 <xsl:value-of select="uof:公司名称"/> 6761 </meta:user-defined> 6762 </xsl:if> 6763 <xsl:if test="uof:创建应用程序"> 6764 <meta:user-defined meta:name="Version"> 6765 <xsl:value-of select="uof:创建应用程序"/> 6766 </meta:user-defined> 6767 </xsl:if> 6768 </office:meta> 6769 </xsl:for-each> 6770 </xsl:template> 6771 <xsl:template name="表:式样集"> 6772 <xsl:param name="table-name"/> 6773 <xsl:param name="table-type"/> 6774 <xsl:param name="table-subtype"/> 6775 <xsl:param name="series-value-start"/> 6776 <xsl:param name="series-value-end"/> 6777 <xsl:param name="series-generate-type"/> 6778 <office:styles> 6779 <draw:stroke-dash draw:name="Ultrafine_20_Dashed" draw:display-name="Ultrafine Dashed" draw:style="rect" draw:dots1="1" draw:dots1-length="0.051cm" draw:dots2="1" draw:dots2-length="0.051cm" draw:distance="0.051cm"/> 6780 <draw:stroke-dash draw:name="Fine_20_Dashed" draw:display-name="Fine Dashed" draw:style="rect" draw:dots1="1" draw:dots1-length="0.508cm" draw:dots2="1" draw:dots2-length="0.508cm" draw:distance="0.508cm"/> 6781 <draw:stroke-dash draw:name="Ultrafine_20_2_20_Dots_20_3_20_Dashes" draw:display-name="Ultrafine 2 Dots 3 Dashes" draw:style="rect" draw:dots1="2" draw:dots1-length="0.051cm" draw:dots2="3" draw:dots2-length="0.254cm" draw:distance="0.127cm"/> 6782 <draw:stroke-dash draw:name="Fine_20_Dashed_20__28_var_29_" draw:display-name="Fine Dashed (var)" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="197%"/> 6783 <draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/> 6784 <draw:stroke-dash draw:name="Fine_20_Dashed_20__28_var_29_" draw:display-name="Fine Dashed (var)" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="197%"/> 6785 <draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/> 6786 <draw:stroke-dash draw:name="Line_20_with_20_Fine_20_Dots" draw:display-name="Line with Fine Dots" draw:style="rect" draw:dots1="1" draw:dots1-length="2.007cm" draw:dots2="10" draw:distance="0.152cm"/> 6787 <draw:stroke-dash draw:name="Line_20_Style_20_9" draw:display-name="Line Style 9" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:distance="120%"/> 6788 <draw:stroke-dash draw:name="_33__20_Dashes_20_3_20_Dots_20__28_var_29_" draw:display-name="3 Dashes 3 Dots (var)" draw:style="rect" draw:dots1="3" draw:dots1-length="197%" draw:dots2="3" draw:distance="100%"/> 6789 <draw:stroke-dash draw:name="_32__20_Dots_20_1_20_Dash" draw:display-name="2 Dots 1 Dash" draw:style="rect" draw:dots1="2" draw:dots2="1" draw:dots2-length="0.203cm" draw:distance="0.203cm"/> 6790 <draw:stroke-dash draw:name="Ultrafine_20_Dotted_20__28_var_29_" draw:display-name="Ultrafine Dotted (var)" draw:style="rect" draw:dots1="1" draw:distance="50%"/> 6791 <draw:stroke-dash draw:name="Dash_20_10" draw:display-name="Dash 10" draw:style="rect" draw:dots1="1" draw:dots1-length="0.02cm" draw:dots2="1" draw:dots2-length="0.02cm" draw:distance="0.02cm"/> 6792 <xsl:for-each select="//图:图片"> 6793 <xsl:variable name="chart-image-name" select="@图:名称"/> 6794 <draw:fill-image> 6795 <xsl:attribute name="draw:name"><xsl:value-of select="@图:名称"/></xsl:attribute> 6796 <office:binary-data> 6797 <xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$chart-image-name]"> 6798 <xsl:value-of select="uof:数据"/> 6799 </xsl:for-each> 6800 </office:binary-data> 6801 </draw:fill-image> 6802 </xsl:for-each> 6803 <xsl:for-each select="//图:图案"> 6804 <xsl:variable name="chart-hatch-name" select="@图:图形引用"/> 6805 <draw:hatch> 6806 <xsl:if test="@图:图形引用"> 6807 <xsl:attribute name="draw:name"><xsl:value-of select="$chart-hatch-name"/></xsl:attribute> 6808 </xsl:if> 6809 <xsl:if test="@图:类型"> 6810 <xsl:attribute name="draw:style"><xsl:value-of select="@图:类型"/></xsl:attribute> 6811 </xsl:if> 6812 <xsl:if test="@图:前景色"> 6813 <xsl:attribute name="draw:color"><xsl:value-of select="@图:前景色"/></xsl:attribute> 6814 </xsl:if> 6815 <xsl:if test="@图:距离"> 6816 <xsl:attribute name="draw:distance"><xsl:value-of select="@图:距离"/></xsl:attribute> 6817 </xsl:if> 6818 <xsl:if test="@图:旋转度"> 6819 <xsl:attribute name="draw:rotation"><xsl:value-of select="@图:旋转度"/></xsl:attribute> 6820 </xsl:if> 6821 </draw:hatch> 6822 </xsl:for-each> 6823 <xsl:for-each select="//图:渐变"> 6824 <draw:gradient> 6825 <xsl:if test="@图:图形引用"> 6826 <xsl:attribute name="draw:name"><xsl:value-of select="@图:图形引用"/></xsl:attribute> 6827 </xsl:if> 6828 <xsl:if test="@图:起始色"> 6829 <xsl:attribute name="draw:start-color"><xsl:value-of select="@图:起始色"/></xsl:attribute> 6830 </xsl:if> 6831 <xsl:if test="@图:终止色"> 6832 <xsl:attribute name="draw:end-color"><xsl:value-of select="@图:终止色"/></xsl:attribute> 6833 </xsl:if> 6834 <xsl:if test="@图:种子类型"> 6835 <xsl:attribute name="draw:style"><xsl:value-of select="@图:种子类型"/></xsl:attribute> 6836 </xsl:if> 6837 <xsl:if test="@图:起始浓度"> 6838 <xsl:attribute name="draw:start-intensity"><xsl:value-of select="@图:起始浓度"/></xsl:attribute> 6839 </xsl:if> 6840 <xsl:if test="@图:终止浓度"> 6841 <xsl:attribute name="draw:end-intensity"><xsl:value-of select="@图:终止浓度"/></xsl:attribute> 6842 </xsl:if> 6843 <xsl:if test="@图:渐变方向"> 6844 <xsl:attribute name="draw:angle"><xsl:value-of select="@图:渐变方向"/></xsl:attribute> 6845 </xsl:if> 6846 <xsl:if test="@图:边界"> 6847 <xsl:attribute name="draw:border"><xsl:value-of select="@图:边界"/></xsl:attribute> 6848 </xsl:if> 6849 <xsl:if test="@图:种子X位置"> 6850 <xsl:attribute name="draw:cx"><xsl:value-of select="@图:种子X位置"/></xsl:attribute> 6851 </xsl:if> 6852 <xsl:if test="@图:种子Y位置"> 6853 <xsl:attribute name="draw:cy"><xsl:value-of select="@图:种子Y位置"/></xsl:attribute> 6854 </xsl:if> 6855 </draw:gradient> 6856 </xsl:for-each> 6857 </office:styles> 6858 <office:automatic-styles> 6859 <xsl:for-each select="node( )"> 6860 <xsl:choose> 6861 <xsl:when test="name(.)='表:图表区'"> 6862 <xsl:call-template name="表:图表区式样"> 6863 <xsl:with-param name="table-name" select="$table-name"/> 6864 <xsl:with-param name="table-type" select="$table-type"/> 6865 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6866 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6867 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6868 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6869 </xsl:call-template> 6870 </xsl:when> 6871 <xsl:when test="name(.)='表:绘图区'"> 6872 <xsl:call-template name="表:绘图区式样"> 6873 <xsl:with-param name="table-name" select="$table-name"/> 6874 <xsl:with-param name="table-type" select="$table-type"/> 6875 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6876 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6877 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6878 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6879 </xsl:call-template> 6880 <xsl:call-template name="表:图表背景墙式样"> 6881 <xsl:with-param name="table-name" select="$table-name"/> 6882 <xsl:with-param name="table-type" select="$table-type"/> 6883 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6884 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6885 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6886 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6887 </xsl:call-template> 6888 </xsl:when> 6889 <xsl:when test="name(.)='表:分类轴'"> 6890 <xsl:call-template name="表:分类轴式样"> 6891 <xsl:with-param name="table-name" select="$table-name"/> 6892 <xsl:with-param name="table-type" select="$table-type"/> 6893 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6894 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6895 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6896 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6897 </xsl:call-template> 6898 </xsl:when> 6899 <xsl:when test="name(.)='表:数值轴'"> 6900 <xsl:call-template name="表:数值轴式样"> 6901 <xsl:with-param name="table-name" select="$table-name"/> 6902 <xsl:with-param name="table-type" select="$table-type"/> 6903 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6904 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6905 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6906 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6907 </xsl:call-template> 6908 </xsl:when> 6909 <xsl:when test="name(.)='表:图例'"> 6910 <xsl:call-template name="表:图例式样"> 6911 <xsl:with-param name="table-name" select="$table-name"/> 6912 <xsl:with-param name="table-type" select="$table-type"/> 6913 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6914 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6915 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6916 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6917 </xsl:call-template> 6918 </xsl:when> 6919 <xsl:when test="name(.)='表:数据表'"> 6920 <xsl:call-template name="表:数据表式样"> 6921 <xsl:with-param name="table-name" select="$table-name"/> 6922 <xsl:with-param name="table-type" select="$table-type"/> 6923 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6924 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6925 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6926 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6927 </xsl:call-template> 6928 </xsl:when> 6929 <xsl:when test="name(.)='表:数据系列集'"> 6930 <xsl:call-template name="表:数据系列集式样"> 6931 <xsl:with-param name="table-name" select="$table-name"/> 6932 <xsl:with-param name="table-type" select="$table-type"/> 6933 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6934 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6935 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6936 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6937 </xsl:call-template> 6938 </xsl:when> 6939 <xsl:when test="name(.)='表:数据点集'"> 6940 <xsl:call-template name="表:数据点集式样"> 6941 <xsl:with-param name="table-name" select="$table-name"/> 6942 <xsl:with-param name="table-type" select="$table-type"/> 6943 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6944 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6945 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6946 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6947 </xsl:call-template> 6948 </xsl:when> 6949 <xsl:when test="name(.)='表:网格线集'"> 6950 <xsl:call-template name="表:网格线集式样"> 6951 <xsl:with-param name="table-name" select="$table-name"/> 6952 <xsl:with-param name="table-type" select="$table-type"/> 6953 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6954 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6955 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6956 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6957 </xsl:call-template> 6958 </xsl:when> 6959 <xsl:when test="name(.)='表:数据源'"> 6960 <xsl:call-template name="表:数据源式样"> 6961 <xsl:with-param name="table-name" select="$table-name"/> 6962 <xsl:with-param name="table-type" select="$table-type"/> 6963 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6964 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6965 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6966 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6967 </xsl:call-template> 6968 </xsl:when> 6969 <xsl:when test="name(.)='表:标题集'"> 6970 <xsl:call-template name="表:标题集式样"> 6971 <xsl:with-param name="table-name" select="$table-name"/> 6972 <xsl:with-param name="table-type" select="$table-type"/> 6973 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6974 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6975 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6976 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6977 </xsl:call-template> 6978 </xsl:when> 6979 <xsl:otherwise/> 6980 </xsl:choose> 6981 </xsl:for-each> 6982 </office:automatic-styles> 6983 </xsl:template> 6984 <xsl:template name="表:主体"> 6985 <xsl:param name="table-name"/> 6986 <xsl:param name="table-type"/> 6987 <xsl:param name="table-subtype"/> 6988 <xsl:param name="series-value-start"/> 6989 <xsl:param name="series-value-end"/> 6990 <xsl:param name="series-generate-type"/> 6991 <office:body> 6992 <office:chart> 6993 <chart:chart> 6994 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@表:宽度,$uofUnit)"/></xsl:attribute> 6995 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@表:高度,$uofUnit)"/></xsl:attribute> 6996 <xsl:attribute name="chart:class"><xsl:choose><xsl:when test="$table-type='column'">chart:bar</xsl:when><xsl:when test="$table-type='line'">chart:line</xsl:when><xsl:when test="$table-type='pie'"><xsl:choose><xsl:when test="$table-subtype='pie_ring'">chart:ring</xsl:when><xsl:otherwise>chart:circle</xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><xsl:value-of select="$table-type"/></xsl:otherwise></xsl:choose></xsl:attribute> 6997 <xsl:attribute name="chart:style-name">chart-area</xsl:attribute> 6998 <xsl:for-each select="表:标题集/表:标题[@表:位置='chart']"> 6999 <chart:title chart:style-name="chart-title"> 7000 <text:p> 7001 <xsl:value-of select="@表:名称"/> 7002 </text:p> 7003 </chart:title> 7004 </xsl:for-each> 7005 <xsl:call-template name="表:图例区域"> 7006 <xsl:with-param name="table-name" select="$table-name"/> 7007 <xsl:with-param name="table-type" select="$table-type"/> 7008 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7009 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7010 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7011 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7012 </xsl:call-template> 7013 <xsl:call-template name="表:绘图区域"> 7014 <xsl:with-param name="table-name" select="$table-name"/> 7015 <xsl:with-param name="table-type" select="$table-type"/> 7016 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7017 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7018 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7019 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7020 </xsl:call-template> 7021 <xsl:call-template name="表:本地表"> 7022 <xsl:with-param name="table-name" select="$table-name"/> 7023 <xsl:with-param name="table-type" select="$table-type"/> 7024 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7025 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7026 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7027 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7028 </xsl:call-template> 7029 </chart:chart> 7030 </office:chart> 7031 </office:body> 7032 </xsl:template> 7033 <xsl:template name="表:图例区域"> 7034 <xsl:param name="table-name"/> 7035 <xsl:param name="table-type"/> 7036 <xsl:param name="table-subtype"/> 7037 <xsl:param name="series-value-start"/> 7038 <xsl:param name="series-value-end"/> 7039 <xsl:param name="series-generate-type"/> 7040 <chart:legend> 7041 <xsl:attribute name="chart:legend-position"><xsl:choose><xsl:when test="表:图例/@表:位置"><xsl:value-of select="表:图例/@表:位置"/></xsl:when><xsl:otherwise>right</xsl:otherwise></xsl:choose></xsl:attribute> 7042 <xsl:attribute name="svg:x"><xsl:value-of select="concat(表:图例/@表:x坐标,$uofUnit)"/></xsl:attribute> 7043 <xsl:attribute name="svg:y"><xsl:value-of select="concat(表:图例/@表:y坐标,$uofUnit)"/></xsl:attribute> 7044 <xsl:attribute name="chart:style-name">legend</xsl:attribute> 7045 </chart:legend> 7046 </xsl:template> 7047 <xsl:template name="表:绘图区域"> 7048 <xsl:param name="table-name"/> 7049 <xsl:param name="table-type"/> 7050 <xsl:param name="table-subtype"/> 7051 <xsl:param name="series-value-start"/> 7052 <xsl:param name="series-value-end"/> 7053 <xsl:param name="series-generate-type"/> 7054 <chart:plot-area> 7055 <xsl:variable name="start-range"> 7056 <xsl:value-of select="concat('.$',substring(substring-after($series-value-start,'!'),1,1),'$',substring-before(substring(substring-after($series-value-start,'!'),2),':'))"/> 7057 </xsl:variable> 7058 <xsl:variable name="end-range"> 7059 <xsl:value-of select="concat(':.$',substring(substring-after($series-value-end,':'),1,1),'$',substring(substring-after($series-value-end,':'),2))"/> 7060 </xsl:variable> 7061 <xsl:attribute name="chart:style-name">plot-area</xsl:attribute> 7062 <xsl:attribute name="table:cell-range-address"><xsl:value-of select="concat($table-name,$start-range,$end-range)"/></xsl:attribute> 7063 <!--xsl:value-of select="表:数据源/@表:数据区域"/--> 7064 <xsl:attribute name="chart:table-number-list">0</xsl:attribute> 7065 <xsl:attribute name="svg:width"><xsl:value-of select="concat(表:绘图区/@表:宽度,$uofUnit)"/></xsl:attribute> 7066 <xsl:attribute name="svg:height"><xsl:value-of select="concat(表:绘图区/@表:高度,$uofUnit)"/></xsl:attribute> 7067 <xsl:attribute name="svg:x"><xsl:value-of select="concat(表:绘图区/@表:x坐标,$uofUnit)"/></xsl:attribute> 7068 <xsl:attribute name="svg:y"><xsl:value-of select="concat(表:绘图区/@表:y坐标,$uofUnit)"/></xsl:attribute> 7069 <xsl:if test="表:分类轴"> 7070 <chart:axis chart:dimension="x" chart:name="primary-x" chart:style-name="category-axis"> 7071 <xsl:for-each select="表:标题集/表:标题[@表:位置='category axis']"> 7072 <chart:title chart:style-name="category-axis-title"> 7073 <text:p> 7074 <xsl:value-of select="@表:名称"/> 7075 </text:p> 7076 </chart:title> 7077 </xsl:for-each> 7078 <chart:categories/> 7079 <xsl:if test="表:网格线集/表:网格线[@表:位置='category axis']"> 7080 <chart:grid chart:style-name="category-axis-grid" chart:class="major"/> 7081 </xsl:if> 7082 </chart:axis> 7083 </xsl:if> 7084 <xsl:if test="表:数值轴"> 7085 <chart:axis chart:dimension="y" chart:name="primary-y" chart:style-name="value-axis"> 7086 <xsl:for-each select="表:标题集/表:标题[@表:位置='value axis']"> 7087 <chart:title chart:style-name="value-axis-title"> 7088 <text:p> 7089 <xsl:value-of select="@表:名称"/> 7090 </text:p> 7091 </chart:title> 7092 </xsl:for-each> 7093 <chart:grid chart:style-name="value-axis-grid" chart:class="major"/> 7094 </chart:axis> 7095 </xsl:if> 7096 <xsl:call-template name="表:数据组"> 7097 <xsl:with-param name="table-name" select="$table-name"/> 7098 <xsl:with-param name="table-type" select="$table-type"/> 7099 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7100 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7101 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7102 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7103 </xsl:call-template> 7104 <chart:wall> 7105 <xsl:attribute name="chart:style-name">chart-wall</xsl:attribute> 7106 </chart:wall> 7107 <chart:floor> 7108 <xsl:attribute name="chart:style-name">chart-floor</xsl:attribute> 7109 </chart:floor> 7110 </chart:plot-area> 7111 </xsl:template> 7112 <xsl:template name="表:本地表"> 7113 <xsl:param name="table-name"/> 7114 <xsl:param name="table-type"/> 7115 <xsl:param name="table-subtype"/> 7116 <xsl:param name="series-value-start"/> 7117 <xsl:param name="series-value-end"/> 7118 <xsl:param name="series-generate-type"/> 7119 <table:table table:name="local-table"> 7120 <table:table-header-columns> 7121 <xsl:call-template name="表:本地表_表头列"> 7122 <xsl:with-param name="table-name" select="$table-name"/> 7123 <xsl:with-param name="table-type" select="$table-type"/> 7124 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7125 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7126 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7127 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7128 <xsl:with-param name="sum" select="1"/> 7129 </xsl:call-template> 7130 </table:table-header-columns> 7131 <table:table-columns> 7132 <xsl:variable name="column-sum"> 7133 <xsl:value-of select="count(表:数据源/表:系列)"/> 7134 </xsl:variable> 7135 <xsl:call-template name="表:本地表_列"> 7136 <xsl:with-param name="table-name" select="$table-name"/> 7137 <xsl:with-param name="table-type" select="$table-type"/> 7138 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7139 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7140 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7141 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7142 <xsl:with-param name="column-sum" select="$column-sum"/> 7143 </xsl:call-template> 7144 </table:table-columns> 7145 <table:table-header-rows> 7146 <xsl:call-template name="表:本地表_表头行"> 7147 <xsl:with-param name="table-name" select="$table-name"/> 7148 <xsl:with-param name="table-type" select="$table-type"/> 7149 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7150 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7151 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7152 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7153 <xsl:with-param name="row-current" select="1"/> 7154 <xsl:with-param name="fixed-row-sum" select="'1'"/> 7155 </xsl:call-template> 7156 </table:table-header-rows> 7157 <table:table-rows> 7158 <xsl:variable name="row-start"> 7159 <xsl:value-of select="substring-before(substring(substring-after($series-value-start,'!'),2),':')"/> 7160 </xsl:variable> 7161 <xsl:variable name="row-end"> 7162 <xsl:value-of select="substring(substring-after($series-value-end,':'),2)"/> 7163 </xsl:variable> 7164 <xsl:variable name="fixed-row-sum"> 7165 <xsl:value-of select="$row-end -$row-start +1"/> 7166 </xsl:variable> 7167 <xsl:call-template name="表:本地表_行"> 7168 <xsl:with-param name="table-name" select="$table-name"/> 7169 <xsl:with-param name="table-type" select="$table-type"/> 7170 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7171 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7172 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7173 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7174 <xsl:with-param name="row-current" select="'1'"/> 7175 <xsl:with-param name="fixed-row-sum" select="$fixed-row-sum"/> 7176 </xsl:call-template> 7177 </table:table-rows> 7178 </table:table> 7179 </xsl:template> 7180 <xsl:template name="表:本地表_表头列"> 7181 <xsl:param name="table-name"/> 7182 <xsl:param name="table-type"/> 7183 <xsl:param name="table-subtype"/> 7184 <xsl:param name="series-value-start"/> 7185 <xsl:param name="series-value-end"/> 7186 <xsl:param name="series-generate-type"/> 7187 <xsl:param name="sum"/> 7188 <xsl:choose> 7189 <xsl:when test="$sum=0"/> 7190 <xsl:otherwise> 7191 <table:table-column/> 7192 <xsl:call-template name="表:本地表_表头列"> 7193 <xsl:with-param name="sum" select="$sum -1"/> 7194 </xsl:call-template> 7195 </xsl:otherwise> 7196 </xsl:choose> 7197 </xsl:template> 7198 <xsl:template name="表:本地表_列"> 7199 <xsl:param name="table-name"/> 7200 <xsl:param name="table-type"/> 7201 <xsl:param name="table-subtype"/> 7202 <xsl:param name="series-value-start"/> 7203 <xsl:param name="series-value-end"/> 7204 <xsl:param name="series-generate-type"/> 7205 <xsl:param name="column-sum"/> 7206 <xsl:choose> 7207 <xsl:when test="$column-sum=0"/> 7208 <xsl:otherwise> 7209 <table:table-column/> 7210 <xsl:call-template name="表:本地表_列"> 7211 <xsl:with-param name="column-sum" select="$column-sum -1"/> 7212 </xsl:call-template> 7213 </xsl:otherwise> 7214 </xsl:choose> 7215 </xsl:template> 7216 <xsl:template name="表:本地表_表头行"> 7217 <xsl:param name="table-name"/> 7218 <xsl:param name="table-type"/> 7219 <xsl:param name="table-subtype"/> 7220 <xsl:param name="series-value-start"/> 7221 <xsl:param name="series-value-end"/> 7222 <xsl:param name="series-generate-type"/> 7223 <xsl:param name="row-current"/> 7224 <xsl:param name="fixed-row-sum"/> 7225 <xsl:choose> 7226 <xsl:when test="$row-current >$fixed-row-sum"/> 7227 <xsl:otherwise> 7228 <table:table-row> 7229 <xsl:variable name="series-value-current"> 7230 <xsl:for-each select="表:数据源/表:系列[position()=$row-current]"> 7231 <xsl:value-of select="@表:系列值"/> 7232 </xsl:for-each> 7233 </xsl:variable> 7234 <xsl:variable name="cell-start"> 7235 <xsl:call-template name="General-Char-Transition"> 7236 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7237 <xsl:with-param name="output-type" select="'ARABIC'"/> 7238 </xsl:call-template> 7239 </xsl:variable> 7240 <xsl:variable name="cell-end"> 7241 <xsl:choose> 7242 <xsl:when test="$series-generate-type='row'"> 7243 <xsl:call-template name="General-Char-Transition"> 7244 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,':'),1,1)"/> 7245 <xsl:with-param name="output-type" select="'ARABIC'"/> 7246 </xsl:call-template> 7247 </xsl:when> 7248 <xsl:otherwise> 7249 <xsl:call-template name="General-Char-Transition"> 7250 <xsl:with-param name="input-char" select="substring(substring-after($series-value-end,'!'),1,1)"/> 7251 <xsl:with-param name="output-type" select="'ARABIC'"/> 7252 </xsl:call-template> 7253 </xsl:otherwise> 7254 </xsl:choose> 7255 </xsl:variable> 7256 <xsl:variable name="cell-sum"> 7257 <xsl:value-of select="$cell-end -$cell-start +2"/> 7258 </xsl:variable> 7259 <xsl:variable name="fixed-cell-sum" select="$cell-sum"/> 7260 <xsl:call-template name="表:本地表_表头行_单元格"> 7261 <xsl:with-param name="table-name" select="$table-name"/> 7262 <xsl:with-param name="table-type" select="$table-type"/> 7263 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7264 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7265 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7266 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7267 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7268 <xsl:with-param name="row-current" select="$row-current"/> 7269 <xsl:with-param name="cell-sum" select="$cell-sum"/> 7270 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7271 </xsl:call-template> 7272 </table:table-row> 7273 <xsl:call-template name="表:本地表_表头行"> 7274 <xsl:with-param name="table-name" select="$table-name"/> 7275 <xsl:with-param name="table-type" select="$table-type"/> 7276 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7277 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7278 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7279 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7280 <xsl:with-param name="row-current" select="$row-current +1"/> 7281 <xsl:with-param name="fixed-row-sum" select="$fixed-row-sum"/> 7282 </xsl:call-template> 7283 </xsl:otherwise> 7284 </xsl:choose> 7285 </xsl:template> 7286 <xsl:template name="表:本地表_表头行_单元格"> 7287 <xsl:param name="table-name"/> 7288 <xsl:param name="table-type"/> 7289 <xsl:param name="table-subtype"/> 7290 <xsl:param name="series-value-start"/> 7291 <xsl:param name="series-value-end"/> 7292 <xsl:param name="series-generate-type"/> 7293 <xsl:param name="series-value-current"/> 7294 <xsl:param name="row-current"/> 7295 <xsl:param name="cell-sum"/> 7296 <xsl:param name="fixed-cell-sum"/> 7297 <xsl:choose> 7298 <xsl:when test="$cell-sum=0"/> 7299 <xsl:otherwise> 7300 <xsl:choose> 7301 <xsl:when test="$fixed-cell-sum=$cell-sum"> 7302 <table:table-cell> 7303 <text:p/> 7304 </table:table-cell> 7305 </xsl:when> 7306 <xsl:otherwise> 7307 <table:table-cell office:value-type="string"> 7308 <xsl:variable name="cell-no"> 7309 <xsl:value-of select="$fixed-cell-sum -$cell-sum +1"/> 7310 </xsl:variable> 7311 <xsl:variable name="cell-start"> 7312 <xsl:call-template name="General-Char-Transition"> 7313 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7314 <xsl:with-param name="output-type" select="'ARABIC'"/> 7315 </xsl:call-template> 7316 </xsl:variable> 7317 <xsl:variable name="char"> 7318 <xsl:call-template name="General-Char-Transition"> 7319 <xsl:with-param name="input-char" select="$cell-start +$cell-no -2"/> 7320 <xsl:with-param name="output-type" select="'CHARS_UPPER_LETTER'"/> 7321 </xsl:call-template> 7322 </xsl:variable> 7323 <text:p> 7324 <xsl:value-of select="concat('列 ',$char)"/> 7325 </text:p> 7326 </table:table-cell> 7327 </xsl:otherwise> 7328 </xsl:choose> 7329 <xsl:call-template name="表:本地表_表头行_单元格"> 7330 <xsl:with-param name="table-name" select="$table-name"/> 7331 <xsl:with-param name="table-type" select="$table-type"/> 7332 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7333 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7334 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7335 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7336 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7337 <xsl:with-param name="row-current" select="$row-current"/> 7338 <xsl:with-param name="cell-sum" select="$cell-sum -1"/> 7339 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7340 </xsl:call-template> 7341 </xsl:otherwise> 7342 </xsl:choose> 7343 </xsl:template> 7344 <xsl:template name="表:本地表_行"> 7345 <xsl:param name="table-name"/> 7346 <xsl:param name="table-type"/> 7347 <xsl:param name="table-subtype"/> 7348 <xsl:param name="series-value-start"/> 7349 <xsl:param name="series-value-end"/> 7350 <xsl:param name="series-generate-type"/> 7351 <xsl:param name="row-current"/> 7352 <xsl:param name="fixed-row-sum"/> 7353 <xsl:choose> 7354 <xsl:when test="$row-current >$fixed-row-sum"/> 7355 <xsl:otherwise> 7356 <xsl:variable name="series-value-current"> 7357 <xsl:for-each select="表:数据源/表:系列[position()=$row-current]"> 7358 <xsl:value-of select="@表:系列值"/> 7359 </xsl:for-each> 7360 </xsl:variable> 7361 <table:table-row> 7362 <xsl:variable name="cell-start"> 7363 <xsl:call-template name="General-Char-Transition"> 7364 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7365 <xsl:with-param name="output-type" select="'ARABIC'"/> 7366 </xsl:call-template> 7367 </xsl:variable> 7368 <xsl:variable name="cell-end"> 7369 <xsl:choose> 7370 <xsl:when test="$series-generate-type='row'"> 7371 <xsl:call-template name="General-Char-Transition"> 7372 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,':'),1,1)"/> 7373 <xsl:with-param name="output-type" select="'ARABIC'"/> 7374 </xsl:call-template> 7375 </xsl:when> 7376 <xsl:otherwise> 7377 <xsl:call-template name="General-Char-Transition"> 7378 <xsl:with-param name="input-char" select="substring(substring-after($series-value-end,'!'),1,1)"/> 7379 <xsl:with-param name="output-type" select="'ARABIC'"/> 7380 </xsl:call-template> 7381 </xsl:otherwise> 7382 </xsl:choose> 7383 </xsl:variable> 7384 <xsl:variable name="cell-sum"> 7385 <xsl:value-of select="$cell-end -$cell-start +2"/> 7386 </xsl:variable> 7387 <xsl:variable name="fixed-cell-sum" select="$cell-sum"/> 7388 <xsl:call-template name="表:本地表_行_单元格"> 7389 <xsl:with-param name="table-name" select="$table-name"/> 7390 <xsl:with-param name="table-type" select="$table-type"/> 7391 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7392 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7393 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7394 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7395 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7396 <xsl:with-param name="row-current" select="$row-current"/> 7397 <xsl:with-param name="cell-sum" select="$cell-sum"/> 7398 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7399 </xsl:call-template> 7400 </table:table-row> 7401 <xsl:call-template name="表:本地表_行"> 7402 <xsl:with-param name="table-name" select="$table-name"/> 7403 <xsl:with-param name="table-type" select="$table-type"/> 7404 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7405 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7406 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7407 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7408 <xsl:with-param name="row-current" select="$row-current +1"/> 7409 <xsl:with-param name="fixed-row-sum" select="$fixed-row-sum"/> 7410 </xsl:call-template> 7411 </xsl:otherwise> 7412 </xsl:choose> 7413 </xsl:template> 7414 <xsl:template name="表:本地表_行_单元格"> 7415 <xsl:param name="table-name"/> 7416 <xsl:param name="table-type"/> 7417 <xsl:param name="table-subtype"/> 7418 <xsl:param name="series-value-start"/> 7419 <xsl:param name="series-value-end"/> 7420 <xsl:param name="series-generate-type"/> 7421 <xsl:param name="series-value-current"/> 7422 <xsl:param name="row-current"/> 7423 <xsl:param name="cell-sum"/> 7424 <xsl:param name="fixed-cell-sum"/> 7425 <xsl:choose> 7426 <xsl:when test="$cell-sum=0"/> 7427 <xsl:otherwise> 7428 <xsl:variable name="cell-start"> 7429 <xsl:call-template name="General-Char-Transition"> 7430 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7431 <xsl:with-param name="output-type" select="'ARABIC'"/> 7432 </xsl:call-template> 7433 </xsl:variable> 7434 <xsl:variable name="cell-no"> 7435 <xsl:value-of select="$cell-start +$fixed-cell-sum -$cell-sum -1"/> 7436 </xsl:variable> 7437 <xsl:variable name="row-start"> 7438 <xsl:value-of select="substring(substring-after($series-value-start,'!'),2,1)"/> 7439 </xsl:variable> 7440 <xsl:variable name="row-no"> 7441 <xsl:value-of select="$row-start +$row-current -1"/> 7442 </xsl:variable> 7443 <xsl:choose> 7444 <xsl:when test="$fixed-cell-sum=$cell-sum"> 7445 <table:table-cell office:value-type="string"> 7446 <text:p> 7447 <xsl:value-of select="concat('行 ',$row-no)"/> 7448 </text:p> 7449 </table:table-cell> 7450 </xsl:when> 7451 <xsl:otherwise> 7452 <table:table-cell office:value-type="float"> 7453 <xsl:variable name="cell-content"> 7454 <xsl:choose> 7455 <xsl:when test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/@表:行号"> 7456 <xsl:for-each select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行[@表:行号=$row-no]"> 7457 <xsl:for-each select="表:单元格[@表:列号=$cell-no]"> 7458 <xsl:value-of select="表:数据/字:句/字:文本串"/> 7459 </xsl:for-each> 7460 </xsl:for-each> 7461 </xsl:when> 7462 <xsl:otherwise> 7463 <xsl:for-each select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行[position()=$row-no]"> 7464 <xsl:for-each select="表:单元格[position()=$cell-no]"> 7465 <xsl:value-of select="表:数据/字:句/字:文本串"/> 7466 </xsl:for-each> 7467 </xsl:for-each> 7468 </xsl:otherwise> 7469 </xsl:choose> 7470 </xsl:variable> 7471 <xsl:attribute name="office:value"><xsl:value-of select="$cell-content"/></xsl:attribute> 7472 <text:p> 7473 <xsl:value-of select="$cell-content"/> 7474 </text:p> 7475 </table:table-cell> 7476 </xsl:otherwise> 7477 </xsl:choose> 7478 <xsl:call-template name="表:本地表_行_单元格"> 7479 <xsl:with-param name="table-name" select="$table-name"/> 7480 <xsl:with-param name="table-type" select="$table-type"/> 7481 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7482 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7483 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7484 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7485 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7486 <xsl:with-param name="row-current" select="$row-current"/> 7487 <xsl:with-param name="cell-sum" select="$cell-sum -1"/> 7488 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7489 </xsl:call-template> 7490 </xsl:otherwise> 7491 </xsl:choose> 7492 </xsl:template> 7493 <xsl:template name="表:数据组"> 7494 <xsl:param name="table-name"/> 7495 <xsl:param name="table-type"/> 7496 <xsl:param name="table-subtype"/> 7497 <xsl:param name="series-value-start"/> 7498 <xsl:param name="series-value-end"/> 7499 <xsl:param name="series-generate-type"/> 7500 <xsl:variable name="input-char-start"> 7501 <xsl:choose> 7502 <xsl:when test="$series-generate-type='row'"> 7503 <xsl:value-of select="substring(substring-after($series-value-start,'!'),1,1)"/> 7504 </xsl:when> 7505 <xsl:otherwise> 7506 <xsl:value-of select="substring-before(substring(substring-after($series-value-start,'!'),2),':')"/> 7507 </xsl:otherwise> 7508 </xsl:choose> 7509 </xsl:variable> 7510 <xsl:variable name="input-char-end"> 7511 <xsl:choose> 7512 <xsl:when test="$series-generate-type='row'"> 7513 <xsl:value-of select="substring(substring-after($series-value-start,':'),1,1)"/> 7514 </xsl:when> 7515 <xsl:otherwise> 7516 <xsl:value-of select="substring(substring-after($series-value-start,':'),2)"/> 7517 </xsl:otherwise> 7518 </xsl:choose> 7519 </xsl:variable> 7520 <xsl:variable name="cell-start"> 7521 <xsl:call-template name="General-Char-Transition"> 7522 <xsl:with-param name="input-char" select="$input-char-start"/> 7523 <xsl:with-param name="output-type" select="'ARABIC'"/> 7524 </xsl:call-template> 7525 </xsl:variable> 7526 <xsl:variable name="cell-end"> 7527 <xsl:call-template name="General-Char-Transition"> 7528 <xsl:with-param name="input-char" select="$input-char-end"/> 7529 <xsl:with-param name="output-type" select="'ARABIC'"/> 7530 </xsl:call-template> 7531 </xsl:variable> 7532 <xsl:variable name="fixed-cell-sum"> 7533 <xsl:value-of select="$cell-end -$cell-start +1"/> 7534 </xsl:variable> 7535 <xsl:for-each select="表:数据系列集/表:数据系列"> 7536 <chart:series> 7537 <xsl:attribute name="chart:style-name"><xsl:value-of select="concat('data-series',position())"/></xsl:attribute> 7538 <xsl:call-template name="表:数据点"> 7539 <xsl:with-param name="table-name" select="$table-name"/> 7540 <xsl:with-param name="table-type" select="$table-type"/> 7541 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7542 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7543 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7544 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7545 <xsl:with-param name="data-series-current" select="position()"/> 7546 <xsl:with-param name="cell-current" select="'1'"/> 7547 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7548 </xsl:call-template> 7549 </chart:series> 7550 </xsl:for-each> 7551 </xsl:template> 7552 <xsl:template name="表:数据点"> 7553 <xsl:param name="table-name"/> 7554 <xsl:param name="table-type"/> 7555 <xsl:param name="table-subtype"/> 7556 <xsl:param name="series-value-start"/> 7557 <xsl:param name="series-value-end"/> 7558 <xsl:param name="series-generate-type"/> 7559 <xsl:param name="data-series-current"/> 7560 <xsl:param name="cell-current"/> 7561 <xsl:param name="fixed-cell-sum"/> 7562 <xsl:choose> 7563 <xsl:when test="$cell-current>$fixed-cell-sum"/> 7564 <xsl:otherwise> 7565 <chart:data-point> 7566 <xsl:attribute name="chart:style-name"><xsl:value-of select="concat('data-point',$data-series-current,$cell-current)"/></xsl:attribute> 7567 </chart:data-point> 7568 <xsl:call-template name="表:数据点"> 7569 <xsl:with-param name="table-name" select="$table-name"/> 7570 <xsl:with-param name="table-type" select="$table-type"/> 7571 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7572 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7573 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7574 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7575 <xsl:with-param name="data-series-current" select="$data-series-current"/> 7576 <xsl:with-param name="cell-current" select="$cell-current +1"/> 7577 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7578 </xsl:call-template> 7579 </xsl:otherwise> 7580 </xsl:choose> 7581 </xsl:template> 7582 <xsl:template name="表:图表区式样"> 7583 <xsl:param name="table-name"/> 7584 <xsl:param name="table-type"/> 7585 <xsl:param name="table-subtype"/> 7586 <xsl:param name="series-value-start"/> 7587 <xsl:param name="series-value-end"/> 7588 <xsl:param name="series-generate-type"/> 7589 <style:style style:name="chart-area" style:family="chart"> 7590 <xsl:for-each select="node()"> 7591 <xsl:choose> 7592 <xsl:when test="name(.)='表:边框'"> 7593 <style:graphic-properties> 7594 <xsl:call-template name="uof:边框"/> 7595 </style:graphic-properties> 7596 </xsl:when> 7597 <xsl:when test="name(.)='表:填充'"> 7598 <style:graphic-properties> 7599 <xsl:call-template name="图:填充类型"/> 7600 </style:graphic-properties> 7601 </xsl:when> 7602 <xsl:when test="name(.)='表:字体'"> 7603 <style:text-properties> 7604 <xsl:call-template name="字:句属性类型"/> 7605 </style:text-properties> 7606 </xsl:when> 7607 </xsl:choose> 7608 </xsl:for-each> 7609 </style:style> 7610 </xsl:template> 7611 <xsl:template name="表:绘图区式样"> 7612 <xsl:param name="table-name"/> 7613 <xsl:param name="table-type"/> 7614 <xsl:param name="table-subtype"/> 7615 <xsl:param name="series-value-start"/> 7616 <xsl:param name="series-value-end"/> 7617 <xsl:param name="series-generate-type"/> 7618 <style:style style:name="plot-area" style:family="chart"> 7619 <style:chart-properties> 7620 <xsl:choose> 7621 <xsl:when test="$table-subtype='bar_stacked' or $table-subtype='column_stacked' or $table-subtype='line_stacked'"> 7622 <xsl:attribute name="chart:stacked">true</xsl:attribute> 7623 </xsl:when> 7624 <xsl:when test="$table-subtype='bar_percent' or $table-subtype='column_percent' or $table-subtype='line_percent'"> 7625 <xsl:attribute name="chart:percentage">true</xsl:attribute> 7626 </xsl:when> 7627 </xsl:choose> 7628 <xsl:attribute name="chart:vertical"><xsl:choose><xsl:when test="$table-type='bar'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 7629 <xsl:attribute name="chart:series-source"><xsl:choose><xsl:when test="$series-generate-type='row'">rows</xsl:when><xsl:otherwise>columns</xsl:otherwise></xsl:choose></xsl:attribute> 7630 </style:chart-properties> 7631 </style:style> 7632 </xsl:template> 7633 <xsl:template name="表:图表背景墙式样"> 7634 <xsl:param name="table-name"/> 7635 <xsl:param name="table-type"/> 7636 <xsl:param name="table-subtype"/> 7637 <xsl:param name="series-value-start"/> 7638 <xsl:param name="series-value-end"/> 7639 <xsl:param name="series-generate-type"/> 7640 <style:style style:name="chart-wall" style:family="chart"> 7641 <style:graphic-properties> 7642 <xsl:for-each select="node()"> 7643 <xsl:choose> 7644 <xsl:when test="name(.)='表:边框'"> 7645 <xsl:call-template name="uof:边框"/> 7646 </xsl:when> 7647 <xsl:when test="name(.)='表:填充'"> 7648 <xsl:call-template name="图:填充类型"/> 7649 </xsl:when> 7650 </xsl:choose> 7651 </xsl:for-each> 7652 </style:graphic-properties> 7653 </style:style> 7654 </xsl:template> 7655 <xsl:template name="表:分类轴式样"> 7656 <xsl:param name="table-name"/> 7657 <xsl:param name="table-type"/> 7658 <xsl:param name="table-subtype"/> 7659 <xsl:param name="series-value-start"/> 7660 <xsl:param name="series-value-end"/> 7661 <xsl:param name="series-generate-type"/> 7662 <style:style style:name="category-axis" style:family="chart"> 7663 <xsl:call-template name="表:坐标轴类型"> 7664 <xsl:with-param name="table-name" select="$table-name"/> 7665 <xsl:with-param name="table-type" select="$table-type"/> 7666 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7667 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7668 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7669 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7670 <xsl:with-param name="axis-type" select="'category axis'"/> 7671 </xsl:call-template> 7672 </style:style> 7673 </xsl:template> 7674 <xsl:template name="表:数值轴式样"> 7675 <xsl:param name="table-name"/> 7676 <xsl:param name="table-type"/> 7677 <xsl:param name="table-subtype"/> 7678 <xsl:param name="series-value-start"/> 7679 <xsl:param name="series-value-end"/> 7680 <xsl:param name="series-generate-type"/> 7681 <style:style style:name="value-axis" style:family="chart"> 7682 <xsl:call-template name="表:坐标轴类型"> 7683 <xsl:with-param name="table-name" select="$table-name"/> 7684 <xsl:with-param name="table-type" select="$table-type"/> 7685 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7686 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7687 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7688 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7689 <xsl:with-param name="axis-type" select="'value axis'"/> 7690 </xsl:call-template> 7691 </style:style> 7692 </xsl:template> 7693 <xsl:template name="表:图例式样"> 7694 <xsl:param name="table-name"/> 7695 <xsl:param name="table-type"/> 7696 <xsl:param name="table-subtype"/> 7697 <xsl:param name="series-value-start"/> 7698 <xsl:param name="series-value-end"/> 7699 <xsl:param name="series-generate-type"/> 7700 <style:style style:name="legend" style:family="chart"> 7701 <xsl:for-each select="node()"> 7702 <xsl:choose> 7703 <xsl:when test="name(.)='表:边框'"> 7704 <style:graphic-properties> 7705 <xsl:call-template name="uof:边框"/> 7706 </style:graphic-properties> 7707 </xsl:when> 7708 <xsl:when test="name(.)='表:填充'"> 7709 <style:graphic-properties> 7710 <xsl:call-template name="图:填充类型"/> 7711 </style:graphic-properties> 7712 </xsl:when> 7713 <xsl:when test="name(.)='表:字体'"> 7714 <style:text-properties> 7715 <xsl:call-template name="字:句属性类型"/> 7716 </style:text-properties> 7717 </xsl:when> 7718 </xsl:choose> 7719 </xsl:for-each> 7720 </style:style> 7721 </xsl:template> 7722 <xsl:template name="表:数据表式样"> 7723 <xsl:param name="table-name"/> 7724 <xsl:param name="table-type"/> 7725 <xsl:param name="table-subtype"/> 7726 <xsl:param name="series-value-start"/> 7727 <xsl:param name="series-value-end"/> 7728 <xsl:param name="series-generate-type"/> 7729 <style:style style:name="data-table" style:family="chart"> 7730 <xsl:for-each select="node()"> 7731 <xsl:choose> 7732 <xsl:when test="name(.)='表:边框'"> 7733 <style:graphic-properties> 7734 <xsl:call-template name="uof:边框"/> 7735 </style:graphic-properties> 7736 </xsl:when> 7737 <xsl:when test="name(.)='表:填充'"> 7738 <style:graphic-properties> 7739 <xsl:call-template name="图:填充类型"/> 7740 </style:graphic-properties> 7741 </xsl:when> 7742 <xsl:when test="name(.)='表:字体'"> 7743 <style:text-properties> 7744 <xsl:call-template name="字:句属性类型"/> 7745 </style:text-properties> 7746 </xsl:when> 7747 </xsl:choose> 7748 </xsl:for-each> 7749 </style:style> 7750 </xsl:template> 7751 <xsl:template name="表:数据系列集式样"> 7752 <xsl:param name="table-name"/> 7753 <xsl:param name="table-type"/> 7754 <xsl:param name="table-subtype"/> 7755 <xsl:param name="series-value-start"/> 7756 <xsl:param name="series-value-end"/> 7757 <xsl:param name="series-generate-type"/> 7758 <xsl:for-each select="表:数据系列"> 7759 <style:style style:family="chart"> 7760 <xsl:variable name="current-positon" select="position()"/> 7761 <xsl:attribute name="style:name"><xsl:value-of select="concat('data-series',$current-positon)"/></xsl:attribute> 7762 <xsl:call-template name="表:数据点类型"> 7763 <xsl:with-param name="table-name" select="$table-name"/> 7764 <xsl:with-param name="table-type" select="$table-type"/> 7765 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7766 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7767 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7768 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7769 <xsl:with-param name="recall-type" select="'data-series'"/> 7770 </xsl:call-template> 7771 </style:style> 7772 </xsl:for-each> 7773 </xsl:template> 7774 <xsl:template name="表:数据点集式样"> 7775 <xsl:param name="table-name"/> 7776 <xsl:param name="table-type"/> 7777 <xsl:param name="table-subtype"/> 7778 <xsl:param name="series-value-start"/> 7779 <xsl:param name="series-value-end"/> 7780 <xsl:param name="series-generate-type"/> 7781 <xsl:for-each select="表:数据点"> 7782 <style:style style:family="chart"> 7783 <xsl:attribute name="style:name"><xsl:value-of select="concat('data-point',@表:系列,@表:点)"/></xsl:attribute> 7784 <xsl:call-template name="表:数据点类型"> 7785 <xsl:with-param name="table-name" select="$table-name"/> 7786 <xsl:with-param name="table-type" select="$table-type"/> 7787 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7788 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7789 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7790 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7791 <xsl:with-param name="recall-type" select="'data-point'"/> 7792 </xsl:call-template> 7793 </style:style> 7794 </xsl:for-each> 7795 </xsl:template> 7796 <xsl:template name="表:网格线集式样"> 7797 <xsl:param name="table-name"/> 7798 <xsl:param name="table-type"/> 7799 <xsl:param name="table-subtype"/> 7800 <xsl:param name="series-value-start"/> 7801 <xsl:param name="series-value-end"/> 7802 <xsl:param name="series-generate-type"/> 7803 <xsl:for-each select="表:网格线"> 7804 <xsl:choose> 7805 <xsl:when test="@表:位置='category axis'"> 7806 <style:style style:name="category-axis-grid" style:family="chart"> 7807 <style:graphic-properties> 7808 <xsl:call-template name="uof:边框"/> 7809 </style:graphic-properties> 7810 </style:style> 7811 </xsl:when> 7812 <xsl:when test="@表:位置='value axis'"> 7813 <style:style style:name="value-axis-grid" style:family="chart"> 7814 <style:graphic-properties> 7815 <xsl:call-template name="uof:边框"/> 7816 </style:graphic-properties> 7817 </style:style> 7818 </xsl:when> 7819 <xsl:otherwise/> 7820 </xsl:choose> 7821 </xsl:for-each> 7822 </xsl:template> 7823 <xsl:template name="表:数据源式样"> 7824 <xsl:param name="table-name"/> 7825 <xsl:param name="table-type"/> 7826 <xsl:param name="table-subtype"/> 7827 <xsl:param name="series-value-start"/> 7828 <xsl:param name="series-value-end"/> 7829 <xsl:param name="series-generate-type"/> 7830 <xsl:for-each select="表:系列"> 7831 <style:style style:family="chart"> 7832 <xsl:variable name="current-positon" select="position()"/> 7833 <xsl:attribute name="style:name"><xsl:value-of select="concat('data-source',$current-positon)"/></xsl:attribute> 7834 </style:style> 7835 </xsl:for-each> 7836 </xsl:template> 7837 <xsl:template name="表:标题集式样"> 7838 <xsl:param name="table-name"/> 7839 <xsl:param name="table-type"/> 7840 <xsl:param name="table-subtype"/> 7841 <xsl:param name="series-value-start"/> 7842 <xsl:param name="series-value-end"/> 7843 <xsl:param name="series-generate-type"/> 7844 <xsl:for-each select="表:标题"> 7845 <xsl:choose> 7846 <xsl:when test="@表:位置='chart'"> 7847 <style:style style:name="chart-title" style:family="chart"> 7848 <xsl:call-template name="表:标题类型"> 7849 <xsl:with-param name="table-name" select="$table-name"/> 7850 <xsl:with-param name="table-type" select="$table-type"/> 7851 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7852 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7853 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7854 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7855 </xsl:call-template> 7856 </style:style> 7857 </xsl:when> 7858 <xsl:when test="@表:位置='category axis'"> 7859 <style:style style:name="category-axis-title" style:family="chart"> 7860 <xsl:call-template name="表:标题类型"> 7861 <xsl:with-param name="table-name" select="$table-name"/> 7862 <xsl:with-param name="table-type" select="$table-type"/> 7863 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7864 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7865 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7866 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7867 </xsl:call-template> 7868 </style:style> 7869 </xsl:when> 7870 <xsl:when test="@表:位置='value axis'"> 7871 <style:style style:name="value-axis-title" style:family="chart"> 7872 <xsl:call-template name="表:标题类型"> 7873 <xsl:with-param name="table-name" select="$table-name"/> 7874 <xsl:with-param name="table-type" select="$table-type"/> 7875 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7876 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7877 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7878 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7879 </xsl:call-template> 7880 </style:style> 7881 </xsl:when> 7882 <xsl:otherwise/> 7883 </xsl:choose> 7884 </xsl:for-each> 7885 </xsl:template> 7886 <xsl:template name="表:坐标轴类型"> 7887 <xsl:param name="table-name"/> 7888 <xsl:param name="table-type"/> 7889 <xsl:param name="table-subtype"/> 7890 <xsl:param name="series-value-start"/> 7891 <xsl:param name="series-value-end"/> 7892 <xsl:param name="series-generate-type"/> 7893 <xsl:param name="axis-type"/> 7894 <style:chart-properties> 7895 <xsl:choose> 7896 <xsl:when test="@表:主刻度类型='cross'"> 7897 <xsl:attribute name="chart:tick-marks-major-inner">true</xsl:attribute> 7898 <xsl:attribute name="chart:tick-marks-major-outer">true</xsl:attribute> 7899 </xsl:when> 7900 <xsl:when test="@表:主刻度类型='inside'"> 7901 <xsl:attribute name="chart:tick-marks-major-inner">true</xsl:attribute> 7902 <xsl:attribute name="chart:tick-marks-major-outer">false</xsl:attribute> 7903 </xsl:when> 7904 <xsl:when test="@表:主刻度类型='outside'"> 7905 <xsl:attribute name="chart:tick-marks-major-inner">false</xsl:attribute> 7906 <xsl:attribute name="chart:tick-marks-major-outer">true</xsl:attribute> 7907 </xsl:when> 7908 <xsl:otherwise/> 7909 </xsl:choose> 7910 <xsl:choose> 7911 <xsl:when test="@表:次刻度类型='cross'"> 7912 <xsl:attribute name="chart:tick-marks-minor-inner">true</xsl:attribute> 7913 <xsl:attribute name="chart:tick-marks-minor-outer">true</xsl:attribute> 7914 </xsl:when> 7915 <xsl:when test="@表:次刻度类型='inside'"> 7916 <xsl:attribute name="chart:tick-marks-minor-inner">true</xsl:attribute> 7917 <xsl:attribute name="chart:tick-marks-minor-outer">false</xsl:attribute> 7918 </xsl:when> 7919 <xsl:when test="@表:次刻度类型='outside'"> 7920 <xsl:attribute name="chart:tick-marks-minor-inner">false</xsl:attribute> 7921 <xsl:attribute name="chart:tick-marks-minor-outer">true</xsl:attribute> 7922 </xsl:when> 7923 <xsl:otherwise/> 7924 </xsl:choose> 7925 <xsl:if test="@表:刻度线标志='next to axis'"> 7926 <xsl:attribute name="chart:display-label">true</xsl:attribute> 7927 </xsl:if> 7928 <xsl:for-each select="node()"> 7929 <xsl:choose> 7930 <xsl:when test="name(.)='表:线型'"> 7931 <xsl:call-template name="uof:线型"/> 7932 </xsl:when> 7933 <xsl:when test="name(.)='表:数值'"> 7934 <xsl:attribute name="chart:link-data-style-to-source"><xsl:value-of select="@表:链接到源"/></xsl:attribute> 7935 </xsl:when> 7936 <xsl:when test="name(.)='表:刻度'"> 7937 <xsl:call-template name="表:刻度类型"/> 7938 </xsl:when> 7939 <xsl:when test="name(.)='表:对齐'"> 7940 <xsl:if test="表:文字方向"> 7941 <xsl:attribute name="fo:direction"><xsl:value-of select="表:文字方向"/></xsl:attribute> 7942 </xsl:if> 7943 <xsl:if test="表:旋转角度"> 7944 <xsl:attribute name="text:rotation-angle"><xsl:value-of select="表:旋转角度"/></xsl:attribute> 7945 </xsl:if> 7946 </xsl:when> 7947 </xsl:choose> 7948 </xsl:for-each> 7949 </style:chart-properties> 7950 <xsl:if test="表:字体"> 7951 <xsl:for-each select="表:字体"> 7952 <xsl:element name="style:text-properties"> 7953 <xsl:call-template name="字:句属性类型"/> 7954 </xsl:element> 7955 </xsl:for-each> 7956 </xsl:if> 7957 </xsl:template> 7958 <xsl:template name="表:数据点类型"> 7959 <xsl:param name="table-name"/> 7960 <xsl:param name="table-type"/> 7961 <xsl:param name="table-subtype"/> 7962 <xsl:param name="series-value-start"/> 7963 <xsl:param name="series-value-end"/> 7964 <xsl:param name="series-generate-type"/> 7965 <xsl:param name="recall-type"/> 7966 <xsl:if test="name(.)='表:数据点'"> 7967 <style:chart-properties> 7968 <xsl:if test="$table-type='pie' and $table-subtype='pie_offset1' and @表:点='1'"> 7969 <xsl:attribute name="chart:pie-offset">10</xsl:attribute> 7970 </xsl:if> 7971 <xsl:if test="$table-type='pie' and $table-subtype='pie_offset2'"> 7972 <xsl:attribute name="chart:pie-offset">10</xsl:attribute> 7973 </xsl:if> 7974 </style:chart-properties> 7975 </xsl:if> 7976 <xsl:for-each select="node()"> 7977 <xsl:choose> 7978 <xsl:when test="name(.)='表:边框'"> 7979 <style:graphic-properties> 7980 <xsl:call-template name="uof:边框"/> 7981 </style:graphic-properties> 7982 </xsl:when> 7983 <xsl:when test="name(.)='表:填充'"> 7984 <style:graphic-properties> 7985 <xsl:call-template name="图:填充类型"/> 7986 </style:graphic-properties> 7987 </xsl:when> 7988 <xsl:when test="name(.)='表:字体'"> 7989 <style:text-properties> 7990 <xsl:call-template name="字:句属性类型"/> 7991 </style:text-properties> 7992 </xsl:when> 7993 <xsl:when test="name(.)='表:显示标志'"> 7994 <style:chart-properties> 7995 <xsl:if test="@表:类别名"> 7996 <xsl:attribute name="chart:data-label-text"><xsl:value-of select="@表:类别名"/></xsl:attribute> 7997 </xsl:if> 7998 <xsl:if test="@表:数值"> 7999 <xsl:attribute name="chart:data-label-number">value</xsl:attribute> 8000 </xsl:if> 8001 <xsl:if test="@表:百分数"> 8002 <xsl:attribute name="chart:data-label-number">percentage</xsl:attribute> 8003 </xsl:if> 8004 <xsl:if test="@表:图例标志"> 8005 <xsl:attribute name="chart:data-label-symbol"><xsl:value-of select="@表:图例标志"/></xsl:attribute> 8006 </xsl:if> 8007 </style:chart-properties> 8008 </xsl:when> 8009 </xsl:choose> 8010 </xsl:for-each> 8011 </xsl:template> 8012 <xsl:template name="表:标题类型"> 8013 <xsl:param name="table-name"/> 8014 <xsl:param name="table-type"/> 8015 <xsl:param name="table-subtype"/> 8016 <xsl:param name="series-value-start"/> 8017 <xsl:param name="series-value-end"/> 8018 <xsl:param name="series-generate-type"/> 8019 <xsl:for-each select="node()"> 8020 <xsl:choose> 8021 <xsl:when test="name(.)='表:边框'"> 8022 <style:graphic-properties> 8023 <xsl:call-template name="uof:边框"/> 8024 </style:graphic-properties> 8025 </xsl:when> 8026 <xsl:when test="name(.)='表:填充'"> 8027 <style:graphic-properties> 8028 <xsl:call-template name="图:填充类型"/> 8029 </style:graphic-properties> 8030 </xsl:when> 8031 <xsl:when test="name(.)='表:对齐'"> 8032 <style:chart-properties> 8033 <xsl:call-template name="表:对齐格式类型"/> 8034 </style:chart-properties> 8035 </xsl:when> 8036 <xsl:when test="name(.)='表:字体'"> 8037 <style:text-properties> 8038 <xsl:call-template name="字:句属性类型"/> 8039 </style:text-properties> 8040 </xsl:when> 8041 </xsl:choose> 8042 </xsl:for-each> 8043 </xsl:template> 8044 <xsl:template name="uof:边框"> 8045 <xsl:if test="@uof:类型"> 8046 <xsl:variable name="type" select="@uof:类型"/> 8047 <xsl:attribute name="draw:stroke"><xsl:choose><xsl:when test="@uof:类型='single'">solid</xsl:when><xsl:when test="@uof:类型='none'">none</xsl:when><xsl:otherwise>dash</xsl:otherwise></xsl:choose></xsl:attribute> 8048 <xsl:attribute name="draw:stroke-dash"><xsl:choose><xsl:when test="$type='dash'">Ultrafine_20_Dashed</xsl:when><xsl:when test="$type='dot-dash'">Ultrafine_20_2_20_Dots_20_3_20_Dashes</xsl:when><xsl:when test="$type='dashed-heavy'">Fine_20_Dashed</xsl:when><xsl:when test="$type='dotted' ">Fine_20_Dotted</xsl:when><xsl:when test="$type='dash-long-heavy'">Line_20_with_20_Fine_20_Dots</xsl:when><xsl:when test="$type='dash-long'">Fine_20_Dashed_20__28_var_29_</xsl:when><xsl:when test="$type='dash-dot-dot'">_33__20_Dashes_20_3_20_Dots_20__28_var_29_</xsl:when><xsl:when test="$type='dotted-heavy'">Ultrafine_20_Dotted_20__28_var_29_</xsl:when><xsl:when test="$type='thick'">Line_20_Style_20_9</xsl:when><xsl:when test="$type='dot-dot-dash'">_32__20_Dots_20_1_20_Dash</xsl:when><xsl:when test="$type='dash-dot-dot-heavy'">Dashed_20__28_var_29_</xsl:when><xsl:when test="$type='dash-dot-heavy'">Dash_20_10</xsl:when></xsl:choose></xsl:attribute> 8049 </xsl:if> 8050 <xsl:if test="@uof:宽度"> 8051 <xsl:attribute name="svg:stroke-width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 8052 </xsl:if> 8053 <xsl:if test="@uof:颜色"> 8054 <xsl:attribute name="svg:stroke-color"><xsl:value-of select="@uof:颜色"/></xsl:attribute> 8055 </xsl:if> 8056 </xsl:template> 8057 <xsl:template name="图:填充类型"> 8058 <xsl:if test="图:颜色"> 8059 <xsl:attribute name="draw:fill">solid</xsl:attribute> 8060 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:颜色"/></xsl:attribute> 8061 </xsl:if> 8062 <xsl:if test="图:图片"> 8063 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 8064 <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:图片/@图:名称"/></xsl:attribute> 8065 <xsl:if test="not(图:图片/@图:位置='tile')"> 8066 <xsl:attribute name="style:repeat"><xsl:choose><xsl:when test="图:图片/@图:位置='center'">no-repeat</xsl:when><xsl:when test="图:图片/@图:位置='stretch'">stretch</xsl:when></xsl:choose></xsl:attribute> 8067 </xsl:if> 8068 </xsl:if> 8069 <xsl:if test="图:图案"> 8070 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 8071 <xsl:attribute name="draw:fill-hatch-name"><xsl:value-of select="图:图案/@图:图形引用"/></xsl:attribute> 8072 </xsl:if> 8073 <xsl:if test="图:渐变"> 8074 <xsl:attribute name="draw:fill">gradient</xsl:attribute> 8075 <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="图:渐变/@图:图形引用"/></xsl:attribute> 8076 </xsl:if> 8077 </xsl:template> 8078 <xsl:template name="uof:线型"> 8079 <xsl:call-template name="uof:边框"/> 8080 </xsl:template> 8081 <xsl:template name="字:句属性类型"> 8082 <xsl:apply-templates select="./*"/> 8083 </xsl:template> 8084 <xsl:template name="表:刻度类型"> 8085 <xsl:if test="表:最小值"> 8086 <xsl:attribute name="chart:minimum"><xsl:value-of select="表:最小值"/></xsl:attribute> 8087 </xsl:if> 8088 <xsl:if test="表:最大值"> 8089 <xsl:attribute name="chart:maximum"><xsl:value-of select="表:最大值"/></xsl:attribute> 8090 </xsl:if> 8091 <xsl:if test="表:主单位"> 8092 <xsl:attribute name="chart:interval-major"><xsl:value-of select="表:主单位"/></xsl:attribute> 8093 </xsl:if> 8094 <xsl:if test="表:次单位"> 8095 <xsl:attribute name="chart:interval-minor"><xsl:value-of select="表:次单位"/></xsl:attribute> 8096 </xsl:if> 8097 <xsl:if test="表:分类交叉点"> 8098 <xsl:attribute name="chart:origin"><xsl:value-of select="表:分类交叉点"/></xsl:attribute> 8099 </xsl:if> 8100 </xsl:template> 8101 <xsl:template name="表:对齐格式类型"> 8102 <xsl:if test="表:文字方向"> 8103 <xsl:attribute name="style:direction"><xsl:value-of select="表:文字方向"/></xsl:attribute> 8104 </xsl:if> 8105 <xsl:if test="表:文字旋转角度"> 8106 <xsl:attribute name="style:rotation-angle"><xsl:value-of select="表:文字旋转角度"/></xsl:attribute> 8107 </xsl:if> 8108 </xsl:template> 8109 <xsl:template match="字:字体"> 8110 <xsl:if test="@字:字号"> 8111 <xsl:attribute name="fo:font-size"><xsl:value-of select="@字:字号"/>pt</xsl:attribute> 8112 <xsl:attribute name="style:font-size-asian"><xsl:value-of select="@字:字号"/>pt</xsl:attribute> 8113 <xsl:attribute name="style:font-size-complex"><xsl:value-of select="@字:字号"/>pt</xsl:attribute> 8114 </xsl:if> 8115 <xsl:if test="@字:相对字号 and self::node( )[not(parent::字:句属性)]"> 8116 <xsl:variable name="stylename" select="parent::node()/@字:基式样引用"/> 8117 <xsl:variable name="zihao"> 8118 <xsl:for-each select="/uof:UOF/uof:式样集//uof:段落式样[@字:标识符=$stylename]"> 8119 <xsl:value-of select="字:字体/@字:字号"/> 8120 </xsl:for-each> 8121 </xsl:variable> 8122 <xsl:variable name="font-size" select="@字:相对字号"/> 8123 <xsl:attribute name="fo:font-size"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute> 8124 <xsl:attribute name="style:font-size-asian"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute> 8125 <xsl:attribute name="style:font-size-complex"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute> 8126 </xsl:if> 8127 <xsl:if test="@字:颜色"> 8128 <xsl:attribute name="fo:color"><xsl:value-of select="string(@字:颜色)"/></xsl:attribute> 8129 </xsl:if> 8130 <xsl:if test="@字:中文字体引用"> 8131 <xsl:attribute name="style:font-family-asian"><xsl:value-of select="@字:中文字体引用"/></xsl:attribute> 8132 </xsl:if> 8133 <xsl:if test="@字:西文字体引用"> 8134 <xsl:attribute name="fo:font-family"><xsl:value-of select="@字:西文字体引用"/></xsl:attribute> 8135 </xsl:if> 8136 </xsl:template> 8137 <xsl:template match="字:斜体"> 8138 <xsl:if test="@字:值='true'"> 8139 <xsl:attribute name="fo:font-style">italic</xsl:attribute> 8140 <xsl:attribute name="fo:font-style-asian">italic</xsl:attribute> 8141 <xsl:attribute name="style:font-style-asian">italic</xsl:attribute> 8142 <xsl:attribute name="style:font-style-complex">italic</xsl:attribute> 8143 </xsl:if> 8144 </xsl:template> 8145 <xsl:template match="字:粗体"> 8146 <xsl:if test="@字:值='true'"> 8147 <xsl:attribute name="fo:font-weight">bold</xsl:attribute> 8148 <xsl:attribute name="style:font-weight-asian">bold</xsl:attribute> 8149 <xsl:attribute name="style:font-weight-complex">bold</xsl:attribute> 8150 </xsl:if> 8151 </xsl:template> 8152 <xsl:template match="字:下划线"> 8153 <xsl:choose> 8154 <xsl:when test="@字:类型 = 'single'"> 8155 <xsl:attribute name="style:text-underline-style">solid</xsl:attribute> 8156 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8157 </xsl:when> 8158 <xsl:when test="@字:类型 = 'double'"> 8159 <xsl:attribute name="style:text-underline-style">solid</xsl:attribute> 8160 <xsl:attribute name="style:text-underline-type">double</xsl:attribute> 8161 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8162 </xsl:when> 8163 <xsl:when test="@字:类型 = 'thick'"> 8164 <xsl:attribute name="style:text-underline-style">solid</xsl:attribute> 8165 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8166 </xsl:when> 8167 <xsl:when test="@字:类型 = 'dotted'"> 8168 <xsl:attribute name="style:text-underline-style">dotted</xsl:attribute> 8169 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8170 </xsl:when> 8171 <xsl:when test="@字:类型 = 'dotted-heavy'"> 8172 <xsl:attribute name="style:text-underline-style">dotted</xsl:attribute> 8173 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8174 </xsl:when> 8175 <xsl:when test="@字:类型 = 'dash'"> 8176 <xsl:attribute name="style:text-underline-style">dash</xsl:attribute> 8177 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8178 </xsl:when> 8179 <xsl:when test="@字:类型 = 'dashed-heavy'"> 8180 <xsl:attribute name="style:text-underline-style">dash</xsl:attribute> 8181 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8182 </xsl:when> 8183 <xsl:when test="@字:类型 = 'dash-long'"> 8184 <xsl:attribute name="style:text-underline-style">long-dash</xsl:attribute> 8185 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8186 </xsl:when> 8187 <xsl:when test="@字:类型 = 'dash-long-heavy'"> 8188 <xsl:attribute name="style:text-underline-style">long-dash</xsl:attribute> 8189 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8190 </xsl:when> 8191 <xsl:when test="@字:类型 = 'dot-dash'"> 8192 <xsl:attribute name="style:text-underline-style">dot-dash</xsl:attribute> 8193 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8194 </xsl:when> 8195 <xsl:when test="@字:类型 = 'dash-dot-heavy'"> 8196 <xsl:attribute name="style:text-underline-style">dot-dash</xsl:attribute> 8197 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8198 </xsl:when> 8199 <xsl:when test="@字:类型 = 'dot-dot-dash'"> 8200 <xsl:attribute name="style:text-underline-style">dot-dot-dash</xsl:attribute> 8201 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8202 </xsl:when> 8203 <xsl:when test="@字:类型 = 'dash-dot-dot-heavy'"> 8204 <xsl:attribute name="style:text-underline-style">dot-dot-dash</xsl:attribute> 8205 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8206 </xsl:when> 8207 <xsl:when test="@字:类型 = 'wave'"> 8208 <xsl:attribute name="style:text-underline-style">wave</xsl:attribute> 8209 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8210 </xsl:when> 8211 <xsl:when test="@字:类型 = 'wavy-heavy'"> 8212 <xsl:attribute name="style:text-underline-style">wave</xsl:attribute> 8213 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8214 </xsl:when> 8215 <xsl:when test="@字:类型 = 'wavy-double'"> 8216 <xsl:attribute name="style:text-underline-style">wave</xsl:attribute> 8217 <xsl:attribute name="style:text-underline-type">double</xsl:attribute> 8218 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8219 </xsl:when> 8220 <xsl:otherwise/> 8221 </xsl:choose> 8222 <xsl:choose> 8223 <xsl:when test="@字:颜色"> 8224 <xsl:attribute name="style:text-underline-color"><xsl:choose><xsl:when test="@字:颜色='auto'">font-color</xsl:when><xsl:otherwise><xsl:value-of select="@字:颜色"/></xsl:otherwise></xsl:choose></xsl:attribute> 8225 </xsl:when> 8226 <xsl:otherwise> 8227 <xsl:attribute name="style:text-underline-color">font-color</xsl:attribute> 8228 </xsl:otherwise> 8229 </xsl:choose> 8230 </xsl:template> 8231 <xsl:template match="字:着重号"> 8232 <xsl:if test="not(@字:类型='none')"> 8233 <xsl:choose> 8234 <xsl:when test="@字:类型='accent above' "> 8235 <xsl:attribute name="style:text-emphasize">accent above</xsl:attribute> 8236 </xsl:when> 8237 <xsl:when test="@字:类型='dot above' "> 8238 <xsl:attribute name="style:text-emphasize">dot above</xsl:attribute> 8239 </xsl:when> 8240 <xsl:when test="@字:类型='disc above' "> 8241 <xsl:attribute name="style:text-emphasize">disc above</xsl:attribute> 8242 </xsl:when> 8243 <xsl:when test="@字:类型='circle above' "> 8244 <xsl:attribute name="style:text-emphasize">circle above</xsl:attribute> 8245 </xsl:when> 8246 <xsl:when test="@字:类型='accent below' "> 8247 <xsl:attribute name="style:text-emphasize">accent below</xsl:attribute> 8248 </xsl:when> 8249 <xsl:when test="@字:类型='dot below' "> 8250 <xsl:attribute name="style:text-emphasize">dot below</xsl:attribute> 8251 </xsl:when> 8252 <xsl:when test="@字:类型='disc below' "> 8253 <xsl:attribute name="style:text-emphasize">disc below</xsl:attribute> 8254 </xsl:when> 8255 <xsl:when test="@字:类型='circle below' "> 8256 <xsl:attribute name="style:text-emphasize">circle below</xsl:attribute> 8257 </xsl:when> 8258 </xsl:choose> 8259 </xsl:if> 8260 <xsl:if test="字:颜色"> 8261 <xsl:attribute name="fo:color"><xsl:value-of select="@字:颜色"/></xsl:attribute> 8262 </xsl:if> 8263 </xsl:template> 8264 <xsl:template match="字:隐藏文字"> 8265 <xsl:attribute name="text:display"><xsl:value-of select="@字:值"/></xsl:attribute> 8266 </xsl:template> 8267 <xsl:template match="字:空心"> 8268 <xsl:attribute name="style:text-outline"><xsl:value-of select="@字:值"/></xsl:attribute> 8269 </xsl:template> 8270 <xsl:template match="字:阴影"> 8271 <xsl:if test="not(@字:值='false')"> 8272 <xsl:attribute name="fo:text-shadow">1pt 1pt</xsl:attribute> 8273 </xsl:if> 8274 </xsl:template> 8275 <xsl:template match="字:删除线"> 8276 <xsl:attribute name="style:text-line-through-style">solid</xsl:attribute> 8277 <xsl:choose> 8278 <xsl:when test="@字:类型='double'"> 8279 <xsl:attribute name="style:text-line-through-type">double</xsl:attribute> 8280 </xsl:when> 8281 <xsl:when test="@字:类型='single'"> 8282 <xsl:attribute name="style:text-underline-mode">continuous</xsl:attribute> 8283 <xsl:attribute name="style:text-line-through-mode">continuous</xsl:attribute> 8284 </xsl:when> 8285 <xsl:when test="@字:类型='bold'"> 8286 <xsl:attribute name="style:text-line-through-width">bold</xsl:attribute> 8287 </xsl:when> 8288 <xsl:when test="@字:类型='带/'"> 8289 <xsl:attribute name="style:text-line-through-text">/</xsl:attribute> 8290 </xsl:when> 8291 <xsl:when test="@字:类型='带X'"> 8292 <xsl:attribute name="style:text-line-through-text">X</xsl:attribute> 8293 </xsl:when> 8294 <xsl:otherwise/> 8295 </xsl:choose> 8296 </xsl:template> 8297 <xsl:template match="@字:颜色[not(.='auto')]"> 8298 <xsl:attribute name="fo:color">#<xsl:value-of select="."/></xsl:attribute> 8299 </xsl:template> 8300 <xsl:template match="字:浮雕"> 8301 <xsl:attribute name="style:font-relief"><xsl:choose><xsl:when test="@字:类型='engrave'">engraved</xsl:when><xsl:when test="@字:类型='emboss'">embossed</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 8302 </xsl:template> 8303 <xsl:template match="字:醒目字体"> 8304 <xsl:choose> 8305 <xsl:when test="@字:类型='small-caps'"> 8306 <xsl:attribute name="fo:font-variant">small-caps</xsl:attribute> 8307 </xsl:when> 8308 <xsl:when test="@字:类型='none'"> 8309 <xsl:attribute name="fo:font-variant">normal</xsl:attribute> 8310 <xsl:attribute name="fo:text-transform">none</xsl:attribute> 8311 </xsl:when> 8312 <xsl:otherwise> 8313 <xsl:attribute name="fo:text-transform"><xsl:choose><xsl:when test="@字:类型='uppercase'">uppercase</xsl:when><xsl:when test="@字:类型='lowercase'">lowercase</xsl:when><xsl:when test="@字:类型='capital'">capitalize</xsl:when></xsl:choose></xsl:attribute> 8314 </xsl:otherwise> 8315 </xsl:choose> 8316 </xsl:template> 8317 <xsl:template match="字:位置"> 8318 <xsl:attribute name="style:text-position"><xsl:value-of select="."/></xsl:attribute> 8319 </xsl:template> 8320 <xsl:template match="字:缩放"> 8321 <xsl:attribute name="style:text-scale"><xsl:value-of select="."/></xsl:attribute> 8322 </xsl:template> 8323 <xsl:template match="字:字符间距"> 8324 <xsl:attribute name="fo:letter-spacing"><xsl:value-of select="."/></xsl:attribute> 8325 </xsl:template> 8326 <xsl:template match="字:调整字间距"> 8327 <xsl:attribute name="style:letter-kerning"><xsl:value-of select="."/></xsl:attribute> 8328 </xsl:template> 8329 <xsl:template match="字:外框"> 8330 <xsl:attribute name="style:text-outline">true</xsl:attribute> 8331 </xsl:template> 8332 <xsl:template match="字:缩放"> 8333 <xsl:attribute name="style:text-scale"><xsl:value-of select="."/></xsl:attribute> 8334 </xsl:template> 8335 <xsl:template match="字:字符间距[parent::字:句属性]"> 8336 <xsl:attribute name="fo:letter-spacing"><xsl:value-of select="concat( number(.)* $other-to-cm-conversion-factor, $uofUnit)"/></xsl:attribute> 8337 </xsl:template> 8338 <xsl:template name="General-Char-Transition"> 8339 <xsl:param name="input-char"/> 8340 <xsl:param name="output-type"/> 8341 <xsl:choose> 8342 <xsl:when test="$input-char='A' or $input-char='a' or $input-char='1' or $input-char='Roman_I' or $input-char='Roman_i' or $input-char='一' or $input-char='壹' or $input-char='甲' or $input-char='子'"> 8343 <xsl:choose> 8344 <xsl:when test="$output-type='ARABIC'">1</xsl:when> 8345 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">a</xsl:when> 8346 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">A</xsl:when> 8347 <xsl:when test="$output-type='ROMAN_UPPER'">I</xsl:when> 8348 <xsl:when test="$output-type='ROMAN_LOWER'">i</xsl:when> 8349 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">1</xsl:when> 8350 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">一</xsl:when> 8351 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">1</xsl:when> 8352 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">壹</xsl:when> 8353 <xsl:when test="$output-type='CIRCLE_NUMBER'">1</xsl:when> 8354 <xsl:when test="$output-type='TIAN_GAN_ZH'">甲</xsl:when> 8355 <xsl:when test="$output-type='DI_ZI_ZH'">子</xsl:when> 8356 <xsl:otherwise>1</xsl:otherwise> 8357 </xsl:choose> 8358 </xsl:when> 8359 <xsl:when test="$input-char='B' or $input-char='b' or $input-char='2' or $input-char='Roman_II' or $input-char='Roman_ii' or $input-char='二' or $input-char='贰' or $input-char='乙' or $input-char='丑'"> 8360 <xsl:choose> 8361 <xsl:when test="$output-type='ARABIC'">2</xsl:when> 8362 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">b</xsl:when> 8363 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">B</xsl:when> 8364 <xsl:when test="$output-type='ROMAN_UPPER'">II</xsl:when> 8365 <xsl:when test="$output-type='ROMAN_LOWER'">ii</xsl:when> 8366 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">2</xsl:when> 8367 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二</xsl:when> 8368 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">2</xsl:when> 8369 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰</xsl:when> 8370 <xsl:when test="$output-type='CIRCLE_NUMBER'">2</xsl:when> 8371 <xsl:when test="$output-type='TIAN_GAN_ZH'">乙</xsl:when> 8372 <xsl:when test="$output-type='DI_ZI_ZH'">丑</xsl:when> 8373 <xsl:otherwise>2</xsl:otherwise> 8374 </xsl:choose> 8375 </xsl:when> 8376 <xsl:when test="$input-char='C' or $input-char='c' or $input-char='3' or $input-char='Roman_III' or $input-char='Roman_iii' or $input-char='三' or $input-char='叁' or $input-char='丙' or $input-char='寅'"> 8377 <xsl:choose> 8378 <xsl:when test="$output-type='ARABIC'">3</xsl:when> 8379 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">c</xsl:when> 8380 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">C</xsl:when> 8381 <xsl:when test="$output-type='ROMAN_UPPER'">III</xsl:when> 8382 <xsl:when test="$output-type='ROMAN_LOWER'">iii</xsl:when> 8383 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">3</xsl:when> 8384 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">三</xsl:when> 8385 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">3</xsl:when> 8386 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">叁</xsl:when> 8387 <xsl:when test="$output-type='CIRCLE_NUMBER'">3</xsl:when> 8388 <xsl:when test="$output-type='TIAN_GAN_ZH'">丙</xsl:when> 8389 <xsl:when test="$output-type='DI_ZI_ZH'">寅</xsl:when> 8390 <xsl:otherwise>3</xsl:otherwise> 8391 </xsl:choose> 8392 </xsl:when> 8393 <xsl:when test="$input-char='D' or $input-char='d' or $input-char='4' or $input-char='Roman_IV' or $input-char='Roman_iv' or $input-char='四' or $input-char='肆' or $input-char='丁' or $input-char='卯'"> 8394 <xsl:choose> 8395 <xsl:when test="$output-type='ARABIC'">4</xsl:when> 8396 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">d</xsl:when> 8397 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">D</xsl:when> 8398 <xsl:when test="$output-type='ROMAN_UPPER'">IV</xsl:when> 8399 <xsl:when test="$output-type='ROMAN_LOWER'">iv</xsl:when> 8400 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">4</xsl:when> 8401 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">四</xsl:when> 8402 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">4</xsl:when> 8403 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">肆</xsl:when> 8404 <xsl:when test="$output-type='CIRCLE_NUMBER'">4</xsl:when> 8405 <xsl:when test="$output-type='TIAN_GAN_ZH'">丁</xsl:when> 8406 <xsl:when test="$output-type='DI_ZI_ZH'">卯</xsl:when> 8407 <xsl:otherwise>4</xsl:otherwise> 8408 </xsl:choose> 8409 </xsl:when> 8410 <xsl:when test="$input-char='E' or $input-char='e' or $input-char='5' or $input-char='Roman_V' or $input-char='Roman_v' or $input-char='五' or $input-char='伍' or $input-char='戊' or $input-char='辰'"> 8411 <xsl:choose> 8412 <xsl:when test="$output-type='ARABIC'">5</xsl:when> 8413 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">e</xsl:when> 8414 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">E</xsl:when> 8415 <xsl:when test="$output-type='ROMAN_UPPER'">V</xsl:when> 8416 <xsl:when test="$output-type='ROMAN_LOWER'">v</xsl:when> 8417 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">5</xsl:when> 8418 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">五</xsl:when> 8419 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">5</xsl:when> 8420 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">伍</xsl:when> 8421 <xsl:when test="$output-type='CIRCLE_NUMBER'">5</xsl:when> 8422 <xsl:when test="$output-type='TIAN_GAN_ZH'">戊</xsl:when> 8423 <xsl:when test="$output-type='DI_ZI_ZH'">辰</xsl:when> 8424 <xsl:otherwise>5</xsl:otherwise> 8425 </xsl:choose> 8426 </xsl:when> 8427 <xsl:when test="$input-char='F' or $input-char='f' or $input-char='6' or $input-char='Roman_VI' or $input-char='Roman_vi' or $input-char='六' or $input-char='陆' or $input-char='己' or $input-char='巳'"> 8428 <xsl:choose> 8429 <xsl:when test="$output-type='ARABIC'">6</xsl:when> 8430 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">f</xsl:when> 8431 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">F</xsl:when> 8432 <xsl:when test="$output-type='ROMAN_UPPER'">VI</xsl:when> 8433 <xsl:when test="$output-type='ROMAN_LOWER'">vi</xsl:when> 8434 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">6</xsl:when> 8435 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">六</xsl:when> 8436 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">6</xsl:when> 8437 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">陆</xsl:when> 8438 <xsl:when test="$output-type='CIRCLE_NUMBER'">6</xsl:when> 8439 <xsl:when test="$output-type='TIAN_GAN_ZH'">己</xsl:when> 8440 <xsl:when test="$output-type='DI_ZI_ZH'">巳</xsl:when> 8441 <xsl:otherwise>6</xsl:otherwise> 8442 </xsl:choose> 8443 </xsl:when> 8444 <xsl:when test="$input-char='G' or $input-char='g' or $input-char='7' or $input-char='7' or $input-char='Roman_VII' or $input-char='Roman_vii' or $input-char='七' or $input-char='柒' or $input-char='庚' or $input-char='午'"> 8445 <xsl:choose> 8446 <xsl:when test="$output-type='ARABIC'">7</xsl:when> 8447 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">g</xsl:when> 8448 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">G</xsl:when> 8449 <xsl:when test="$output-type='ROMAN_UPPER'">VII</xsl:when> 8450 <xsl:when test="$output-type='ROMAN_LOWER'">vii</xsl:when> 8451 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">7</xsl:when> 8452 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">七</xsl:when> 8453 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">7</xsl:when> 8454 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">柒</xsl:when> 8455 <xsl:when test="$output-type='CIRCLE_NUMBER'">7</xsl:when> 8456 <xsl:when test="$output-type='TIAN_GAN_ZH'">庚</xsl:when> 8457 <xsl:when test="$output-type='DI_ZI_ZH'">午</xsl:when> 8458 <xsl:otherwise>7</xsl:otherwise> 8459 </xsl:choose> 8460 </xsl:when> 8461 <xsl:when test="$input-char='H' or $input-char='h' or $input-char='8' or $input-char='Roman_VIII' or $input-char='Roman_viii' or $input-char='八' or $input-char='捌' or $input-char='辛' or $input-char='未'"> 8462 <xsl:choose> 8463 <xsl:when test="$output-type='ARABIC'">8</xsl:when> 8464 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">h</xsl:when> 8465 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">H</xsl:when> 8466 <xsl:when test="$output-type='ROMAN_UPPER'">VIII</xsl:when> 8467 <xsl:when test="$output-type='ROMAN_LOWER'">viii</xsl:when> 8468 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">8</xsl:when> 8469 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">八</xsl:when> 8470 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">8</xsl:when> 8471 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">捌</xsl:when> 8472 <xsl:when test="$output-type='CIRCLE_NUMBER'">8</xsl:when> 8473 <xsl:when test="$output-type='TIAN_GAN_ZH'">辛</xsl:when> 8474 <xsl:when test="$output-type='DI_ZI_ZH'">未</xsl:when> 8475 <xsl:otherwise>8</xsl:otherwise> 8476 </xsl:choose> 8477 </xsl:when> 8478 <xsl:when test="$input-char='I' or $input-char='i' or $input-char='9' or $input-char='Roman_IX' or $input-char='Roman_ix' or $input-char='九' or $input-char='玖' or $input-char='壬' or $input-char='申'"> 8479 <xsl:choose> 8480 <xsl:when test="$output-type='ARABIC'">9</xsl:when> 8481 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">i</xsl:when> 8482 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">I</xsl:when> 8483 <xsl:when test="$output-type='ROMAN_UPPER'">IX</xsl:when> 8484 <xsl:when test="$output-type='ROMAN_LOWER'">ix</xsl:when> 8485 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">9</xsl:when> 8486 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">九</xsl:when> 8487 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">9</xsl:when> 8488 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">玖</xsl:when> 8489 <xsl:when test="$output-type='CIRCLE_NUMBER'">9</xsl:when> 8490 <xsl:when test="$output-type='TIAN_GAN_ZH'">壬</xsl:when> 8491 <xsl:when test="$output-type='DI_ZI_ZH'">申</xsl:when> 8492 <xsl:otherwise>9</xsl:otherwise> 8493 </xsl:choose> 8494 </xsl:when> 8495 <xsl:when test="$input-char='J' or $input-char='j' or $input-char='10' or $input-char='Roman_X' or $input-char='Roman_x' or $input-char='十' or $input-char='拾' or $input-char='癸' or $input-char='酉'"> 8496 <xsl:choose> 8497 <xsl:when test="$output-type='ARABIC'">10</xsl:when> 8498 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">j</xsl:when> 8499 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">J</xsl:when> 8500 <xsl:when test="$output-type='ROMAN_UPPER'">X</xsl:when> 8501 <xsl:when test="$output-type='ROMAN_LOWER'">x</xsl:when> 8502 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">10</xsl:when> 8503 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十</xsl:when> 8504 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">10</xsl:when> 8505 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾</xsl:when> 8506 <xsl:when test="$output-type='CIRCLE_NUMBER'">10</xsl:when> 8507 <xsl:when test="$output-type='TIAN_GAN_ZH'">癸</xsl:when> 8508 <xsl:when test="$output-type='DI_ZI_ZH'">酉</xsl:when> 8509 <xsl:otherwise>10</xsl:otherwise> 8510 </xsl:choose> 8511 </xsl:when> 8512 <xsl:when test="$input-char='K' or $input-char='k' or $input-char='11' or $input-char='Roman_XI' or $input-char='Roman_xi' or $input-char='十一' or $input-char='拾壹' or $input-char='戌'"> 8513 <xsl:choose> 8514 <xsl:when test="$output-type='ARABIC'">11</xsl:when> 8515 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">k</xsl:when> 8516 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">K</xsl:when> 8517 <xsl:when test="$output-type='ROMAN_UPPER'">XI</xsl:when> 8518 <xsl:when test="$output-type='ROMAN_LOWER'">xi</xsl:when> 8519 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">11</xsl:when> 8520 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十一</xsl:when> 8521 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">11</xsl:when> 8522 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾壹</xsl:when> 8523 <xsl:when test="$output-type='CIRCLE_NUMBER'">11</xsl:when> 8524 <xsl:when test="$output-type='DI_ZI_ZH'">戌</xsl:when> 8525 <xsl:otherwise>11</xsl:otherwise> 8526 </xsl:choose> 8527 </xsl:when> 8528 <xsl:when test="$input-char='L' or $input-char='l' or $input-char='12' or $input-char='Roman_XII' or $input-char='Roman_xii' or $input-char='十二' or $input-char='拾贰' or $input-char='亥'"> 8529 <xsl:choose> 8530 <xsl:when test="$output-type='ARABIC'">12</xsl:when> 8531 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">l</xsl:when> 8532 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">L</xsl:when> 8533 <xsl:when test="$output-type='ROMAN_UPPER'">XII</xsl:when> 8534 <xsl:when test="$output-type='ROMAN_LOWER'">xii</xsl:when> 8535 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">12</xsl:when> 8536 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十二</xsl:when> 8537 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">12</xsl:when> 8538 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾贰</xsl:when> 8539 <xsl:when test="$output-type='CIRCLE_NUMBER'">12</xsl:when> 8540 <xsl:when test="$output-type='DI_ZI_ZH'">亥</xsl:when> 8541 <xsl:otherwise>12</xsl:otherwise> 8542 </xsl:choose> 8543 </xsl:when> 8544 <xsl:when test="$input-char='M' or $input-char='m' or $input-char='13' or $input-char='Roman_XIII' or $input-char='Roman_xiii' or $input-char='十三' or $input-char='拾叁'"> 8545 <xsl:choose> 8546 <xsl:when test="$output-type='ARABIC'">13</xsl:when> 8547 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">m</xsl:when> 8548 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">M</xsl:when> 8549 <xsl:when test="$output-type='ROMAN_UPPER'">XIII</xsl:when> 8550 <xsl:when test="$output-type='ROMAN_LOWER'">xiii</xsl:when> 8551 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">13</xsl:when> 8552 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十三</xsl:when> 8553 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">13</xsl:when> 8554 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾叁</xsl:when> 8555 <xsl:when test="$output-type='CIRCLE_NUMBER'">13</xsl:when> 8556 <xsl:otherwise>13</xsl:otherwise> 8557 </xsl:choose> 8558 </xsl:when> 8559 <xsl:when test="$input-char='N' or $input-char='n' or $input-char='14' or $input-char='Roman_XIV' or $input-char='Roman_xiv' or $input-char='十四' or $input-char='拾肆'"> 8560 <xsl:choose> 8561 <xsl:when test="$output-type='ARABIC'">14</xsl:when> 8562 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">n</xsl:when> 8563 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">N</xsl:when> 8564 <xsl:when test="$output-type='ROMAN_UPPER'">XIV</xsl:when> 8565 <xsl:when test="$output-type='ROMAN_LOWER'">xiv</xsl:when> 8566 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">14</xsl:when> 8567 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十四</xsl:when> 8568 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">14</xsl:when> 8569 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾肆</xsl:when> 8570 <xsl:when test="$output-type='CIRCLE_NUMBER'">14</xsl:when> 8571 <xsl:otherwise>14</xsl:otherwise> 8572 </xsl:choose> 8573 </xsl:when> 8574 <xsl:when test="$input-char='O' or $input-char='o' or $input-char='15' or $input-char='Roman_XV' or $input-char='Roman_xv' or $input-char='十五' or $input-char='拾伍'"> 8575 <xsl:choose> 8576 <xsl:when test="$output-type='ARABIC'">15</xsl:when> 8577 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">o</xsl:when> 8578 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">O</xsl:when> 8579 <xsl:when test="$output-type='ROMAN_UPPER'">XV</xsl:when> 8580 <xsl:when test="$output-type='ROMAN_LOWER'">xv</xsl:when> 8581 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">15</xsl:when> 8582 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十五</xsl:when> 8583 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">15</xsl:when> 8584 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾伍</xsl:when> 8585 <xsl:when test="$output-type='CIRCLE_NUMBER'">15</xsl:when> 8586 <xsl:otherwise>15</xsl:otherwise> 8587 </xsl:choose> 8588 </xsl:when> 8589 <xsl:when test="$input-char='P' or $input-char='p' or $input-char='16' or $input-char='Roman_XVI' or $input-char='Roman_xvi' or $input-char='十六' or $input-char='拾陆'"> 8590 <xsl:choose> 8591 <xsl:when test="$output-type='ARABIC'">16</xsl:when> 8592 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">p</xsl:when> 8593 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">P</xsl:when> 8594 <xsl:when test="$output-type='ROMAN_UPPER'">XVI</xsl:when> 8595 <xsl:when test="$output-type='ROMAN_LOWER'">xvi</xsl:when> 8596 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">16</xsl:when> 8597 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十六</xsl:when> 8598 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">16</xsl:when> 8599 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾陆</xsl:when> 8600 <xsl:when test="$output-type='CIRCLE_NUMBER'">16</xsl:when> 8601 <xsl:otherwise>16</xsl:otherwise> 8602 </xsl:choose> 8603 </xsl:when> 8604 <xsl:when test="$input-char='Q' or $input-char='q' or $input-char='17' or $input-char='Roman_XVII' or $input-char='Roman_xvii' or $input-char='十七' or $input-char='拾柒'"> 8605 <xsl:choose> 8606 <xsl:when test="$output-type='ARABIC'">17</xsl:when> 8607 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">q</xsl:when> 8608 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">Q</xsl:when> 8609 <xsl:when test="$output-type='ROMAN_UPPER'">XVII</xsl:when> 8610 <xsl:when test="$output-type='ROMAN_LOWER'">xvii</xsl:when> 8611 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">17</xsl:when> 8612 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十七</xsl:when> 8613 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">17</xsl:when> 8614 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾柒</xsl:when> 8615 <xsl:when test="$output-type='CIRCLE_NUMBER'">17</xsl:when> 8616 <xsl:otherwise>17</xsl:otherwise> 8617 </xsl:choose> 8618 </xsl:when> 8619 <xsl:when test="$input-char='R' or $input-char='r' or $input-char='18' or $input-char='Roman_XVIII' or $input-char='Roman_xviii' or $input-char='十八' or $input-char='拾捌'"> 8620 <xsl:choose> 8621 <xsl:when test="$output-type='ARABIC'">18</xsl:when> 8622 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">r</xsl:when> 8623 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">R</xsl:when> 8624 <xsl:when test="$output-type='ROMAN_UPPER'">XVIII</xsl:when> 8625 <xsl:when test="$output-type='ROMAN_LOWER'">xviii</xsl:when> 8626 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">18</xsl:when> 8627 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十八</xsl:when> 8628 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">18</xsl:when> 8629 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾捌</xsl:when> 8630 <xsl:when test="$output-type='CIRCLE_NUMBER'">18</xsl:when> 8631 <xsl:otherwise>18</xsl:otherwise> 8632 </xsl:choose> 8633 </xsl:when> 8634 <xsl:when test="$input-char='S' or $input-char='s' or $input-char='19' or $input-char='Roman_XIX' or $input-char='Roman_xix' or $input-char='十九' or $input-char='拾玖'"> 8635 <xsl:choose> 8636 <xsl:when test="$output-type='ARABIC'">19</xsl:when> 8637 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">s</xsl:when> 8638 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">S</xsl:when> 8639 <xsl:when test="$output-type='ROMAN_UPPER'">XIX</xsl:when> 8640 <xsl:when test="$output-type='ROMAN_LOWER'">xix</xsl:when> 8641 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">19</xsl:when> 8642 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十九</xsl:when> 8643 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">19</xsl:when> 8644 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾玖</xsl:when> 8645 <xsl:when test="$output-type='CIRCLE_NUMBER'">19</xsl:when> 8646 <xsl:otherwise>19</xsl:otherwise> 8647 </xsl:choose> 8648 </xsl:when> 8649 <xsl:when test="$input-char='T' or $input-char='t' or $input-char='20' or $input-char='Roman_XX' or $input-char='Roman_xx' or $input-char='二十' or $input-char='贰拾'"> 8650 <xsl:choose> 8651 <xsl:when test="$output-type='ARABIC'">20</xsl:when> 8652 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">t</xsl:when> 8653 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">T</xsl:when> 8654 <xsl:when test="$output-type='ROMAN_UPPER'">XX</xsl:when> 8655 <xsl:when test="$output-type='ROMAN_LOWER'">xx</xsl:when> 8656 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">20</xsl:when> 8657 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十</xsl:when> 8658 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">20</xsl:when> 8659 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾</xsl:when> 8660 <xsl:when test="$output-type='CIRCLE_NUMBER'">20</xsl:when> 8661 <xsl:otherwise>20</xsl:otherwise> 8662 </xsl:choose> 8663 </xsl:when> 8664 <xsl:when test="$input-char='U' or $input-char='u' or $input-char='21' or $input-char='Roman_XXI' or $input-char='Roman_xxi' or $input-char='二十一' or $input-char='贰拾壹'"> 8665 <xsl:choose> 8666 <xsl:when test="$output-type='ARABIC'">21</xsl:when> 8667 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">u</xsl:when> 8668 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">U</xsl:when> 8669 <xsl:when test="$output-type='ROMAN_UPPER'">XXI</xsl:when> 8670 <xsl:when test="$output-type='ROMAN_LOWER'">xxi</xsl:when> 8671 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">21</xsl:when> 8672 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十一</xsl:when> 8673 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">21</xsl:when> 8674 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾壹</xsl:when> 8675 <xsl:when test="$output-type='CIRCLE_NUMBER'">21</xsl:when> 8676 <xsl:otherwise>21</xsl:otherwise> 8677 </xsl:choose> 8678 </xsl:when> 8679 <xsl:when test="$input-char='V' or $input-char='v' or $input-char='22' or $input-char='Roman_XXII' or $input-char='Roman_xxii' or $input-char='二十二' or $input-char='贰拾贰'"> 8680 <xsl:choose> 8681 <xsl:when test="$output-type='ARABIC'">22</xsl:when> 8682 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">v</xsl:when> 8683 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">V</xsl:when> 8684 <xsl:when test="$output-type='ROMAN_UPPER'">XXII</xsl:when> 8685 <xsl:when test="$output-type='ROMAN_LOWER'">xxii</xsl:when> 8686 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">22</xsl:when> 8687 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十二</xsl:when> 8688 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">22</xsl:when> 8689 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾贰</xsl:when> 8690 <xsl:when test="$output-type='CIRCLE_NUMBER'">22</xsl:when> 8691 <xsl:otherwise>22</xsl:otherwise> 8692 </xsl:choose> 8693 </xsl:when> 8694 <xsl:when test="$input-char='W' or $input-char='w' or $input-char='23' or $input-char='Roman_XXIII' or $input-char='Roman_xxiii' or $input-char='二十三' or $input-char='贰拾叁'"> 8695 <xsl:choose> 8696 <xsl:when test="$output-type='ARABIC'">23</xsl:when> 8697 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">w</xsl:when> 8698 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">W</xsl:when> 8699 <xsl:when test="$output-type='ROMAN_UPPER'">XXIII</xsl:when> 8700 <xsl:when test="$output-type='ROMAN_LOWER'">xxiii</xsl:when> 8701 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">23</xsl:when> 8702 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十三</xsl:when> 8703 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">23</xsl:when> 8704 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾叁</xsl:when> 8705 <xsl:when test="$output-type='CIRCLE_NUMBER'">23</xsl:when> 8706 <xsl:otherwise>23</xsl:otherwise> 8707 </xsl:choose> 8708 </xsl:when> 8709 <xsl:when test="$input-char='X' or $input-char='x' or $input-char='24' or $input-char='Roman_XXIV' or $input-char='Roman_xxiv' or $input-char='二十四' or $input-char='贰拾肆'"> 8710 <xsl:choose> 8711 <xsl:when test="$output-type='ARABIC'">24</xsl:when> 8712 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">x</xsl:when> 8713 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">X</xsl:when> 8714 <xsl:when test="$output-type='ROMAN_UPPER'">XXIV</xsl:when> 8715 <xsl:when test="$output-type='ROMAN_LOWER'">xxiv</xsl:when> 8716 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">24</xsl:when> 8717 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十四</xsl:when> 8718 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">24</xsl:when> 8719 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾肆</xsl:when> 8720 <xsl:when test="$output-type='CIRCLE_NUMBER'">24</xsl:when> 8721 <xsl:otherwise>24</xsl:otherwise> 8722 </xsl:choose> 8723 </xsl:when> 8724 <xsl:when test="$input-char='Y' or $input-char='y' or $input-char='25' or $input-char='Roman_XXV' or $input-char='Roman_xxv' or $input-char='二十五' or $input-char='贰拾伍'"> 8725 <xsl:choose> 8726 <xsl:when test="$output-type='ARABIC'">25</xsl:when> 8727 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">y</xsl:when> 8728 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">Y</xsl:when> 8729 <xsl:when test="$output-type='ROMAN_UPPER'">XXV</xsl:when> 8730 <xsl:when test="$output-type='ROMAN_LOWER'">xxv</xsl:when> 8731 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">25</xsl:when> 8732 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十五</xsl:when> 8733 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">25</xsl:when> 8734 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾伍</xsl:when> 8735 <xsl:when test="$output-type='CIRCLE_NUMBER'">25</xsl:when> 8736 <xsl:otherwise>25</xsl:otherwise> 8737 </xsl:choose> 8738 </xsl:when> 8739 <xsl:when test="$input-char='Z' or $input-char='z' or $input-char='26' or $input-char='Roman_XXVI' or $input-char='Roman_xxvi' or $input-char='二十六' or $input-char='贰拾陆'"> 8740 <xsl:choose> 8741 <xsl:when test="$output-type='ARABIC'">26</xsl:when> 8742 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">z</xsl:when> 8743 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">Z</xsl:when> 8744 <xsl:when test="$output-type='ROMAN_UPPER'">XXVI</xsl:when> 8745 <xsl:when test="$output-type='ROMAN_LOWER'">xxvi</xsl:when> 8746 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">26</xsl:when> 8747 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十六</xsl:when> 8748 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">26</xsl:when> 8749 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾陆</xsl:when> 8750 <xsl:when test="$output-type='CIRCLE_NUMBER'">26</xsl:when> 8751 <xsl:otherwise>26</xsl:otherwise> 8752 </xsl:choose> 8753 </xsl:when> 8754 <xsl:otherwise> 8755 <xsl:choose> 8756 <xsl:when test="$output-type='ARABIC'">1</xsl:when> 8757 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">a</xsl:when> 8758 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">A</xsl:when> 8759 <xsl:when test="$output-type='ROMAN_UPPER'">I</xsl:when> 8760 <xsl:when test="$output-type='ROMAN_LOWER'">i</xsl:when> 8761 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">1</xsl:when> 8762 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">一</xsl:when> 8763 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">1</xsl:when> 8764 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">壹</xsl:when> 8765 <xsl:when test="$output-type='CIRCLE_NUMBER'">1</xsl:when> 8766 <xsl:otherwise>1</xsl:otherwise> 8767 </xsl:choose> 8768 </xsl:otherwise> 8769 </xsl:choose> 8770 </xsl:template> 8771 <!--RedOffice comment (Zengjh) end charts--> 8772 <!-- 以下模板的作用是将网格线颜色由16进制转换为十进制 --> 8773 <xsl:template name="transform-hex-to-decimal"> 8774 <xsl:param name="number"/> 8775 <xsl:variable name="R-color-number"> 8776 <xsl:call-template name="color-hex-to-decimal"> 8777 <xsl:with-param name="chars" select="substring($number,2,2)"/> 8778 </xsl:call-template> 8779 </xsl:variable> 8780 <xsl:variable name="G-color-number"> 8781 <xsl:call-template name="color-hex-to-decimal"> 8782 <xsl:with-param name="chars" select="substring($number,4,2)"/> 8783 </xsl:call-template> 8784 </xsl:variable> 8785 <xsl:variable name="B-color-number"> 8786 <xsl:call-template name="color-hex-to-decimal"> 8787 <xsl:with-param name="chars" select="substring($number,6,2)"/> 8788 </xsl:call-template> 8789 </xsl:variable> 8790 <xsl:value-of select="$R-color-number * 65536 + $G-color-number * 256 + $B-color-number"/> 8791 </xsl:template> 8792 <!-- 以下模板的作用是为R或G或B颜色转换为十进制形式--> 8793 <xsl:template name="color-hex-to-decimal"> 8794 <xsl:param name="chars"/> 8795 <xsl:variable name="first-num"> 8796 <xsl:call-template name="hex-to-decimal"> 8797 <xsl:with-param name="char" select="substring($chars,1,1)"/> 8798 </xsl:call-template> 8799 </xsl:variable> 8800 <xsl:variable name="second-num"> 8801 <xsl:call-template name="hex-to-decimal"> 8802 <xsl:with-param name="char" select="substring($chars,2,1)"/> 8803 </xsl:call-template> 8804 </xsl:variable> 8805 <xsl:value-of select="$first-num *16 + $second-num"/> 8806 </xsl:template> 8807 <xsl:template name="hex-to-decimal"> 8808 <xsl:param name="char"/> 8809 <xsl:choose> 8810 <xsl:when test="$char='0'">0</xsl:when> 8811 <xsl:when test="$char='1'">1</xsl:when> 8812 <xsl:when test="$char='2'">2</xsl:when> 8813 <xsl:when test="$char='3'">3</xsl:when> 8814 <xsl:when test="$char='4'">4</xsl:when> 8815 <xsl:when test="$char='5'">5</xsl:when> 8816 <xsl:when test="$char='6'">6</xsl:when> 8817 <xsl:when test="$char='7'">7</xsl:when> 8818 <xsl:when test="$char='8'">8</xsl:when> 8819 <xsl:when test="$char='9'">9</xsl:when> 8820 <xsl:when test="$char='a'">10</xsl:when> 8821 <xsl:when test="$char='b'">11</xsl:when> 8822 <xsl:when test="$char='c'">12</xsl:when> 8823 <xsl:when test="$char='d'">13</xsl:when> 8824 <xsl:when test="$char='e'">14</xsl:when> 8825 <xsl:when test="$char='f'">15</xsl:when> 8826 </xsl:choose> 8827 </xsl:template> 8828 <!-- end --> 8829 <!--ro000179 chenjh--> 8830 <xsl:template name="search-left-top-in-tables"> 8831 <xsl:param name="cellstylename"/> 8832 <xsl:param name="tableslist"/> 8833 <xsl:param name="return"/> 8834 <xsl:choose> 8835 <xsl:when test="$tableslist and $return=''"> 8836 <xsl:variable name="firsttablerows" select="$tableslist[1]//表:行"/> 8837 <xsl:variable name="first-left-top"> 8838 <xsl:call-template name="search-left-top-inatable"> 8839 <xsl:with-param name="row-num" select="'1'"/> 8840 <xsl:with-param name="firsttablerows" select="$firsttablerows"/> 8841 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8842 <xsl:with-param name="return" select="''"/> 8843 </xsl:call-template> 8844 </xsl:variable> 8845 <xsl:variable name="rest-left-top"> 8846 <xsl:call-template name="search-left-top-in-tables"> 8847 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8848 <xsl:with-param name="tableslist" select="$tableslist[position()!=1]"/> 8849 <xsl:with-param name="return" select="$first-left-top"/> 8850 </xsl:call-template> 8851 </xsl:variable> 8852 <xsl:choose> 8853 <xsl:when test="$first-left-top!=''"> 8854 <xsl:value-of select="$first-left-top"/> 8855 </xsl:when> 8856 <xsl:when test="$rest-left-top!=''"> 8857 <xsl:value-of select="$rest-left-top"/> 8858 </xsl:when> 8859 <xsl:otherwise> 8860 <xsl:value-of select="''"/> 8861 </xsl:otherwise> 8862 </xsl:choose> 8863 </xsl:when> 8864 <xsl:otherwise> 8865 <xsl:value-of select="$return"/> 8866 </xsl:otherwise> 8867 </xsl:choose> 8868 </xsl:template> 8869 <!-- 以下模板的作用为在一个table中寻找左上角--> 8870 <xsl:template name="search-left-top-inatable"> 8871 <xsl:param name="row-num"/> 8872 <xsl:param name="firsttablerows"/> 8873 <xsl:param name="cellstylename"/> 8874 <xsl:param name="return"/> 8875 <xsl:choose> 8876 <xsl:when test="$firsttablerows and $return=''"> 8877 <xsl:variable name="firstcells" select="$firsttablerows[1]/表:单元格"/> 8878 <xsl:variable name="first-left-top"> 8879 <xsl:call-template name="search-left-top-inarow"> 8880 <xsl:with-param name="row-num" select="$row-num"/> 8881 <xsl:with-param name="firstcells" select="$firstcells"/> 8882 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8883 <xsl:with-param name="return" select="''"/> 8884 </xsl:call-template> 8885 </xsl:variable> 8886 <xsl:variable name="row-num-p"> 8887 <xsl:choose> 8888 <xsl:when test="$firsttablerows[1]/@表:跨度"> 8889 <xsl:value-of select="$row-num+ $firsttablerows[1]/@表:跨度"/> 8890 </xsl:when> 8891 <xsl:otherwise> 8892 <xsl:value-of select="$row-num+1"/> 8893 </xsl:otherwise> 8894 </xsl:choose> 8895 </xsl:variable> 8896 <xsl:variable name="rest-left-top"> 8897 <xsl:call-template name="search-left-top-inatable"> 8898 <xsl:with-param name="row-num" select="$row-num-p"/> 8899 <xsl:with-param name="firsttablerows" select="$firsttablerows[position()!=1]"/> 8900 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8901 <xsl:with-param name="return" select="$first-left-top"/> 8902 </xsl:call-template> 8903 </xsl:variable> 8904 <xsl:choose> 8905 <xsl:when test="$first-left-top!=''"> 8906 <xsl:value-of select="$first-left-top"/> 8907 </xsl:when> 8908 <xsl:when test="$rest-left-top !=''"> 8909 <xsl:value-of select="$rest-left-top "/> 8910 </xsl:when> 8911 <xsl:otherwise> 8912 <xsl:value-of select="''"/> 8913 </xsl:otherwise> 8914 </xsl:choose> 8915 </xsl:when> 8916 <xsl:otherwise> 8917 <xsl:value-of select="$return"/> 8918 </xsl:otherwise> 8919 </xsl:choose> 8920 </xsl:template> 8921 <!-- 以下模板的作用为在某一行中寻找左上角--> 8922 <xsl:template name="search-left-top-inarow"> 8923 <xsl:param name="row-num"/> 8924 <xsl:param name="firstcells"/> 8925 <xsl:param name="cellstylename"/> 8926 <xsl:param name="return"/> 8927 <xsl:choose> 8928 <xsl:when test="$firstcells and $return=''"> 8929 <xsl:variable name="firstcell" select="$firstcells[1]"/> 8930 <xsl:variable name="first-left-top"> 8931 <xsl:call-template name="search-left-top-inacell"> 8932 <xsl:with-param name="row-num" select="$row-num"/> 8933 <xsl:with-param name="cell" select="$firstcell"/> 8934 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8935 </xsl:call-template> 8936 </xsl:variable> 8937 <xsl:variable name="rest-left-top"> 8938 <xsl:call-template name="search-left-top-inarow"> 8939 <xsl:with-param name="row-num" select="$row-num"/> 8940 <xsl:with-param name="firstcells" select="$firstcells[position()!=1]"/> 8941 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8942 <xsl:with-param name="return" select="$first-left-top"/> 8943 </xsl:call-template> 8944 </xsl:variable> 8945 <xsl:choose> 8946 <xsl:when test="$first-left-top!=''"> 8947 <xsl:value-of select="$first-left-top"/> 8948 </xsl:when> 8949 <xsl:when test="$rest-left-top !=''"> 8950 <xsl:value-of select="$rest-left-top "/> 8951 </xsl:when> 8952 <xsl:otherwise> 8953 <xsl:value-of select="''"/> 8954 </xsl:otherwise> 8955 </xsl:choose> 8956 </xsl:when> 8957 <xsl:otherwise> 8958 <xsl:value-of select="$return"/> 8959 </xsl:otherwise> 8960 </xsl:choose> 8961 </xsl:template> 8962 <!-- 以下的模板的作用为判断某个cell是否为左上角 --> 8963 <xsl:template name="search-left-top-inacell"> 8964 <xsl:param name="row-num"/> 8965 <xsl:param name="cell"/> 8966 <xsl:param name="cellstylename"/> 8967 <xsl:choose> 8968 <xsl:when test="$cell/@表:式样引用=$cellstylename"> 8969 <xsl:value-of select="concat($cell/ancestor::表:工作表/@表:名称,'.',$cell/@表:列号,' ',$row-num)"/> 8970 </xsl:when> 8971 <xsl:otherwise> 8972 <xsl:value-of select="''"/> 8973 <!-- <xsl:variable name="style-is-default"> 8974 <xsl:call-template name="is-default-or-not-condition-format"> 8975 <xsl:with-param name="column-num" select="$cell/@表:列号"/> 8976 <xsl:with-param name="cell" select="$cell"/> 8977 <xsl:with-param name="preceding-cellstylename" select="''"/> 8978 <xsl:with-param name="temp-num" select="'0'"/> 8979 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8980 <xsl:with-param name="table-columns" select="$cell/ancestor::表:工作表内容//表:列"/> 8981 </xsl:call-template> 8982 </xsl:variable> 8983 <xsl:choose> 8984 <xsl:when test="$style-is-default='yes' "> 8985 <xsl:value-of select="concat($cell/ancestor::表:工作表/@表:名称,'.',$cell/@表:列号,' ',$row-num)"/> 8986 </xsl:when> 8987 <xsl:otherwise> 8988 <xsl:value-of select="''"/> 8989 </xsl:otherwise> 8990 </xsl:choose> --> 8991 </xsl:otherwise> 8992 </xsl:choose> 8993 </xsl:template> 8994 <xsl:template name="translate-left-top"> 8995 <xsl:param name="left-top"/> 8996 <xsl:if test="$left-top!=''"> 8997 <xsl:variable name="column-number" select="substring-before(substring-after($left-top,'.'),' ')"/> 8998 <xsl:variable name="column-number1"> 8999 <xsl:value-of select="floor( $column-number div 26 )"/> 9000 </xsl:variable> 9001 <xsl:variable name="column-number2"> 9002 <xsl:value-of select="$column-number mod 26"/> 9003 </xsl:variable> 9004 <xsl:variable name="column-character1"> 9005 <xsl:call-template name="number-to-character"> 9006 <xsl:with-param name="number" select="$column-number1"/> 9007 </xsl:call-template> 9008 </xsl:variable> 9009 <xsl:variable name="column-character2"> 9010 <xsl:call-template name="number-to-character"> 9011 <xsl:with-param name="number" select="$column-number2"/> 9012 </xsl:call-template> 9013 </xsl:variable> 9014 <xsl:value-of select="concat(substring-before($left-top,'.'),'.',$column-character1,$column-character2,substring-after($left-top,' '))"/> 9015 </xsl:if> 9016 </xsl:template> 9017 <xsl:template name="create-the-condition-format-map"> 9018 <xsl:param name="condition-format-set"/> 9019 <xsl:param name="current-left-top"/> 9020 <xsl:if test="$condition-format-set"> 9021 <xsl:choose> 9022 <xsl:when test="contains($condition-format-set[1]/表:区域/text(),$current-left-top)"> 9023 <xsl:for-each select="$condition-format-set[1]/表:条件"> 9024 <xsl:variable name="condition-text"> 9025 <xsl:choose> 9026 <xsl:when test="@表:类型='cell value'"> 9027 <xsl:choose> 9028 <xsl:when test="表:操作码/text()='between' "> 9029 <xsl:value-of select="concat('cell-content-is-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 9030 </xsl:when> 9031 <xsl:when test=" 表:操作码/text()='not between'"> 9032 <xsl:value-of select="concat('cell-content-is-not-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 9033 </xsl:when> 9034 <xsl:when test="表:操作码/text()='equal to'"> 9035 <xsl:value-of select="concat('cell-content()=',表:第一操作数/text())"/> 9036 </xsl:when> 9037 <xsl:when test="表:操作码/text()='not equal to'"> 9038 <xsl:value-of select="concat('cell-content()!=',表:第一操作数/text())"/> 9039 </xsl:when> 9040 <xsl:when test="表:操作码/text()='greater than'"> 9041 <xsl:value-of select="concat('cell-content()>',表:第一操作数/text())"/> 9042 </xsl:when> 9043 <xsl:when test="表:操作码/text()='less than'"> 9044 <xsl:value-of select="concat('cell-content()<',表:第一操作数/text())"/> 9045 </xsl:when> 9046 <xsl:when test="表:操作码/text()='greater than or equal to'"> 9047 <xsl:value-of select="concat('cell-content()>=',表:第一操作数/text())"/> 9048 </xsl:when> 9049 <xsl:when test="表:操作码/text()='less than or equal to'"> 9050 <xsl:value-of select="concat('cell-content()<=',表:第一操作数/text())"/> 9051 </xsl:when> 9052 </xsl:choose> 9053 </xsl:when> 9054 <xsl:when test="@表:类型='formula'"> 9055 <xsl:value-of select="concat('is-true-formula','(',表:第一操作数/text(),')')"/> 9056 </xsl:when> 9057 </xsl:choose> 9058 </xsl:variable> 9059 <xsl:element name="style:map"> 9060 <xsl:attribute name="style:condition"><xsl:value-of select="$condition-text"/></xsl:attribute> 9061 <xsl:attribute name="style:apply-style-name"><xsl:value-of select="//uof:单元格式样[@表:标识符=current()/表:格式/@表:式样引用]/@表:名称"/></xsl:attribute> 9062 <xsl:attribute name="style:base-cell-address"><xsl:value-of select="substring-after($condition-format-set[1]/表:区域/text(),':')"/></xsl:attribute> 9063 </xsl:element> 9064 </xsl:for-each> 9065 </xsl:when> 9066 <xsl:otherwise> 9067 <xsl:call-template name="create-the-condition-format-map"> 9068 <xsl:with-param name="condition-format-set" select="$condition-format-set[position()!=1]"/> 9069 <xsl:with-param name="current-left-top" select="$current-left-top"/> 9070 </xsl:call-template> 9071 </xsl:otherwise> 9072 </xsl:choose> 9073 </xsl:if> 9074 </xsl:template> 9075 <!--ro000179 end--> 9076</xsl:stylesheet> 9077