1<?xml version="1.0" encoding="UTF-8"?> 2<!--*********************************************************** 3 * 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 * 21 ***********************************************************--> 22<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"> 23 <xsl:output method="xml" indent="no" encoding="UTF-8" version="1.0"/> 24 <xsl:template match="uof:UOF"> 25 <!--chengxz0804 OK--> 26 <!--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"--> 27 <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"> 28 <xsl:apply-templates select="uof:元数据"/> 29 <office:settings> 30 <xsl:call-template name="工作表属性"/> 31 </office:settings> 32 <xsl:apply-templates select="uof:式样集"/> 33 <!--xsl:apply-templates select="表:公用处理规则"/--> 34 <xsl:apply-templates select="uof:电子表格"/> 35 </office:document> 36 </xsl:template> 37 <!--Redoffice comment lil from chenjh SC0013 06.02.15--> 38 <!--增加内容--> 39 <xsl:variable name="uofUnit"> 40 <xsl:variable name="uu"> 41 <xsl:value-of select="/uof:UOF/uof:电子表格/表:公用处理规则/表:度量单位"/> 42 </xsl:variable> 43 <xsl:choose> 44 <xsl:when test="$uu='cm'">cm</xsl:when> 45 <xsl:when test="$uu='mm'">mm</xsl:when> 46 <xsl:when test="$uu='pt'">pt</xsl:when> 47 <xsl:when test="$uu='inch'">inch</xsl:when> 48 <xsl:otherwise>cm</xsl:otherwise> 49 </xsl:choose> 50 </xsl:variable> 51 <xsl:variable name="other-to-cm-conversion-factor"> 52 <xsl:choose> 53 <xsl:when test="$uofUnit='cm'">1</xsl:when> 54 <xsl:when test="$uofUnit='mm'">0.1</xsl:when> 55 <xsl:when test="$uofUnit='pt'">0.03527</xsl:when> 56 <xsl:when test="$uofUnit='inch'">2.54</xsl:when> 57 <xsl:when test="$uofUnit='pica'">0.4233</xsl:when> 58 <xsl:otherwise>0.03527</xsl:otherwise> 59 </xsl:choose> 60 </xsl:variable> 61 <!--Redoffice comment liliang end 06.02.15--> 62 <xsl:template name="set-calculation"> 63 <xsl:element name="table:calculation-settings"> 64 <xsl:if test="表:公用处理规则/表:度量单位"> 65 <xsl:variable name="uofUnit"> 66 <xsl:variable name="uu"> 67 <xsl:value-of select="表:公用处理规则/表:度量单位"/> 68 </xsl:variable> 69 <xsl:choose> 70 <xsl:when test="$uu='cm'">cm</xsl:when> 71 <xsl:when test="$uu='mm'">mm</xsl:when> 72 <xsl:when test="$uu='pt'">pt</xsl:when> 73 <xsl:when test="$uu='inch'">inch</xsl:when> 74 <xsl:otherwise>cm</xsl:otherwise> 75 </xsl:choose> 76 </xsl:variable> 77 <xsl:variable name="other-to-cm-conversion-factor"> 78 <xsl:choose> 79 <xsl:when test="$uofUnit='cm'">1</xsl:when> 80 <xsl:when test="$uofUnit='mm'">0.1</xsl:when> 81 <xsl:when test="$uofUnit='pt'">0.03527</xsl:when> 82 <xsl:when test="$uofUnit='inch'">2.54</xsl:when> 83 <xsl:when test="$uofUnit='pica'">0.4233</xsl:when> 84 <xsl:otherwise>1</xsl:otherwise> 85 </xsl:choose> 86 </xsl:variable> 87 </xsl:if> 88 <xsl:if test="表:公用处理规则/表:精确度以显示值为准"> 89 <xsl:attribute name="table:precision-as-shown">true</xsl:attribute> 90 </xsl:if> 91 <xsl:if test="表:公用处理规则/表:日期系统-1904/@表:值='true'"> 92 <table:null-date table:date-value="1904-01-01"/> 93 </xsl:if> 94 <xsl:if test="表:公用处理规则/表:计算设置"> 95 <xsl:element name="table:iteration"> 96 <xsl:attribute name="table:status">enable</xsl:attribute> 97 <xsl:attribute name="table:steps"><xsl:value-of select="表:公用处理规则/表:计算设置/@表:迭代次数"/></xsl:attribute> 98 <xsl:attribute name="table:maximum-difference"><xsl:value-of select="表:公用处理规则/表:计算设置/@表:偏差值"/></xsl:attribute> 99 </xsl:element> 100 </xsl:if> 101 </xsl:element> 102 </xsl:template> 103 <xsl:template match="uof:字体集"> 104 <xsl:if test="not(uof:字体声明[@uof:名称='StarSymbol'])"> 105 <style:font-face style:name="StarSymbol" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> 106 </xsl:if> 107 <xsl:for-each select="uof:字体声明"> 108 <xsl:element name="style:font-face"> 109 <xsl:attribute name="style:name"><xsl:value-of select="@uof:名称"/></xsl:attribute> 110 <xsl:attribute name="svg:font-family"><xsl:value-of select="@uof:字体族"/></xsl:attribute> 111 <xsl:if test="@uof:字符集 = '02'"> 112 <xsl:attribute name="style:font-charset">x-symbol</xsl:attribute> 113 </xsl:if> 114 <xsl:if test="@uof:字体族"> 115 <xsl:choose> 116 <xsl:when test="@uof:字体族 = 'Swiss'"> 117 <xsl:attribute name="style:font-family-generic">swiss</xsl:attribute> 118 </xsl:when> 119 <xsl:when test="@uof:字体族 ='Modern'"> 120 <xsl:attribute name="style:font-family-generic">modern</xsl:attribute> 121 </xsl:when> 122 <xsl:when test="@uof:字体族='Roman'"> 123 <xsl:attribute name="style:font-family-generic">roman</xsl:attribute> 124 </xsl:when> 125 <xsl:when test="@uof:字体族 ='Script'"> 126 <xsl:attribute name="style:font-family-generic">script</xsl:attribute> 127 </xsl:when> 128 <xsl:when test="@uof:字体族 ='Decorative'"> 129 <xsl:attribute name="style:font-family-generic">decorative</xsl:attribute> 130 </xsl:when> 131 <xsl:when test="@uof:字体族 ='System'"> 132 <xsl:attribute name="style:font-family-generic">system</xsl:attribute> 133 </xsl:when> 134 <xsl:otherwise> 135 <xsl:attribute name="style:font-family-generic">system</xsl:attribute> 136 </xsl:otherwise> 137 </xsl:choose> 138 </xsl:if> 139 <xsl:attribute name="style:font-pitch">12</xsl:attribute> 140 </xsl:element> 141 </xsl:for-each> 142 <xsl:apply-templates select="uof:字体声明"/> 143 </xsl:template> 144 <xsl:template match="uof:电子表格"> 145 <office:body> 146 <office:spreadsheet> 147 <xsl:call-template name="trackchange"/> 148 <xsl:call-template name="set-calculation"/> 149 <xsl:if test="表:公用处理规则/表:数据有效性集"> 150 <xsl:element name="table:content-validations"> 151 <xsl:call-template name="create-content-validations"> 152 <xsl:with-param name="validation-set" select="表:公用处理规则/表:数据有效性集/表:数据有效性"/> 153 </xsl:call-template> 154 </xsl:element> 155 </xsl:if> 156 <xsl:apply-templates select="表:主体/表:工作表"/> 157 <!--MSexcel 中的names暂时没有对应的--> 158 <xsl:element name="table:database-ranges"> 159 <xsl:for-each select="表:主体/表:工作表"> 160 <xsl:if test="./表:筛选"> 161 <xsl:variable name="filter" select="./表:筛选"/> 162 <xsl:variable name="column-and-row" select="substring-before(substring-after($filter/表:范围/text(),'.'),':')"/> 163 <xsl:variable name="dd" select="number(substring($column-and-row,2,1))"/> 164 <xsl:variable name="zone-left-column-string"> 165 <xsl:choose> 166 <xsl:when test="contains($dd,'NaN') "> 167 <xsl:value-of select="substring($column-and-row,1,2)"/> 168 </xsl:when> 169 <xsl:otherwise> 170 <xsl:value-of select="substring($column-and-row,1,1)"/> 171 </xsl:otherwise> 172 </xsl:choose> 173 </xsl:variable> 174 <xsl:variable name="zone-left-column-num"> 175 <xsl:call-template name="translate-column-char-to-number"> 176 <xsl:with-param name="string" select="$zone-left-column-string"/> 177 </xsl:call-template> 178 </xsl:variable> 179 <xsl:element name="table:database-range"> 180 <xsl:attribute name="table:name"><xsl:value-of select="uof:电子表格/表:主体/表:工作表/@表:名称"/></xsl:attribute> 181 <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> 182 <xsl:if test="$filter/@表:类型='auto'"> 183 <xsl:attribute name="table:display-filter-buttons">true</xsl:attribute> 184 </xsl:if> 185 <xsl:choose> 186 <xsl:when test="$filter/表:条件区域"> 187 <xsl:element name="table:filter"> 188 <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> 189 </xsl:element> 190 </xsl:when> 191 <xsl:otherwise> 192 <xsl:element name="table:filter"> 193 <xsl:element name="table:filter-and"> 194 <xsl:call-template name="auto-filter-condition"> 195 <xsl:with-param name="conditon-set" select="$filter/表:条件"/> 196 <xsl:with-param name="zone-left-column-num" select="$zone-left-column-num"/> 197 </xsl:call-template> 198 </xsl:element> 199 </xsl:element> 200 </xsl:otherwise> 201 </xsl:choose> 202 </xsl:element> 203 </xsl:if> 204 </xsl:for-each> 205 </xsl:element> 206 </office:spreadsheet> 207 </office:body> 208 </xsl:template> 209 <xsl:template name="trackchange"> 210 <xsl:for-each select="表:主体/表:工作表/表:工作表内容//字:修订开始"> 211 <xsl:variable name="num"> 212 <xsl:number level="any" from="表:主体/表:工作表/表:工作表内容//*" count="字:修订开始"/> 213 </xsl:variable> 214 <table:tracked-changes> 215 <table:cell-content-change> 216 <xsl:attribute name="table:id"><xsl:value-of select="concat('ct',$num)"/></xsl:attribute> 217 <table:cell-address> 218 <xsl:attribute name="table:column"><xsl:value-of select="substring-after(@字:标识符,'-')"/></xsl:attribute> 219 <xsl:attribute name="table:row"><xsl:value-of select="substring-before(@字:标识符,'-')"/></xsl:attribute> 220 <xsl:attribute name="table:table">0</xsl:attribute> 221 </table:cell-address> 222 <office:change-info> 223 <dc:creator> 224 <xsl:choose> 225 <xsl:when test="starts-with(@字:修订信息引用,'+')"/> 226 <xsl:otherwise> 227 <xsl:value-of select="substring-before(@字:修订信息引用,'+')"/> 228 </xsl:otherwise> 229 </xsl:choose> 230 </dc:creator> 231 <!--xsl:value-of select="/uof:UOF/uof:元数据/uof:作者"/--> 232 <!--xsl:value-of select="/uof:UOF/uof:元数据/uof:创建日期"/--> 233 <dc:date> 234 <xsl:value-of select="substring-before(substring-after(@字:修订信息引用,'+'),'%')"/> 235 </dc:date> 236 </office:change-info> 237 <table:previous> 238 <table:change-track-table-cell> 239 <text:p> 240 <xsl:value-of select="substring-after(@字:修订信息引用,'%')"/> 241 </text:p> 242 </table:change-track-table-cell> 243 </table:previous> 244 </table:cell-content-change> 245 </table:tracked-changes> 246 </xsl:for-each> 247 </xsl:template> 248 <xsl:template match="uof:式样集"> 249 <xsl:element name="office:font-face-decls"> 250 <style:font-face style:name="宋体" svg:font-family="宋体" style:font-family-generic="swiss"/> 251 <xsl:apply-templates select="uof:字体集"/> 252 </xsl:element> 253 <xsl:call-template name="单元格式样"/> 254 </xsl:template> 255 <xsl:key match="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/uof:锚点 | /uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/表:单元格/uof:锚点" name="rel_graphic_name" use="@uof:图形引用"/> 256 <xsl:template match="图:图形"> 257 <xsl:variable name="random-name"> 258 <xsl:value-of select="generate-id()"/> 259 </xsl:variable> 260 <xsl:variable name="draw-name"> 261 <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/> 262 </xsl:variable> 263 <xsl:call-template name="graphic-fill"> 264 <xsl:with-param name="draw-name" select="$draw-name"/> 265 <xsl:with-param name="gradient-name" select="图:预定义图形/图:属性/图:填充/图:渐变"/> 266 </xsl:call-template> 267 <xsl:choose> 268 <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变"> 269 <xsl:element name="style:style"> 270 <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 271 <xsl:attribute name="style:family">graphic</xsl:attribute> 272 <xsl:element name="style:graphic-properties"> 273 <xsl:call-template name="process-graphics"> 274 <xsl:with-param name="draw-name" select="$draw-name"/> 275 </xsl:call-template> 276 </xsl:element> 277 <xsl:element name="style:paragraph-properties"> 278 <xsl:if test="图:文本内容/@图:文字排列方向"> 279 <xsl:choose> 280 <xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'"> 281 <xsl:attribute name="style:writing-mode">tb-lr</xsl:attribute> 282 </xsl:when> 283 <xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'"> 284 <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute> 285 </xsl:when> 286 </xsl:choose> 287 </xsl:if> 288 </xsl:element> 289 </xsl:element> 290 </xsl:when> 291 <xsl:otherwise> 292 <xsl:element name="style:style"> 293 <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 294 <xsl:attribute name="style:family">graphic</xsl:attribute> 295 <xsl:element name="style:graphic-properties"> 296 <xsl:if test="@图:其他对象"> 297 <xsl:attribute name="fo:clip">rect(0cm 0cm 0cm 0cm)</xsl:attribute> 298 <xsl:attribute name="draw:color-mode">standard</xsl:attribute> 299 <xsl:attribute name="draw:luminance">0%</xsl:attribute> 300 <xsl:attribute name="draw:contrast">0%</xsl:attribute> 301 <xsl:attribute name="draw:gamma">100%</xsl:attribute> 302 <xsl:attribute name="draw:red">0%</xsl:attribute> 303 <xsl:attribute name="draw:green">0%</xsl:attribute> 304 <xsl:attribute name="draw:blue">0%</xsl:attribute> 305 <xsl:attribute name="draw:image-opacity">100%</xsl:attribute> 306 <xsl:attribute name="style:mirror">none</xsl:attribute> 307 </xsl:if> 308 <xsl:call-template name="process-graphics"/> 309 </xsl:element> 310 <xsl:element name="style:paragraph-properties"> 311 <xsl:if test="图:文本内容/@图:文字排列方向"> 312 <xsl:choose> 313 <xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'"> 314 <xsl:attribute name="style:writing-mode">tb-lr</xsl:attribute> 315 </xsl:when> 316 <xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'"> 317 <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute> 318 </xsl:when> 319 </xsl:choose> 320 </xsl:if> 321 </xsl:element> 322 </xsl:element> 323 </xsl:otherwise> 324 </xsl:choose> 325 </xsl:template> 326 <xsl:template name="process-graphics"> 327 <xsl:param name="draw-name"/> 328 <xsl:if test="not(key('rel_graphic_name',@图:标识符)/@uof:随动方式='movesize')"> 329 <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> 330 </xsl:if> 331 <xsl:choose> 332 <xsl:when test="not(图:预定义图形/图:属性/图:填充)"> 333 <xsl:attribute name="draw:fill">none</xsl:attribute> 334 </xsl:when> 335 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片"> 336 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 337 <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:attribute> 338 <xsl:if test="not(图:预定义图形/图:属性/图:填充/图:图片/@图:位置='tile')"> 339 <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> 340 </xsl:if> 341 </xsl:when> 342 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案"> 343 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 344 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:前景色"/></xsl:attribute> 345 </xsl:when> 346 <xsl:when test="图:预定义图形/图:属性/图:填充/图:颜色"> 347 <xsl:attribute name="draw:fill">solid</xsl:attribute> 348 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:颜色"/></xsl:attribute> 349 </xsl:when> 350 <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变"> 351 <xsl:attribute name="draw:fill">gradient</xsl:attribute> 352 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:渐变/@图:起始色"/></xsl:attribute> 353 <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute> 354 </xsl:when> 355 </xsl:choose> 356 <xsl:if test="图:预定义图形/图:属性/图:线颜色"> 357 <xsl:attribute name="svg:stroke-color"><xsl:value-of select="图:预定义图形/图:属性/图:线颜色"/></xsl:attribute> 358 </xsl:if> 359 <xsl:if test="图:预定义图形/图:属性/图:线型 and not(图:预定义图形/图:属性/图:线型 = 'single') and not(图:预定义图形/图:属性/图:线型 = 'thick')"> 360 <xsl:variable name="type" select="图:预定义图形/图:属性/图:线型"/> 361 <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> 362 <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> 363 </xsl:if> 364 <xsl:if test="图:预定义图形/图:属性/图:线粗细"> 365 <xsl:attribute name="svg:stroke-width"><xsl:value-of select="concat(图:预定义图形/图:属性/图:线粗细,$uofUnit)"/></xsl:attribute> 366 </xsl:if> 367 <xsl:if test="图:预定义图形/图:属性/图:前端箭头"> 368 <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> 369 <xsl:if test="图:预定义图形/图:属性/图:前端箭头/图:大小"> 370 <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> 371 </xsl:if> 372 </xsl:if> 373 <xsl:if test="图:预定义图形/图:属性/图:后端箭头"> 374 <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> 375 <xsl:if test="图:预定义图形/图:属性/图:后端箭头/图:大小"> 376 <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> 377 </xsl:if> 378 </xsl:if> 379 <xsl:if test="图:预定义图形/图:属性/图:透明度"> 380 <xsl:attribute name="draw:opacity"><xsl:value-of select="concat(图:预定义图形/图:属性/图:透明度,'%')"/></xsl:attribute> 381 </xsl:if> 382 <xsl:if test="图:文本内容"> 383 <xsl:if test="图:文本内容/@图:上边距"> 384 <xsl:attribute name="fo:padding-top"><xsl:value-of select="concat(图:文本内容/@图:上边距,$uofUnit)"/></xsl:attribute> 385 <xsl:attribute name="fo:padding-bottom"><xsl:value-of select="concat(图:文本内容/@图:下边距,$uofUnit)"/></xsl:attribute> 386 <xsl:attribute name="fo:padding-left"><xsl:value-of select="concat(图:文本内容/@图:左边距,$uofUnit)"/></xsl:attribute> 387 <xsl:attribute name="fo:padding-right"><xsl:value-of select="concat(图:文本内容/@图:右边距,$uofUnit)"/></xsl:attribute> 388 </xsl:if> 389 <xsl:if test="图:文本内容/@图:文字排列方向"> 390 <xsl:choose> 391 <xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'"> 392 <xsl:attribute name="style:writing-mode">tb-lr</xsl:attribute> 393 </xsl:when> 394 <xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'"> 395 <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute> 396 </xsl:when> 397 <xsl:when test="图:文本内容/@图:文字排列方向='hori-r2l'"> 398 <xsl:attribute name="draw:textarea-horizontal-align">right</xsl:attribute> 399 </xsl:when> 400 <xsl:when test="图:文本内容/@图:文字排列方向='hori-12r'"> 401 <xsl:attribute name="draw:textarea-horizontal-align">left</xsl:attribute> 402 </xsl:when> 403 </xsl:choose> 404 </xsl:if> 405 <xsl:if test="图:文本内容/@图:水平对齐"> 406 <xsl:attribute name="draw:textarea-horizontal-align"><xsl:value-of select="图:文本内容/@图:水平对齐"/></xsl:attribute> 407 </xsl:if> 408 <xsl:if test="图:文本内容/@图:垂直对齐"> 409 <xsl:attribute name="draw:textarea-vertical-align"><xsl:value-of select="图:文本内容/@图:垂直对齐"/></xsl:attribute> 410 </xsl:if> 411 <xsl:if test="图:文本内容/@图:自动换行"> 412 <xsl:attribute name="fo:wrap-option">no-wrap</xsl:attribute> 413 </xsl:if> 414 <xsl:attribute name="draw:auto-grow-width"><xsl:choose><xsl:when test="图:文本内容/@图:大小适应文字">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 415 <xsl:attribute name="draw:auto-grow-height"><xsl:choose><xsl:when test="图:文本内容/@图:大小适应文字">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 416 </xsl:if> 417 </xsl:template> 418 <xsl:template name="bina_graphic"> 419 <xsl:param name="refGraphic"/> 420 <xsl:element name="office:binary-data"> 421 <xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符 = $refGraphic]"> 422 <xsl:value-of select="uof:数据"/> 423 </xsl:for-each> 424 </xsl:element> 425 <text:p/> 426 </xsl:template> 427 <xsl:template name="graphic-fill"> 428 <xsl:param name="draw-name"/> 429 <xsl:param name="gradient-name"/> 430 <xsl:if test="图:预定义图形/图:属性/图:填充/图:渐变"> 431 <xsl:element name="draw:gradient"> 432 <xsl:attribute name="draw:name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute> 433 <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> 434 <xsl:attribute name="draw:start-color"><xsl:value-of select="$gradient-name/@图:起始色"/></xsl:attribute> 435 <xsl:attribute name="draw:end-color"><xsl:value-of select="$gradient-name/@图:终止色"/></xsl:attribute> 436 <xsl:attribute name="draw:start-intensity"><xsl:value-of select="concat($gradient-name/@图:起始浓度,'%')"/></xsl:attribute> 437 <xsl:attribute name="draw:end-intensity"><xsl:value-of select="concat($gradient-name/@图:终止浓度,'%')"/></xsl:attribute> 438 <xsl:attribute name="draw:angle"><xsl:value-of select="$gradient-name/@图:渐变方向 * 10"/></xsl:attribute> 439 <xsl:attribute name="draw:border"><xsl:value-of select="concat($gradient-name/@图:边界,'%')"/></xsl:attribute> 440 <xsl:if test="$gradient-name/@图:种子X位置"> 441 <xsl:attribute name="draw:cx"><xsl:value-of select="concat($gradient-name/@图:种子X位置,'%')"/></xsl:attribute> 442 </xsl:if> 443 <xsl:if test="$gradient-name/@图:种子Y位置"> 444 <xsl:attribute name="draw:cy"><xsl:value-of select="concat($gradient-name/@图:种子Y位置,'%')"/></xsl:attribute> 445 </xsl:if> 446 </xsl:element> 447 </xsl:if> 448 <xsl:if test="图:预定义图形/图:属性/图:前端箭头"> 449 <xsl:element name="draw:marker"> 450 <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> 451 <xsl:choose> 452 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'"> 453 <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute> 454 <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute> 455 </xsl:when> 456 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'"> 457 <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute> 458 <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> 459 </xsl:when> 460 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'"> 461 <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute> 462 <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> 463 </xsl:when> 464 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'"> 465 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 466 <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> 467 </xsl:when> 468 <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'"> 469 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 470 <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute> 471 </xsl:when> 472 </xsl:choose> 473 </xsl:element> 474 </xsl:if> 475 <xsl:if test="图:预定义图形/图:属性/图:后端箭头"> 476 <xsl:element name="draw:marker"> 477 <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> 478 <xsl:choose> 479 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'"> 480 <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute> 481 <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute> 482 </xsl:when> 483 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'"> 484 <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute> 485 <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> 486 </xsl:when> 487 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'"> 488 <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute> 489 <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> 490 </xsl:when> 491 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'"> 492 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 493 <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> 494 </xsl:when> 495 <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'"> 496 <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute> 497 <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute> 498 </xsl:when> 499 </xsl:choose> 500 </xsl:element> 501 </xsl:if> 502 <xsl:if test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用 or 图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"> 503 <xsl:element name="draw:fill-image"> 504 <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> 505 <xsl:call-template name="bina_graphic"> 506 <xsl:with-param name="refGraphic"> 507 <xsl:choose> 508 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"> 509 <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"/> 510 </xsl:when> 511 <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"> 512 <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/> 513 </xsl:when> 514 </xsl:choose> 515 </xsl:with-param> 516 </xsl:call-template> 517 </xsl:element> 518 </xsl:if> 519 <xsl:if test="not(图:预定义图形/图:属性/图:线型='single') and not(图:预定义图形/图:属性/图:线型='thick') and 图:预定义图形/图:属性/图:线型"> 520 <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"/> 521 <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"/> 522 <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"/> 523 <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%"/> 524 <draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/> 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="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"/> 528 <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%"/> 529 <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%"/> 530 <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"/> 531 <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%"/> 532 <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"/> 533 </xsl:if> 534 </xsl:template> 535 <xsl:template name="单元格式样"> 536 <xsl:variable name="uofSheet" select="/uof:UOF/uof:电子表格"/> 537 <xsl:variable name="uofSheet1" select="/uof:UOF/uof:电子表格/表:主体/表:工作表"/> 538 <xsl:variable name="uofSheetCom" select="$uofSheet/表:公用处理规则"/> 539 <xsl:variable name="first-style" select="/uof:UOF/uof:式样集/uof:单元格式样"/> 540 <xsl:variable name="quyu" select="/uof:UOF/uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化/表:区域"/> 541 <xsl:variable name="condition-format-set" select="/uof:UOF/uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化"/> 542 <xsl:variable name="aa"> 543 <xsl:for-each select="$first-style"> 544 <xsl:if test="@表:标识符!=@表:名称 and @表:名称!='Normal'"> 545 <xsl:value-of select="@表:名称"/> 546 </xsl:if> 547 </xsl:for-each> 548 </xsl:variable> 549 <xsl:variable name="bb"> 550 <xsl:for-each select="$first-style"> 551 <xsl:if test="@表:标识符!=@表:名称 and @表:名称!='Normal'"> 552 <xsl:value-of select="@表:标识符"/> 553 </xsl:if> 554 </xsl:for-each> 555 </xsl:variable> 556 <office:styles> 557 <!-- if ConditionalFormatting exists,it should generate some styles for style:style --> 558 <!--xsl:if test="$uofSheetCom/表:条件格式化集"> 559 <xsl:call-template name="CondFormat_office_style"/> 560 </xsl:if--> 561 <!--ro000179 chenjh--> 562 <xsl:for-each select="$first-style[@表:类型='custom' or @表:类型='default']"> 563 <xsl:call-template name="单元格具体式样"/> 564 <xsl:apply-templates select="表:数字格式[@表:格式码]"/> 565 <xsl:apply-templates select="表:字体格式[字:上下标]"/> 566 </xsl:for-each> 567 </office:styles> 568 <office:automatic-styles> 569 <xsl:for-each select="$first-style[@表:类型='auto']"> 570 <xsl:variable name="apply-style-name" select="@表:名称"/> 571 <xsl:variable name="style-name" select="@表:标识符"/> 572 <xsl:choose> 573 <xsl:when test="$style-name!=$apply-style-name and $apply-style-name!='Normal'"> 574 <xsl:for-each select="$condition-format-set/表:条件"> 575 <style:style> 576 <xsl:attribute name="style:name"><xsl:value-of select="//uof:单元格式样[@表:名称=current()/表:格式/@表:式样引用 and @表:类型='auto']/@表:标识符"/></xsl:attribute> 577 <xsl:attribute name="style:family">table-cell</xsl:attribute> 578 <xsl:attribute name="style:parent-style-name">Default</xsl:attribute> 579 <xsl:for-each select="parent::表:条件格式化/表:条件"> 580 <xsl:variable name="condition-text"> 581 <xsl:choose> 582 <xsl:when test="@表:类型='cell value'"> 583 <xsl:choose> 584 <xsl:when test="表:操作码/text()='between' "> 585 <xsl:value-of select="concat('cell-content-is-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 586 </xsl:when> 587 <xsl:when test=" 表:操作码/text()='not between'"> 588 <xsl:value-of select="concat('cell-content-is-not-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 589 </xsl:when> 590 <xsl:when test="表:操作码/text()='equal to'"> 591 <xsl:value-of select="concat('cell-content()=',表:第一操作数/text())"/> 592 </xsl:when> 593 <xsl:when test="表:操作码/text()='not equal to'"> 594 <xsl:value-of select="concat('cell-content()!=',表:第一操作数/text())"/> 595 </xsl:when> 596 <xsl:when test="表:操作码/text()='greater than'"> 597 <xsl:value-of select="concat('cell-content()>',表:第一操作数/text())"/> 598 </xsl:when> 599 <xsl:when test="表:操作码/text()='less than'"> 600 <xsl:value-of select="concat('cell-content()<',表:第一操作数/text())"/> 601 </xsl:when> 602 <xsl:when test="表:操作码/text()='greater than or equal to'"> 603 <xsl:value-of select="concat('cell-content()>=',表:第一操作数/text())"/> 604 </xsl:when> 605 <xsl:when test="表:操作码/text()='less than or equal to'"> 606 <xsl:value-of select="concat('cell-content()<=',表:第一操作数/text())"/> 607 </xsl:when> 608 </xsl:choose> 609 </xsl:when> 610 <xsl:when test="@表:类型='formula'"> 611 <xsl:value-of select="concat('is-true-formula','(',表:第一操作数/text(),')')"/> 612 </xsl:when> 613 </xsl:choose> 614 </xsl:variable> 615 <xsl:element name="style:map"> 616 <xsl:variable name="address"> 617 <xsl:value-of select="preceding-sibling::表:区域"/> 618 </xsl:variable> 619 <xsl:attribute name="style:condition"><xsl:value-of select="$condition-text"/></xsl:attribute> 620 <xsl:attribute name="style:apply-style-name"><xsl:value-of select="表:格式/@表:式样引用"/></xsl:attribute> 621 <xsl:attribute name="style:base-cell-address"><xsl:value-of select="substring-after($address,':')"/></xsl:attribute> 622 </xsl:element> 623 </xsl:for-each> 624 </style:style> 625 </xsl:for-each> 626 </xsl:when> 627 <xsl:otherwise> 628 <xsl:for-each select="uof:单元格式样 "> 629 <xsl:if test="@表:类型='auto' and (@表:标识符=@表:名称 or @表:名称='Normal')"> 630 <xsl:call-template name="单元格具体式样"/> 631 </xsl:if> 632 </xsl:for-each> 633 </xsl:otherwise> 634 </xsl:choose> 635 </xsl:for-each> 636 <!--Redoffie comment liliang SC0008 06.02.14--> 637 <!--1新增内容--> 638 <xsl:if test="uof:单元格式样"> 639 <xsl:for-each select="uof:单元格式样"> 640 <xsl:if test="@表:类型='auto' and (@表:标识符=@表:名称 or @表:名称='Normal')"> 641 <xsl:call-template name="单元格具体式样"/> 642 </xsl:if> 643 </xsl:for-each> 644 </xsl:if> 645 <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'"> 646 <style:style style:name="Graphics" style:family="graphics"> 647 <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"/> 648 </style:style> 649 </xsl:if> 650 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形"/> 651 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形/图:文本内容/字:段落/字:句/字:句属性" mode="style"/> 652 <!--Redoffice comment end 06.02.14--> 653 <xsl:apply-templates select="$uofSheet1/表:工作表内容"/> 654 <xsl:if test="uof:单元格式样"> 655 <xsl:for-each select="uof:单元格式样[@表:类型='auto' and (@表:标识符=@表:名称 or @表:名称='Normal')]"> 656 <xsl:call-template name="单元格具体式样"/> 657 <xsl:apply-templates select="表:数字格式[@表:格式码]"/> 658 <xsl:apply-templates select="表:字体格式[字:上下标]"/> 659 </xsl:for-each> 660 </xsl:if> 661 <!-- if ConditionalFormatting exists,transforing the styles --> 662 <!--xsl:if test="$uofSheetCom/表:条件格式化集"> 663 <xsl:call-template name="CondFormat_automatic_style"/> 664 </xsl:if--> 665 <xsl:if test="$uofSheetCom/表:条件格式化集/表:条件格式化"> 666 <xsl:variable name="style-name" select="$first-style/@表:标识符"/> 667 <xsl:variable name="left-top"> 668 <xsl:call-template name="search-left-top-in-tables"> 669 <xsl:with-param name="cellstylename" select="$style-name"/> 670 <xsl:with-param name="tableslist" select="$uofSheet1/表:工作表内容"/> 671 <xsl:with-param name="return" select="''"/> 672 </xsl:call-template> 673 </xsl:variable> 674 <xsl:variable name="after-translated-left-top"> 675 <xsl:call-template name="translate-left-top"> 676 <xsl:with-param name="left-top" select="$left-top"/> 677 </xsl:call-template> 678 </xsl:variable> 679 <xsl:if test="$after-translated-left-top!=''"> 680 <xsl:call-template name="create-the-condition-format-map"> 681 <xsl:with-param name="condition-format-set" select="$uofSheetCom/表:条件格式化集//表:条件格式化"/> 682 <xsl:with-param name="current-left-top" select="$after-translated-left-top"/> 683 </xsl:call-template> 684 </xsl:if> 685 </xsl:if> 686 <xsl:apply-templates select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列/表:单元格/*[descendant-or-self::*[namespace-uri()='http://www.w3.org/TR/REC-html40']]"/> 687 <!--xsl:apply-templates select="$uofSheet1/表:工作表属性/表:页面设置/表:页眉页脚/字:段落" /--> 688 <xsl:call-template name="create-page-master"> 689 <xsl:with-param name="worksheetoptions" select="$uofSheet1/表:工作表属性"/> 690 </xsl:call-template> 691 <xsl:for-each select="uof:句式样"> 692 <style:style> 693 <xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute> 694 <xsl:attribute name="style:family">text</xsl:attribute> 695 <style:text-properties> 696 <xsl:apply-templates select="./*"/> 697 </style:text-properties> 698 </style:style> 699 </xsl:for-each> 700 </office:automatic-styles> 701 <office:master-styles> 702 <xsl:call-template name="create-master-styles"> 703 <xsl:with-param name="worksheetoptions" select="$uofSheet1/表:工作表属性"/> 704 </xsl:call-template> 705 </office:master-styles> 706 </xsl:template> 707 <xsl:template match="表:数据有效性"> 708 <xsl:variable name="range-name-temp"> 709 <xsl:value-of select="substring-before(表:区域,'!')"/> 710 </xsl:variable> 711 <xsl:variable name="range-name"> 712 <xsl:value-of select="substring($range-name-temp,2,string-length($range-name-temp)-2)"/> 713 </xsl:variable> 714 <xsl:variable name="first-range"> 715 <xsl:choose> 716 <xsl:when test="contains(表:区域, ',')"> 717 <xsl:value-of select="translate(substring-after(substring-before(表:区域, ','),'!'),'$','')"/> 718 </xsl:when> 719 <xsl:otherwise> 720 <xsl:value-of select="translate(substring-after(表:区域,'!'),'$','')"/> 721 </xsl:otherwise> 722 </xsl:choose> 723 </xsl:variable> 724 <xsl:variable name="value-first"> 725 <xsl:value-of select="translate(表:第一操作数,'=','')"/> 726 </xsl:variable> 727 <xsl:variable name="value-second"> 728 <xsl:value-of select="translate(表:第二操作数,'=','')"/> 729 </xsl:variable> 730 <xsl:element name="table:content-validation"> 731 <xsl:attribute name="table:name"><xsl:value-of select="concat('val', position())"/></xsl:attribute> 732 <!--数据有效性:第一操作数、第二操作数--> 733 <!-- don't support two type of qualifier: List, Custom --> 734 <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> 735 <!--忽略空格--> 736 <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> 737 <xsl:attribute name="table:base-cell-address"><xsl:variable name="range"><xsl:value-of select="$first-range"/><!--xsl:call-template name="translate-expression"> 738 <xsl:with-param name="cell-row-pos" select="0" /> 739 <xsl:with-param name="cell-column-pos" select="0" /> 740 <xsl:with-param name="expression" select="$first-range" /> 741 <xsl:with-param name="return-value" select="''" /> 742 </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> 743 <!--输入提示--> 744 <xsl:element name="table:help-message"> 745 <xsl:attribute name="table:title"><xsl:value-of select="表:输入提示/@表:标题"/></xsl:attribute> 746 <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> 747 <xsl:element name="text:p"> 748 <xsl:value-of select="表:输入提示/@表:内容"/> 749 </xsl:element> 750 </xsl:element> 751 <!--错误提示--> 752 <xsl:element name="table:error-message"> 753 <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> 754 <xsl:attribute name="table:title"><xsl:value-of select="表:错误提示/@表:标题"/></xsl:attribute> 755 <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> 756 <xsl:element name="text:p"> 757 <xsl:value-of select="表:错误提示/@表:内容"/> 758 </xsl:element> 759 </xsl:element> 760 </xsl:element> 761 </xsl:template> 762 <xsl:template name="CondFormat_office_style"> 763 <xsl:for-each select="../../uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化"> 764 <xsl:variable name="table-pos" select="count(../../../preceding-sibling::表:公用处理规则)+1"/> 765 <xsl:variable name="conditions" select="count(../preceding-sibling::表:条件格式化集)+1"/> 766 <xsl:for-each select="表:条件"> 767 <xsl:variable name="condition-number" select="count(preceding-sibling::表:条件)+1"/> 768 <xsl:element name="style:style"> 769 <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> 770 <xsl:attribute name="style:family">table-cell</xsl:attribute> 771 <xsl:element name="style:properties"> 772 <xsl:choose> 773 <xsl:when test="表:格式/@表:式样引用"> 774 <xsl:variable name="stylevalue" select="表:格式/@表:式样引用"/> 775 <xsl:call-template name="recursion-condformat-style-table-cell"> 776 <xsl:with-param name="style-value-t"> 777 <xsl:choose> 778 <xsl:when test="substring($stylevalue,string-length($stylevalue),1) != ';'"> 779 <xsl:value-of select="concat($stylevalue,';')"/> 780 </xsl:when> 781 <xsl:otherwise> 782 <xsl:value-of select="$stylevalue"/> 783 </xsl:otherwise> 784 </xsl:choose> 785 </xsl:with-param> 786 </xsl:call-template> 787 </xsl:when> 788 </xsl:choose> 789 </xsl:element> 790 <!--xsl:element name="style:text-properties"--> 791 <!--chengxz0618--> 792 <xsl:element name="style:properties"> 793 <xsl:choose> 794 <xsl:when test="表:格式/@表:式样引用"> 795 <xsl:variable name="stylevalue" select="表:格式/@表:式样引用"/> 796 <xsl:call-template name="recursion-condformat-style-text"> 797 <xsl:with-param name="style-value-t"> 798 <xsl:choose> 799 <xsl:when test="substring($stylevalue,string-length($stylevalue),1) != ';'"> 800 <xsl:value-of select="concat($stylevalue,';')"/> 801 </xsl:when> 802 <xsl:otherwise> 803 <xsl:value-of select="$stylevalue"/> 804 </xsl:otherwise> 805 </xsl:choose> 806 </xsl:with-param> 807 </xsl:call-template> 808 </xsl:when> 809 <xsl:otherwise> 810 <xsl:attribute name="fo:font-style"><xsl:value-of select="'italic'"/></xsl:attribute> 811 <xsl:attribute name="style:text-underline-type"><xsl:value-of select="'single'"/></xsl:attribute> 812 <xsl:attribute name="style:text-underline-color"><xsl:value-of select="'font-color'"/></xsl:attribute> 813 <xsl:attribute name="fo:font-weight"><xsl:value-of select="'bold'"/></xsl:attribute> 814 </xsl:otherwise> 815 </xsl:choose> 816 </xsl:element> 817 </xsl:element> 818 </xsl:for-each> 819 </xsl:for-each> 820 </xsl:template> 821 <xsl:template name="cell-pattern-color"> 822 <xsl:param name="pattern"/> 823 <xsl:param name="color-value"/> 824 <xsl:param name="pattern-color-value"/> 825 <xsl:variable name="rev-pattern" select="1 - $pattern"/> 826 <xsl:variable name="color-R-value"> 827 <xsl:call-template name="hex2decimal"> 828 <xsl:with-param name="hex-number" select="substring($color-value,2,2)"/> 829 <xsl:with-param name="index" select="1"/> 830 <xsl:with-param name="str-length" select="2"/> 831 <xsl:with-param name="last-value" select="0"/> 832 </xsl:call-template> 833 </xsl:variable> 834 <xsl:variable name="color-G-value"> 835 <xsl:call-template name="hex2decimal"> 836 <xsl:with-param name="hex-number" select="substring($color-value,4,2)"/> 837 <xsl:with-param name="index" select="1"/> 838 <xsl:with-param name="str-length" select="2"/> 839 <xsl:with-param name="last-value" select="0"/> 840 </xsl:call-template> 841 </xsl:variable> 842 <xsl:variable name="color-B-value"> 843 <xsl:call-template name="hex2decimal"> 844 <xsl:with-param name="hex-number" select="substring($color-value,6,2)"/> 845 <xsl:with-param name="index" select="1"/> 846 <xsl:with-param name="str-length" select="2"/> 847 <xsl:with-param name="last-value" select="0"/> 848 </xsl:call-template> 849 </xsl:variable> 850 <xsl:variable name="pattern-R-value"> 851 <xsl:call-template name="hex2decimal"> 852 <xsl:with-param name="hex-number" select="substring($pattern-color-value,2,2)"/> 853 <xsl:with-param name="index" select="1"/> 854 <xsl:with-param name="str-length" select="2"/> 855 <xsl:with-param name="last-value" select="0"/> 856 </xsl:call-template> 857 </xsl:variable> 858 <xsl:variable name="pattern-G-value"> 859 <xsl:call-template name="hex2decimal"> 860 <xsl:with-param name="hex-number" select="substring($pattern-color-value,4,2)"/> 861 <xsl:with-param name="index" select="1"/> 862 <xsl:with-param name="str-length" select="2"/> 863 <xsl:with-param name="last-value" select="0"/> 864 </xsl:call-template> 865 </xsl:variable> 866 <xsl:variable name="pattern-B-value"> 867 <xsl:call-template name="hex2decimal"> 868 <xsl:with-param name="hex-number" select="substring($pattern-color-value,6,2)"/> 869 <xsl:with-param name="index" select="1"/> 870 <xsl:with-param name="str-length" select="2"/> 871 <xsl:with-param name="last-value" select="0"/> 872 </xsl:call-template> 873 </xsl:variable> 874 <xsl:variable name="R-value"> 875 <xsl:variable name="combined-R-value"> 876 <xsl:call-template name="decimal2hex"> 877 <xsl:with-param name="dec-number" select="floor($color-R-value * $rev-pattern + $pattern-R-value * $pattern)"/> 878 <xsl:with-param name="last-value" select="'H'"/> 879 </xsl:call-template> 880 </xsl:variable> 881 <xsl:choose> 882 <xsl:when test="string-length($combined-R-value) = 1"> 883 <xsl:value-of select="concat('0',$combined-R-value)"/> 884 </xsl:when> 885 <xsl:otherwise> 886 <xsl:value-of select="$combined-R-value"/> 887 </xsl:otherwise> 888 </xsl:choose> 889 </xsl:variable> 890 <xsl:variable name="G-value"> 891 <xsl:variable name="combined-G-value"> 892 <xsl:call-template name="decimal2hex"> 893 <xsl:with-param name="dec-number" select="floor($color-G-value * $rev-pattern + $pattern-G-value * $pattern)"/> 894 <xsl:with-param name="last-value" select="'H'"/> 895 </xsl:call-template> 896 </xsl:variable> 897 <xsl:choose> 898 <xsl:when test="string-length($combined-G-value) = 1"> 899 <xsl:value-of select="concat('0',$combined-G-value)"/> 900 </xsl:when> 901 <xsl:otherwise> 902 <xsl:value-of select="$combined-G-value"/> 903 </xsl:otherwise> 904 </xsl:choose> 905 </xsl:variable> 906 <xsl:variable name="B-value"> 907 <xsl:variable name="combined-B-value"> 908 <xsl:call-template name="decimal2hex"> 909 <xsl:with-param name="dec-number" select="floor($color-B-value * $rev-pattern + $pattern-B-value * $pattern)"/> 910 <xsl:with-param name="last-value" select="'H'"/> 911 </xsl:call-template> 912 </xsl:variable> 913 <xsl:choose> 914 <xsl:when test="string-length($combined-B-value) = 1"> 915 <xsl:value-of select="concat('0',$combined-B-value)"/> 916 </xsl:when> 917 <xsl:otherwise> 918 <xsl:value-of select="$combined-B-value"/> 919 </xsl:otherwise> 920 </xsl:choose> 921 </xsl:variable> 922 <xsl:value-of select="concat('#',$R-value,$G-value,$B-value)"/> 923 </xsl:template> 924 <xsl:template name="hex2decimal"> 925 <xsl:param name="hex-number"/> 926 <xsl:param name="index"/> 927 <xsl:param name="str-length"/> 928 <xsl:param name="last-value"/> 929 <xsl:variable name="dec-char"> 930 <xsl:call-template name="hexNumber2dec"> 931 <xsl:with-param name="hex-value" select="substring($hex-number, $index ,1)"/> 932 </xsl:call-template> 933 </xsl:variable> 934 <xsl:variable name="current-value" select="$last-value * 16 + $dec-char"/> 935 <xsl:if test="$index < $str-length"> 936 <xsl:call-template name="hex2decimal"> 937 <xsl:with-param name="hex-number" select="$hex-number"/> 938 <xsl:with-param name="index" select="$index + 1"/> 939 <xsl:with-param name="str-length" select="$str-length"/> 940 <xsl:with-param name="last-value" select="$current-value"/> 941 </xsl:call-template> 942 </xsl:if> 943 <xsl:if test="$index = $str-length"> 944 <xsl:value-of select="$current-value"/> 945 </xsl:if> 946 </xsl:template> 947 <xsl:template name="hexNumber2dec"> 948 <xsl:param name="hex-value"/> 949 <xsl:choose> 950 <xsl:when test="$hex-value = 'A' or ($hex-value = 'a')"> 951 <xsl:value-of select="10"/> 952 </xsl:when> 953 <xsl:when test="$hex-value = 'B' or ($hex-value = 'b')"> 954 <xsl:value-of select="11"/> 955 </xsl:when> 956 <xsl:when test="$hex-value = 'C' or ($hex-value = 'c')"> 957 <xsl:value-of select="12"/> 958 </xsl:when> 959 <xsl:when test="$hex-value = 'D' or ($hex-value = 'd')"> 960 <xsl:value-of select="13"/> 961 </xsl:when> 962 <xsl:when test="$hex-value = 'E' or ($hex-value = 'e')"> 963 <xsl:value-of select="14"/> 964 </xsl:when> 965 <xsl:when test="$hex-value = 'F' or ($hex-value = 'f')"> 966 <xsl:value-of select="15"/> 967 </xsl:when> 968 <xsl:otherwise> 969 <xsl:value-of select="$hex-value"/> 970 </xsl:otherwise> 971 </xsl:choose> 972 </xsl:template> 973 <xsl:template name="decimal2hex"> 974 <xsl:param name="dec-number"/> 975 <xsl:param name="last-value"/> 976 <xsl:variable name="current-value"> 977 <xsl:call-template name="decNumber2hex"> 978 <xsl:with-param name="dec-value"> 979 <xsl:if test="$dec-number > 15"> 980 <xsl:value-of select="floor($dec-number div 16)"/> 981 </xsl:if> 982 <xsl:if test="$dec-number < 16"> 983 <xsl:value-of select="$dec-number"/> 984 </xsl:if> 985 </xsl:with-param> 986 </xsl:call-template> 987 </xsl:variable> 988 <xsl:if test="$dec-number > 15"> 989 <xsl:call-template name="decimal2hex"> 990 <xsl:with-param name="dec-number" select="$dec-number mod 16"/> 991 <xsl:with-param name="last-value" select="concat($last-value,$current-value)"/> 992 </xsl:call-template> 993 </xsl:if> 994 <xsl:if test="$dec-number < 16"> 995 <xsl:value-of select="substring-after(concat($last-value,$current-value),'H')"/> 996 </xsl:if> 997 </xsl:template> 998 <xsl:template name="decNumber2hex"> 999 <xsl:param name="dec-value"/> 1000 <xsl:choose> 1001 <xsl:when test="$dec-value = 10"> 1002 <xsl:value-of select="'A'"/> 1003 </xsl:when> 1004 <xsl:when test="$dec-value = 11"> 1005 <xsl:value-of select="'B'"/> 1006 </xsl:when> 1007 <xsl:when test="$dec-value = 12"> 1008 <xsl:value-of select="'C'"/> 1009 </xsl:when> 1010 <xsl:when test="$dec-value = 13"> 1011 <xsl:value-of select="'D'"/> 1012 </xsl:when> 1013 <xsl:when test="$dec-value = 14"> 1014 <xsl:value-of select="'E'"/> 1015 </xsl:when> 1016 <xsl:when test="$dec-value = 15"> 1017 <xsl:value-of select="'F'"/> 1018 </xsl:when> 1019 <xsl:otherwise> 1020 <xsl:value-of select="$dec-value"/> 1021 </xsl:otherwise> 1022 </xsl:choose> 1023 </xsl:template> 1024 <xsl:template name="recursion-condformat-style-table-cell"> 1025 <xsl:param name="style-value-t"/> 1026 <xsl:variable name="style-value" select="$style-value-t"/> 1027 <xsl:choose> 1028 <xsl:when test="starts-with($style-value,'background')"> 1029 <xsl:choose> 1030 <xsl:when test="contains($style-value,'mso-pattern')"> 1031 <xsl:variable name="color-value"> 1032 <xsl:call-template name="translate-color-style"> 1033 <xsl:with-param name="source-str" select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/> 1034 </xsl:call-template> 1035 </xsl:variable> 1036 <xsl:variable name="mso-value"> 1037 <xsl:call-template name="translate-color-style"> 1038 <xsl:with-param name="source-str" select="normalize-space(substring-after($style-value,'mso-pattern'))"/> 1039 </xsl:call-template> 1040 </xsl:variable> 1041 <xsl:variable name="mso-color" select="substring-after($mso-value,'#')"/> 1042 <xsl:variable name="pattern-color-value" select="substring($mso-color,1,6)"/> 1043 <xsl:variable name="pattern" select="concat('0.',normalize-space(substring-before(substring-after($mso-color,'gray-'),';')))"/> 1044 <xsl:variable name="pattern-color"> 1045 <xsl:call-template name="cell-pattern-color"> 1046 <xsl:with-param name="pattern" select="$pattern"/> 1047 <xsl:with-param name="color-value" select="$color-value"/> 1048 <xsl:with-param name="pattern-color-value" select="concat('#',$pattern-color-value)"/> 1049 </xsl:call-template> 1050 </xsl:variable> 1051 <xsl:attribute name="fo:background-color"><xsl:value-of select="normalize-space($pattern-color)"/></xsl:attribute> 1052 </xsl:when> 1053 <xsl:otherwise> 1054 <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> 1055 </xsl:otherwise> 1056 </xsl:choose> 1057 </xsl:when> 1058 <xsl:when test="starts-with($style-value,'border')"> 1059 <xsl:attribute name="fo:border"><xsl:value-of select="'0.002cm solid #000000'"/></xsl:attribute> 1060 </xsl:when> 1061 </xsl:choose> 1062 <xsl:if test="contains($style-value,':')"> 1063 <xsl:call-template name="recursion-condformat-style-table-cell"> 1064 <xsl:with-param name="style-value-t" select="substring-after($style-value,';')"/> 1065 </xsl:call-template> 1066 </xsl:if> 1067 </xsl:template> 1068 <xsl:template name="recursion-condformat-style-text"> 1069 <xsl:param name="style-value-t"/> 1070 <xsl:variable name="style-value" select="normalize-space($style-value-t)"/> 1071 <xsl:choose> 1072 <xsl:when test="starts-with($style-value,'color')"> 1073 <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> 1074 </xsl:when> 1075 <xsl:when test="starts-with($style-value,'font-style')"> 1076 <xsl:attribute name="fo:font-style"><xsl:value-of select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/></xsl:attribute> 1077 </xsl:when> 1078 <xsl:when test="starts-with($style-value,'font-weight')"> 1079 <xsl:variable name="font-weight" select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/> 1080 <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> 1081 </xsl:when> 1082 <xsl:when test="starts-with($style-value,'text-underline-style')"> 1083 <xsl:attribute name="style:text-underline-type"><xsl:value-of select="normalize-space(substring-before(substring-after($style-value,':'),';'))"/></xsl:attribute> 1084 <xsl:attribute name="style:text-underline-color"><xsl:value-of select="'#000000'"/></xsl:attribute> 1085 </xsl:when> 1086 </xsl:choose> 1087 <xsl:if test="contains($style-value,':')"> 1088 <xsl:call-template name="recursion-condformat-style-text"> 1089 <xsl:with-param name="style-value-t" select="substring-after($style-value,';')"/> 1090 </xsl:call-template> 1091 </xsl:if> 1092 </xsl:template> 1093 <xsl:template name="translate-color-style"> 1094 <xsl:param name="source-str"/> 1095 <xsl:choose> 1096 <xsl:when test="starts-with($source-str,'#')"> 1097 <xsl:value-of select="$source-str"/> 1098 </xsl:when> 1099 <xsl:otherwise> 1100 <xsl:choose> 1101 <xsl:when test="starts-with($source-str,'black')"> 1102 <xsl:value-of select="'#000000'"/> 1103 </xsl:when> 1104 <xsl:when test="starts-with($source-str,'maroon')"> 1105 <xsl:value-of select="'#800000'"/> 1106 </xsl:when> 1107 <xsl:when test="starts-with($source-str,'red')"> 1108 <xsl:value-of select="'#FF0000'"/> 1109 </xsl:when> 1110 <xsl:when test="starts-with($source-str,'fuchsia')"> 1111 <xsl:value-of select="'#FF00FF'"/> 1112 </xsl:when> 1113 <xsl:when test="starts-with($source-str,'olive')"> 1114 <xsl:value-of select="'#808000'"/> 1115 </xsl:when> 1116 <xsl:when test="starts-with($source-str,'yellow')"> 1117 <xsl:value-of select="'#FFFF00'"/> 1118 </xsl:when> 1119 <xsl:when test="starts-with($source-str,'green')"> 1120 <xsl:value-of select="'#008000'"/> 1121 </xsl:when> 1122 <xsl:when test="starts-with($source-str,'lime')"> 1123 <xsl:value-of select="'#00FF00'"/> 1124 </xsl:when> 1125 <xsl:when test="starts-with($source-str,'teal')"> 1126 <xsl:value-of select="'#008080'"/> 1127 </xsl:when> 1128 <xsl:when test="starts-with($source-str,'aqua')"> 1129 <xsl:value-of select="'#00FFFF'"/> 1130 </xsl:when> 1131 <xsl:when test="starts-with($source-str,'navy')"> 1132 <xsl:value-of select="'#000080'"/> 1133 </xsl:when> 1134 <xsl:when test="starts-with($source-str,'blue')"> 1135 <xsl:value-of select="'#0000FF'"/> 1136 </xsl:when> 1137 <xsl:when test="starts-with($source-str,'purple')"> 1138 <xsl:value-of select="'#800080'"/> 1139 </xsl:when> 1140 <xsl:when test="starts-with($source-str,'gray')"> 1141 <xsl:value-of select="'#808080'"/> 1142 </xsl:when> 1143 <xsl:when test="starts-with($source-str,'silver')"> 1144 <xsl:value-of select="'#C0C0C0'"/> 1145 </xsl:when> 1146 <xsl:when test="starts-with($source-str,'white')"> 1147 <xsl:value-of select="'#FFFFFF'"/> 1148 </xsl:when> 1149 <xsl:otherwise> 1150 <xsl:value-of select="'#FFFFFF'"/> 1151 </xsl:otherwise> 1152 </xsl:choose> 1153 </xsl:otherwise> 1154 </xsl:choose> 1155 </xsl:template> 1156 <xsl:template name="CondFormat_automatic_style"> 1157 <xsl:for-each select="../uof:电子表格/表:公用处理规则/表:条件格式化集/表:条件格式化"> 1158 <xsl:variable name="table-pos" select="count(../../../preceding-sibling::表:公用处理规则)+1"/> 1159 <xsl:variable name="conditions" select="count(../preceding-sibling::表:条件格式化集)+1"/> 1160 <xsl:element name="style:style"> 1161 <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> 1162 <xsl:attribute name="style:family">table-cell</xsl:attribute> 1163 <xsl:for-each select="uof:单元格式样/表:条件"> 1164 <xsl:variable name="condition-number" select="count(preceding-sibling::表:条件)+1"/> 1165 <xsl:variable name="base-address"> 1166 <xsl:choose> 1167 <xsl:when test="contains(../表:区域,',')"> 1168 <xsl:choose> 1169 <xsl:when test="contains(substring-before(../表:区域,','),':')"> 1170 <xsl:value-of select="substring-before(substring-after(../表:区域,':'),',')"/> 1171 </xsl:when> 1172 <xsl:otherwise> 1173 <xsl:value-of select="substring-before(../表:区域,',')"/> 1174 </xsl:otherwise> 1175 </xsl:choose> 1176 </xsl:when> 1177 <xsl:otherwise> 1178 <xsl:value-of select="../表:区域"/> 1179 </xsl:otherwise> 1180 </xsl:choose> 1181 </xsl:variable> 1182 <xsl:variable name="base-cell-address"> 1183 <xsl:call-template name="translate-unit"> 1184 <xsl:with-param name="column-number" select="substring-before(substring-after($base-address,'R'),'C')"/> 1185 <xsl:with-param name="row-number" select="substring-after($base-address,'C')"/> 1186 <xsl:with-param name="column-pos-style" select="absolute"/> 1187 <xsl:with-param name="row-pos-style" select="absolute"/> 1188 </xsl:call-template> 1189 </xsl:variable> 1190 <xsl:variable name="condition-value"> 1191 <xsl:call-template name="translate-condition"> 1192 </xsl:call-template> 1193 </xsl:variable> 1194 <xsl:element name="style:map"> 1195 <xsl:attribute name="style:condition"><xsl:value-of select="$condition-value"/></xsl:attribute> 1196 <xsl:attribute name="style:apply-style-name"><xsl:value-of select="concat('Excel_CondFormat_',$table-pos,'_',$conditions,'_',$condition-number)"/></xsl:attribute> 1197 <xsl:attribute name="style:base-cell-address"><xsl:value-of select="concat(../../@Name,'.',$base-cell-address)"/></xsl:attribute> 1198 </xsl:element> 1199 </xsl:for-each> 1200 </xsl:element> 1201 </xsl:for-each> 1202 </xsl:template> 1203 <xsl:template name="translate-condition"> 1204 <xsl:variable name="address-value"> 1205 <xsl:call-template name="translate-expression"> 1206 <xsl:with-param name="cell-row-pos" select="0"/> 1207 <xsl:with-param name="cell-column-pos" select="0"/> 1208 <xsl:with-param name="expression" select="表:第一操作数"/> 1209 <xsl:with-param name="return-value" select="''"/> 1210 </xsl:call-template> 1211 </xsl:variable> 1212 <xsl:choose> 1213 <xsl:when test="表:操作码"> 1214 <xsl:variable name="qualifier" select="表:操作码"/> 1215 <xsl:variable name="first-value" select="表:第一操作数"/> 1216 <xsl:choose> 1217 <xsl:when test="$qualifier = 'Equal'"> 1218 <xsl:choose> 1219 <xsl:when test="starts-with($first-value,'"')"> 1220 <xsl:value-of select="concat('cell-content()=',$address-value)"/> 1221 </xsl:when> 1222 <xsl:otherwise> 1223 <xsl:value-of select="concat('cell-content()=[',$address-value,']')"/> 1224 </xsl:otherwise> 1225 </xsl:choose> 1226 </xsl:when> 1227 <xsl:when test="$qualifier = 'Less'"> 1228 <xsl:value-of select="concat('cell-content()<[',$address-value,']')"/> 1229 </xsl:when> 1230 <xsl:when test="$qualifier = 'Greater'"> 1231 <xsl:value-of select="concat('cell-content()>[',$address-value,']')"/> 1232 </xsl:when> 1233 <xsl:when test="$qualifier = 'LessOrEqual'"> 1234 <xsl:value-of select="concat('cell-content()<=[',$address-value,']')"/> 1235 </xsl:when> 1236 <xsl:when test="$qualifier = 'GreaterOrEqual'"> 1237 <xsl:value-of select="concat('cell-content()>=[',$address-value,']')"/> 1238 </xsl:when> 1239 <xsl:when test="$qualifier = 'NotEqual'"> 1240 <xsl:value-of select="concat('cell-content()!=[',$address-value,']')"/> 1241 </xsl:when> 1242 <xsl:when test="$qualifier = 'Between'"> 1243 <xsl:variable name="second-value"> 1244 <xsl:call-template name="translate-expression"> 1245 <xsl:with-param name="cell-row-pos" select="0"/> 1246 <xsl:with-param name="cell-column-pos" select="0"/> 1247 <xsl:with-param name="expression" select="表:第二操作数"/> 1248 <xsl:with-param name="return-value" select="''"/> 1249 </xsl:call-template> 1250 </xsl:variable> 1251 <xsl:value-of select="concat('cell-content-is-between([',$address-value,'],[',$second-value,'])')"/> 1252 </xsl:when> 1253 <xsl:when test="$qualifier = 'NotBetween'"> 1254 <xsl:variable name="second-value"> 1255 <xsl:call-template name="translate-expression"> 1256 <xsl:with-param name="cell-row-pos" select="0"/> 1257 <xsl:with-param name="cell-column-pos" select="0"/> 1258 <xsl:with-param name="expression" select="表:第二操作数"/> 1259 <xsl:with-param name="return-value" select="''"/> 1260 </xsl:call-template> 1261 </xsl:variable> 1262 <xsl:value-of select="concat('cell-content-is-not-between([',$address-value,'],[',$second-value,'])')"/> 1263 </xsl:when> 1264 </xsl:choose> 1265 </xsl:when> 1266 <xsl:otherwise> 1267 <xsl:value-of select="concat('is-true-formula(',$address-value,')')"/> 1268 </xsl:otherwise> 1269 </xsl:choose> 1270 </xsl:template> 1271 <xsl:template name="translate-expression"> 1272 <xsl:param name="cell-row-pos"/> 1273 <xsl:param name="cell-column-pos"/> 1274 <xsl:param name="expression"/> 1275 <xsl:param name="return-value"/> 1276 <xsl:variable name="temp-range"> 1277 <xsl:choose> 1278 <xsl:when test="$expression != ''"> 1279 <xsl:call-template name="parse-range-name"> 1280 <xsl:with-param name="expression" select="$expression"/> 1281 <xsl:with-param name="return-value" select="''"/> 1282 </xsl:call-template> 1283 </xsl:when> 1284 <xsl:otherwise> 1285 <xsl:value-of select="''"/> 1286 </xsl:otherwise> 1287 </xsl:choose> 1288 </xsl:variable> 1289 <xsl:variable name="range-type"> 1290 <xsl:choose> 1291 <xsl:when test="substring($temp-range, 1, 1) = '1'"> 1292 <xsl:value-of select="1"/> 1293 </xsl:when> 1294 <xsl:when test="substring($temp-range, 1, 1) = '2'"> 1295 <xsl:value-of select="2"/> 1296 </xsl:when> 1297 <xsl:otherwise> 1298 <xsl:value-of select="2"/> 1299 </xsl:otherwise> 1300 </xsl:choose> 1301 </xsl:variable> 1302 <xsl:variable name="current-range"> 1303 <xsl:value-of select="substring($temp-range, 2)"/> 1304 </xsl:variable> 1305 <xsl:choose> 1306 <xsl:when test="$range-type = 1"> 1307 <xsl:call-template name="translate-expression"> 1308 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1309 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1310 <xsl:with-param name="expression"> 1311 <xsl:choose> 1312 <xsl:when test="contains($current-range, '#$')"> 1313 <xsl:variable name="temp-token"> 1314 <xsl:choose> 1315 <xsl:when test="contains($current-range, '\')"> 1316 <xsl:value-of select="concat(']', substring-after($current-range, '#$'), "'")"/> 1317 </xsl:when> 1318 <xsl:otherwise> 1319 <xsl:value-of select="substring-after($current-range, '#$')"/> 1320 </xsl:otherwise> 1321 </xsl:choose> 1322 </xsl:variable> 1323 <xsl:value-of select="substring-after($expression, $temp-token)"/> 1324 </xsl:when> 1325 <xsl:otherwise> 1326 <xsl:value-of select="substring-after($expression, $current-range)"/> 1327 </xsl:otherwise> 1328 </xsl:choose> 1329 </xsl:with-param> 1330 <xsl:with-param name="return-value"> 1331 <xsl:choose> 1332 <xsl:when test="$current-range = '='"> 1333 <xsl:text>oooc:=</xsl:text> 1334 </xsl:when> 1335 <xsl:when test="substring($current-range, string-length($current-range)) = '('"> 1336 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), $current-range, '[.')"/> 1337 </xsl:when> 1338 <xsl:when test="$current-range = ','"> 1339 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), '];[.')"/> 1340 </xsl:when> 1341 <xsl:when test="$current-range = ')'"> 1342 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), '])')"/> 1343 </xsl:when> 1344 <xsl:otherwise> 1345 <xsl:value-of select="concat($return-value, substring-before($expression, $current-range), $current-range)"/> 1346 </xsl:otherwise> 1347 </xsl:choose> 1348 </xsl:with-param> 1349 </xsl:call-template> 1350 </xsl:when> 1351 <xsl:otherwise> 1352 <xsl:variable name="handle-type"> 1353 <xsl:choose> 1354 <xsl:when test="starts-with($current-range, 'R')"> 1355 <xsl:choose> 1356 <xsl:when test="contains($current-range, 'C')"> 1357 <xsl:variable name="part-type-r"> 1358 <xsl:call-template name="handle-type-number"> 1359 <xsl:with-param name="t-part" select="substring-before( substring-after($current-range, 'R'), 'C')"/> 1360 </xsl:call-template> 1361 </xsl:variable> 1362 <xsl:variable name="part-type-c"> 1363 <xsl:call-template name="handle-type-number"> 1364 <xsl:with-param name="t-part" select="substring-after($current-range, 'C')"/> 1365 </xsl:call-template> 1366 </xsl:variable> 1367 <xsl:choose> 1368 <xsl:when test="($part-type-r = 1) and ($part-type-c = 1)"> 1369 <xsl:value-of select="1"/> 1370 </xsl:when> 1371 <xsl:otherwise> 1372 <xsl:value-of select="4"/> 1373 </xsl:otherwise> 1374 </xsl:choose> 1375 </xsl:when> 1376 <xsl:otherwise> 1377 <xsl:variable name="part-type"> 1378 <xsl:call-template name="handle-type-number"> 1379 <xsl:with-param name="t-part" select="substring-after($current-range, 'R')"/> 1380 </xsl:call-template> 1381 </xsl:variable> 1382 <xsl:choose> 1383 <xsl:when test="$part-type = 1"> 1384 <xsl:value-of select="2"/> 1385 </xsl:when> 1386 <xsl:when test="$part-type = 2"> 1387 <xsl:value-of select="4"/> 1388 </xsl:when> 1389 <xsl:otherwise> 1390 <xsl:value-of select="4"/> 1391 </xsl:otherwise> 1392 </xsl:choose> 1393 </xsl:otherwise> 1394 </xsl:choose> 1395 </xsl:when> 1396 <xsl:when test="starts-with($current-range, 'C')"> 1397 <xsl:variable name="part-type"> 1398 <xsl:call-template name="handle-type-number"> 1399 <xsl:with-param name="t-part" select="substring-after($current-range, 'C')"/> 1400 </xsl:call-template> 1401 </xsl:variable> 1402 <xsl:choose> 1403 <xsl:when test="$part-type = 1"> 1404 <xsl:value-of select="3"/> 1405 </xsl:when> 1406 <xsl:when test="$part-type = 2"> 1407 <xsl:value-of select="4"/> 1408 </xsl:when> 1409 <xsl:otherwise> 1410 <xsl:value-of select="4"/> 1411 </xsl:otherwise> 1412 </xsl:choose> 1413 </xsl:when> 1414 <xsl:otherwise> 1415 <xsl:value-of select="4"/> 1416 </xsl:otherwise> 1417 </xsl:choose> 1418 </xsl:variable> 1419 <xsl:choose> 1420 <xsl:when test="$handle-type = 1"> 1421 <xsl:variable name="after-R"> 1422 <xsl:value-of select="substring(substring-after($current-range,'R'),1,1)"/> 1423 </xsl:variable> 1424 <xsl:choose> 1425 <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'"> 1426 <xsl:variable name="row-pos"> 1427 <xsl:choose> 1428 <xsl:when test="$after-R='['"> 1429 <xsl:value-of select="$cell-row-pos+substring-before( substring-after($current-range,'R['),']')"/> 1430 </xsl:when> 1431 <xsl:when test="$after-R='C'"> 1432 <xsl:value-of select="$cell-row-pos"/> 1433 </xsl:when> 1434 <xsl:otherwise> 1435 <xsl:value-of select="substring-before(substring-after($current-range,'R'),'C')"/> 1436 </xsl:otherwise> 1437 </xsl:choose> 1438 </xsl:variable> 1439 <xsl:variable name="row-pos-style"> 1440 <xsl:choose> 1441 <xsl:when test="$after-R='[' or $after-R='C'">relative</xsl:when> 1442 <xsl:otherwise>absolute</xsl:otherwise> 1443 </xsl:choose> 1444 </xsl:variable> 1445 <xsl:variable name="after-C"> 1446 <xsl:value-of select="substring(substring-after(substring-after($current-range,'R'),'C'),1,1)"/> 1447 </xsl:variable> 1448 <xsl:variable name="column-digit-length"> 1449 <xsl:choose> 1450 <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'"> 1451 <xsl:call-template name="get-digit-length"> 1452 <xsl:with-param name="complexive-string" select="substring-after(substring-after($current-range,'R'),'C')"/> 1453 </xsl:call-template> 1454 </xsl:when> 1455 </xsl:choose> 1456 </xsl:variable> 1457 <xsl:variable name="column-pos"> 1458 <xsl:choose> 1459 <xsl:when test="$after-C='['"> 1460 <xsl:value-of select="$cell-column-pos + substring-before(substring-after(substring-after($current-range,'R'),'C['),']')"/> 1461 </xsl:when> 1462 <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'"> 1463 <xsl:value-of select="substring(substring-after(substring-after($current-range,'R'),'C'),1,$column-digit-length)"/> 1464 </xsl:when> 1465 <xsl:otherwise> 1466 <xsl:value-of select="$cell-column-pos"/> 1467 </xsl:otherwise> 1468 </xsl:choose> 1469 </xsl:variable> 1470 <xsl:variable name="column-pos-style"> 1471 <xsl:choose> 1472 <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> 1473 <xsl:otherwise>relative</xsl:otherwise> 1474 </xsl:choose> 1475 </xsl:variable> 1476 <xsl:variable name="trans-unit"> 1477 <xsl:call-template name="translate-unit"> 1478 <xsl:with-param name="column-number" select="$column-pos"/> 1479 <xsl:with-param name="row-number" select="$row-pos"/> 1480 <xsl:with-param name="column-pos-style" select="$column-pos-style"/> 1481 <xsl:with-param name="row-pos-style" select="$row-pos-style"/> 1482 </xsl:call-template> 1483 </xsl:variable> 1484 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), $trans-unit)"/> 1485 <xsl:call-template name="translate-expression"> 1486 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1487 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1488 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1489 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1490 </xsl:call-template> 1491 </xsl:when> 1492 <xsl:otherwise> 1493 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), translate( substring-before(substring-after($expression, '('),'R'),',!', ';.'))"/> 1494 <xsl:call-template name="translate-expression"> 1495 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1496 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1497 <xsl:with-param name="expression" select="substring-after($current-range,'R')"/> 1498 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1499 </xsl:call-template> 1500 </xsl:otherwise> 1501 </xsl:choose> 1502 </xsl:when> 1503 <xsl:when test="$handle-type = 2"> 1504 <xsl:variable name="after-R"> 1505 <xsl:value-of select="substring(substring-after($current-range,'R'),1,1)"/> 1506 </xsl:variable> 1507 <xsl:choose> 1508 <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'"> 1509 <xsl:variable name="row-number"> 1510 <xsl:choose> 1511 <xsl:when test="$after-R = '['"> 1512 <xsl:value-of select="substring-before(substring-after($current-range, 'R['), ']')"/> 1513 </xsl:when> 1514 <xsl:otherwise> 1515 <xsl:value-of select="substring-after($current-range, 'R')"/> 1516 </xsl:otherwise> 1517 </xsl:choose> 1518 </xsl:variable> 1519 <xsl:variable name="row-pos"> 1520 <xsl:choose> 1521 <xsl:when test="$after-R='['"> 1522 <xsl:value-of select="$cell-row-pos + $row-number"/> 1523 </xsl:when> 1524 <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'"> 1525 <xsl:value-of select="$row-number"/> 1526 </xsl:when> 1527 <xsl:otherwise> 1528 <xsl:value-of select="$cell-row-pos"/> 1529 </xsl:otherwise> 1530 </xsl:choose> 1531 </xsl:variable> 1532 <xsl:variable name="trans-unit1"> 1533 <xsl:call-template name="translate-unit"> 1534 <xsl:with-param name="column-number" select="1"/> 1535 <xsl:with-param name="row-number" select="$row-pos"/> 1536 <xsl:with-param name="column-pos-style" select="'relative'"/> 1537 <xsl:with-param name="row-pos-style" select="'relative'"/> 1538 </xsl:call-template> 1539 </xsl:variable> 1540 <xsl:variable name="trans-unit2"> 1541 <xsl:call-template name="translate-unit"> 1542 <xsl:with-param name="column-number" select="256"/> 1543 <xsl:with-param name="row-number" select="$row-pos"/> 1544 <xsl:with-param name="column-pos-style" select="'relative'"/> 1545 <xsl:with-param name="row-pos-style" select="'relative'"/> 1546 </xsl:call-template> 1547 </xsl:variable> 1548 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), $trans-unit1, ':', $trans-unit2)"/> 1549 <xsl:call-template name="translate-expression"> 1550 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1551 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1552 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1553 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1554 </xsl:call-template> 1555 </xsl:when> 1556 <xsl:otherwise> 1557 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), translate( substring-before($current-range,'R'),',!', ';.'),'R')"/> 1558 <xsl:call-template name="translate-expression"> 1559 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1560 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1561 <xsl:with-param name="expression" select="substring-after($current-range,'R')"/> 1562 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1563 </xsl:call-template> 1564 </xsl:otherwise> 1565 </xsl:choose> 1566 </xsl:when> 1567 <xsl:when test="$handle-type = 3"> 1568 <xsl:variable name="after-C"> 1569 <xsl:value-of select="substring(substring-after($current-range,'C'),1,1)"/> 1570 </xsl:variable> 1571 <xsl:choose> 1572 <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'"> 1573 <xsl:variable name="column-number"> 1574 <xsl:choose> 1575 <xsl:when test="$after-C = '['"> 1576 <xsl:value-of select="substring-before(substring-after($current-range, 'C['), ']')"/> 1577 </xsl:when> 1578 <xsl:otherwise> 1579 <xsl:value-of select="substring-after($current-range, 'C')"/> 1580 </xsl:otherwise> 1581 </xsl:choose> 1582 </xsl:variable> 1583 <xsl:variable name="column-pos"> 1584 <xsl:choose> 1585 <xsl:when test="$after-C='['"> 1586 <xsl:value-of select="$cell-column-pos + $column-number"/> 1587 </xsl:when> 1588 <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'"> 1589 <xsl:value-of select="$column-number"/> 1590 </xsl:when> 1591 <xsl:otherwise> 1592 <xsl:value-of select="$cell-column-pos"/> 1593 </xsl:otherwise> 1594 </xsl:choose> 1595 </xsl:variable> 1596 <xsl:variable name="trans-unit1"> 1597 <xsl:call-template name="translate-unit"> 1598 <xsl:with-param name="column-number" select="$column-pos"/> 1599 <xsl:with-param name="row-number" select="1"/> 1600 <xsl:with-param name="column-pos-style" select="'relative'"/> 1601 <xsl:with-param name="row-pos-style" select="'relative'"/> 1602 </xsl:call-template> 1603 </xsl:variable> 1604 <xsl:variable name="trans-unit2"> 1605 <xsl:call-template name="translate-unit"> 1606 <xsl:with-param name="column-number" select="$column-pos"/> 1607 <xsl:with-param name="row-number" select="32000"/> 1608 <xsl:with-param name="column-pos-style" select="'relative'"/> 1609 <xsl:with-param name="row-pos-style" select="'relative'"/> 1610 </xsl:call-template> 1611 </xsl:variable> 1612 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), $trans-unit1, ':', $trans-unit2)"/> 1613 <xsl:call-template name="translate-expression"> 1614 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1615 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1616 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1617 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1618 </xsl:call-template> 1619 </xsl:when> 1620 <xsl:otherwise> 1621 <xsl:variable name="name-unit" select="concat(substring-before($expression, $current-range), translate( substring-before($current-range,'C'),',!', ';.'),'C')"/> 1622 <xsl:call-template name="translate-expression"> 1623 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1624 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1625 <xsl:with-param name="expression" select="substring-after($current-range,'C')"/> 1626 <xsl:with-param name="return-value" select="concat($return-value, $name-unit)"/> 1627 </xsl:call-template> 1628 </xsl:otherwise> 1629 </xsl:choose> 1630 </xsl:when> 1631 <xsl:otherwise> 1632 <xsl:variable name="next-pit" select="substring-after($expression, $current-range)"/> 1633 <xsl:choose> 1634 <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, '[')"> 1635 <xsl:call-template name="translate-expression"> 1636 <xsl:with-param name="cell-row-pos" select="$cell-row-pos"/> 1637 <xsl:with-param name="cell-column-pos" select="$cell-column-pos"/> 1638 <xsl:with-param name="expression" select="substring-after($expression, $current-range)"/> 1639 <xsl:with-param name="return-value" select="concat($return-value, substring-before($expression, $current-range), $current-range)"/> 1640 </xsl:call-template> 1641 </xsl:when> 1642 <xsl:otherwise> 1643 <xsl:value-of select="translate( concat($return-value, substring-before($expression, $current-range), $current-range),',!', ';.')"/> 1644 </xsl:otherwise> 1645 </xsl:choose> 1646 </xsl:otherwise> 1647 </xsl:choose> 1648 </xsl:otherwise> 1649 </xsl:choose> 1650 </xsl:template> 1651 <xsl:template name="parse-range-name"> 1652 <xsl:param name="expression"/> 1653 <xsl:param name="return-value"/> 1654 <xsl:variable name="first-one" select="substring($expression,1,1)"/> 1655 <xsl:choose> 1656 <xsl:when test="$first-one = '='"> 1657 <xsl:choose> 1658 <xsl:when test="string-length(normalize-space($return-value)) > 0"> 1659 <xsl:value-of select="concat('2', $return-value)"/> 1660 </xsl:when> 1661 <xsl:otherwise> 1662 <xsl:text>1=</xsl:text> 1663 </xsl:otherwise> 1664 </xsl:choose> 1665 </xsl:when> 1666 <xsl:when test="$first-one='(' or $first-one='!' or $first-one='&'"> 1667 <xsl:value-of select="concat('1', $return-value, $first-one)"/> 1668 </xsl:when> 1669 <xsl:when test="$first-one='['"> 1670 <xsl:choose> 1671 <xsl:when test="starts-with(substring-after($expression, ']'), 'C')"> 1672 <xsl:call-template name="parse-range-name"> 1673 <xsl:with-param name="expression" select="substring-after($expression, ']')"/> 1674 <xsl:with-param name="return-value" select="concat($return-value, substring-before($expression, ']'), ']')"/> 1675 </xsl:call-template> 1676 </xsl:when> 1677 <xsl:when test="contains(substring-before($expression, ']'), '.') and contains(substring-after($expression, ']'), '!')"> 1678 <xsl:value-of select="concat('1', "'", substring-before(substring-after($expression, '['), ']'), "'", '#$', substring-before(substring-after($expression, ']'), '!'))"/> 1679 </xsl:when> 1680 <xsl:otherwise> 1681 <xsl:value-of select="concat('2', $return-value, substring-before($expression, ']'), ']')"/> 1682 </xsl:otherwise> 1683 </xsl:choose> 1684 </xsl:when> 1685 <xsl:when test="$first-one='"'"> 1686 <xsl:value-of select="concat('1', $first-one, substring-before(substring-after($expression, '"'), '"'), '"')"/> 1687 </xsl:when> 1688 <xsl:when test="$first-one="'""> 1689 <xsl:variable name="str-in" select="substring-before(substring-after($expression, "'"), "'")"/> 1690 <xsl:choose> 1691 <xsl:when test="contains($str-in, '\') and contains($str-in, '[') and contains($str-in, ']')"> 1692 <xsl:variable name="first-pos" select="substring-before($str-in, '[')"/> 1693 <xsl:variable name="second-pos" select="substring-before(substring-after($str-in, '['), ']')"/> 1694 <xsl:variable name="third-pos" select="substring-after($str-in, ']')"/> 1695 <xsl:value-of select="concat('1', "'", $first-pos, $second-pos, "'", '#$', $third-pos)"/> 1696 </xsl:when> 1697 <xsl:otherwise> 1698 <xsl:value-of select="concat('1', "'", $str-in, "'")"/> 1699 </xsl:otherwise> 1700 </xsl:choose> 1701 </xsl:when> 1702 <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='<'"> 1703 <xsl:choose> 1704 <xsl:when test="$return-value = ''"> 1705 <xsl:value-of select="concat('1', $first-one)"/> 1706 </xsl:when> 1707 <xsl:otherwise> 1708 <xsl:value-of select="concat('2', $return-value)"/> 1709 </xsl:otherwise> 1710 </xsl:choose> 1711 </xsl:when> 1712 <xsl:otherwise> 1713 <xsl:choose> 1714 <xsl:when test="$expression = ''"> 1715 <xsl:value-of select="concat('2', $return-value)"/> 1716 </xsl:when> 1717 <xsl:otherwise> 1718 <xsl:call-template name="parse-range-name"> 1719 <xsl:with-param name="expression" select="substring($expression, 2, string-length($expression)-1)"/> 1720 <xsl:with-param name="return-value" select="concat($return-value, substring($expression, 1, 1))"/> 1721 </xsl:call-template> 1722 </xsl:otherwise> 1723 </xsl:choose> 1724 </xsl:otherwise> 1725 </xsl:choose> 1726 </xsl:template> 1727 <xsl:template name="handle-type-number"> 1728 <xsl:param name="t-part"/> 1729 <xsl:choose> 1730 <xsl:when test="starts-with($t-part, '[')"> 1731 <xsl:variable name="tt-str" select="substring-before( substring-after( $t-part, '['), ']')"/> 1732 <xsl:choose> 1733 <xsl:when test="($tt-str < 0) or ($tt-str > 0) or ($tt-str = 0)"> 1734 <xsl:value-of select="1"/> 1735 </xsl:when> 1736 <xsl:otherwise> 1737 <xsl:value-of select="2"/> 1738 </xsl:otherwise> 1739 </xsl:choose> 1740 </xsl:when> 1741 <xsl:when test="($t-part < 0) or ($t-part > 0) or ($t-part = 0)"> 1742 <xsl:value-of select="1"/> 1743 </xsl:when> 1744 <xsl:when test="$t-part = ''"> 1745 <xsl:value-of select="1"/> 1746 </xsl:when> 1747 <xsl:otherwise> 1748 <xsl:value-of select="2"/> 1749 </xsl:otherwise> 1750 </xsl:choose> 1751 </xsl:template> 1752 <xsl:template name="translate-unit"> 1753 <xsl:param name="column-number"/> 1754 <xsl:param name="row-number"/> 1755 <xsl:param name="column-pos-style"/> 1756 <xsl:param name="row-pos-style"/> 1757 <xsl:variable name="column-number1"> 1758 <xsl:value-of select="floor( $column-number div 26 )"/> 1759 </xsl:variable> 1760 <xsl:variable name="column-number2"> 1761 <xsl:value-of select="$column-number mod 26"/> 1762 </xsl:variable> 1763 <xsl:variable name="column-character1"> 1764 <xsl:call-template name="number-to-character"> 1765 <xsl:with-param name="number" select="$column-number1"/> 1766 </xsl:call-template> 1767 </xsl:variable> 1768 <xsl:variable name="column-character2"> 1769 <xsl:call-template name="number-to-character"> 1770 <xsl:with-param name="number" select="$column-number2"/> 1771 </xsl:call-template> 1772 </xsl:variable> 1773 <xsl:choose> 1774 <xsl:when test="$column-pos-style = 'absolute'"> 1775 <xsl:value-of select="concat( '$', $column-character1, $column-character2)"/> 1776 </xsl:when> 1777 <xsl:otherwise> 1778 <xsl:value-of select="concat( $column-character1, $column-character2)"/> 1779 </xsl:otherwise> 1780 </xsl:choose> 1781 <xsl:choose> 1782 <xsl:when test="$row-pos-style ='absolute'"> 1783 <xsl:value-of select="concat( '$', $row-number)"/> 1784 </xsl:when> 1785 <xsl:otherwise> 1786 <xsl:value-of select="$row-number"/> 1787 </xsl:otherwise> 1788 </xsl:choose> 1789 </xsl:template> 1790 <xsl:template name="number-to-character"> 1791 <xsl:param name="number"/> 1792 <xsl:choose> 1793 <xsl:when test="$number = 0"/> 1794 <xsl:when test="$number = 1">A</xsl:when> 1795 <xsl:when test="$number = 2">B</xsl:when> 1796 <xsl:when test="$number = 3">C</xsl:when> 1797 <xsl:when test="$number = 4">D</xsl:when> 1798 <xsl:when test="$number = 5">E</xsl:when> 1799 <xsl:when test="$number = 6">F</xsl:when> 1800 <xsl:when test="$number = 7">G</xsl:when> 1801 <xsl:when test="$number = 8">H</xsl:when> 1802 <xsl:when test="$number = 9">I</xsl:when> 1803 <xsl:when test="$number = 10">J</xsl:when> 1804 <xsl:when test="$number = 11">K</xsl:when> 1805 <xsl:when test="$number = 12">L</xsl:when> 1806 <xsl:when test="$number = 13">M</xsl:when> 1807 <xsl:when test="$number = 14">N</xsl:when> 1808 <xsl:when test="$number = 15">O</xsl:when> 1809 <xsl:when test="$number = 16">P</xsl:when> 1810 <xsl:when test="$number = 17">Q</xsl:when> 1811 <xsl:when test="$number = 18">R</xsl:when> 1812 <xsl:when test="$number = 19">S</xsl:when> 1813 <xsl:when test="$number = 20">T</xsl:when> 1814 <xsl:when test="$number = 21">U</xsl:when> 1815 <xsl:when test="$number = 22">V</xsl:when> 1816 <xsl:when test="$number = 23">W</xsl:when> 1817 <xsl:when test="$number = 24">X</xsl:when> 1818 <xsl:when test="$number = 25">Y</xsl:when> 1819 <xsl:when test="$number = 26">Z</xsl:when> 1820 <xsl:otherwise/> 1821 </xsl:choose> 1822 </xsl:template> 1823 <xsl:template name="get-digit-length"> 1824 <xsl:param name="complexive-string"/> 1825 <xsl:variable name="first-char"> 1826 <xsl:value-of select="substring( $complexive-string, 1, 1)"/> 1827 </xsl:variable> 1828 <xsl:choose> 1829 <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' "> 1830 <xsl:variable name="temp"> 1831 <xsl:call-template name="get-digit-length"> 1832 <xsl:with-param name="complexive-string" select="substring( $complexive-string, 2)"/> 1833 </xsl:call-template> 1834 </xsl:variable> 1835 <xsl:value-of select="$temp+1"/> 1836 </xsl:when> 1837 <xsl:otherwise>0</xsl:otherwise> 1838 </xsl:choose> 1839 </xsl:template> 1840 <xsl:template match="字:句属性" mode="style"> 1841 <!--chengxz 0725--> 1842 <xsl:if test="not(@字:式样引用)"> 1843 <xsl:element name="style:style"> 1844 <xsl:attribute name="style:name">T<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句属性" format="1"/></xsl:attribute> 1845 <xsl:attribute name="style:family">text</xsl:attribute> 1846 <xsl:if test="@字:式样引用"> 1847 <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:式样引用"/></xsl:attribute> 1848 </xsl:if> 1849 <xsl:element name="style:text-properties"> 1850 <xsl:apply-templates select="./*"/> 1851 </xsl:element> 1852 </xsl:element> 1853 </xsl:if> 1854 </xsl:template> 1855 <xsl:template name="style-style-content"> 1856 <xsl:variable name="style-name" select="@表:标识符"/> 1857 <xsl:variable name="apply-style-name" select="@表:名称"/> 1858 <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> 1859 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]/@表:列宽"> 1860 <xsl:element name="style:table-column-properties"> 1861 <xsl:attribute name="style:column-width"><xsl:value-of select="concat(/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]/@表:列宽,$uofUnit)"/></xsl:attribute> 1862 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]/@表:跨度"> 1863 <xsl:attribute name="fo:break-before">auto</xsl:attribute> 1864 </xsl:if> 1865 <xsl:for-each select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:列[@表:式样引用=$style-name]"> 1866 <xsl:if test="preceding-sibling::表:列[1]/@表:跨度 and ancestor::表:工作表/表:分页符集/表:分页符/@表:列号"> 1867 <xsl:variable name="kuadu"> 1868 <xsl:value-of select="preceding-sibling::表:列[1]/@表:跨度"/> 1869 </xsl:variable> 1870 <xsl:if test="not($kuadu='1')"> 1871 <xsl:attribute name="fo:break-before">page</xsl:attribute> 1872 </xsl:if> 1873 <xsl:if test="$kuadu='1' and not(preceding::表:列[2])"> 1874 <xsl:attribute name="fo:break-before">page</xsl:attribute> 1875 </xsl:if> 1876 </xsl:if> 1877 </xsl:for-each> 1878 </xsl:element> 1879 </xsl:if> 1880 <xsl:element name="style:table-cell-properties"> 1881 <xsl:if test="表:对齐格式"> 1882 <xsl:if test="表:对齐格式/表:垂直对齐方式"> 1883 <xsl:variable name="vertical-align"> 1884 <xsl:choose> 1885 <xsl:when test="表:对齐格式/表:垂直对齐方式 = 'top'">top</xsl:when> 1886 <xsl:when test="表:对齐格式/表:垂直对齐方式 = 'center'">center</xsl:when> 1887 <xsl:when test="表:对齐格式/表:垂直对齐方式 = 'bottom'">bottom</xsl:when> 1888 <xsl:otherwise>middle</xsl:otherwise> 1889 </xsl:choose> 1890 </xsl:variable> 1891 <xsl:attribute name="style:vertical-align"><xsl:value-of select="$vertical-align"/></xsl:attribute> 1892 </xsl:if> 1893 <xsl:if test="表:对齐格式/表:自动换行/@表:值 = 'true'"> 1894 <xsl:attribute name="fo:wrap-option">wrap</xsl:attribute> 1895 </xsl:if> 1896 <xsl:if test="表:对齐格式/表:缩进"> 1897 <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> 1898 </xsl:if> 1899 <xsl:if test="表:对齐格式/表:文字旋转角度"> 1900 <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> 1901 <xsl:attribute name="style:rotation-align">none</xsl:attribute> 1902 </xsl:if> 1903 <xsl:if test="表:对齐格式/表:文字方向 = 'vertical'"> 1904 <xsl:attribute name="style:direction">ttb</xsl:attribute> 1905 <xsl:if test="not(表:对齐格式/字:水平对齐方式)"> 1906 <xsl:attribute name="style:text-align-source">fix</xsl:attribute> 1907 </xsl:if> 1908 </xsl:if> 1909 </xsl:if> 1910 <!--xsl:if test="表:边框"> 1911 <xsl:apply-templates select="表:边框" /> 1912 </xsl:if--> 1913 <!--chenjh add 边框 again--> 1914 <xsl:if test="表:边框/uof:上/@uof:宽度 !=''"> 1915 <xsl:variable name="top-line-width" select="concat(表:边框/uof:上/@uof:宽度,$uofUnit)"/> 1916 <xsl:variable name="top-line-tyle"> 1917 <xsl:choose> 1918 <xsl:when test="表:边框/uof:上/@uof:类型='single'">solid</xsl:when> 1919 <xsl:when test="表:边框/uof:上/@uof:类型='double'">double</xsl:when> 1920 </xsl:choose> 1921 </xsl:variable> 1922 <xsl:variable name="top-line-color" select="表:边框/uof:上/@uof:颜色"/> 1923 <xsl:variable name="border-top" select="concat($top-line-width,' ',$top-line-tyle,' ',$top-line-color)"/> 1924 <xsl:attribute name="fo:border-top"><xsl:value-of select="$border-top"/></xsl:attribute> 1925 </xsl:if> 1926 <xsl:if test="表:边框/uof:下/@uof:宽度 !=''"> 1927 <xsl:variable name="bottom-line-width" select="concat(表:边框/uof:下/@uof:宽度,$uofUnit)"/> 1928 <xsl:variable name="bottom-line-tyle"> 1929 <xsl:choose> 1930 <xsl:when test="表:边框/uof:下/@uof:类型='single'">solid</xsl:when> 1931 <xsl:when test="表:边框/uof:下/@uof:类型='double'">double</xsl:when> 1932 </xsl:choose> 1933 </xsl:variable> 1934 <xsl:variable name="bottom-line-color" select="表:边框/uof:下/@uof:颜色"/> 1935 <xsl:variable name="border-bottom" select="concat($bottom-line-width,' ',$bottom-line-tyle,' ',$bottom-line-color)"/> 1936 <xsl:attribute name="fo:border-bottom"><xsl:value-of select="$border-bottom"/></xsl:attribute> 1937 </xsl:if> 1938 <xsl:if test="表:边框/uof:左/@uof:宽度 !=''"> 1939 <xsl:variable name="left-line-width" select="concat(表:边框/uof:左/@uof:宽度,$uofUnit)"/> 1940 <xsl:variable name="left-line-tyle"> 1941 <xsl:choose> 1942 <xsl:when test="表:边框/uof:左/@uof:类型='single'">solid</xsl:when> 1943 <xsl:when test="表:边框/uof:左/@uof:类型='double'">double</xsl:when> 1944 </xsl:choose> 1945 </xsl:variable> 1946 <xsl:variable name="left-line-color" select="表:边框/uof:左/@uof:颜色"/> 1947 <xsl:variable name="border-left" select="concat($left-line-width,' ',$left-line-tyle,' ',$left-line-color)"/> 1948 <xsl:attribute name="fo:border-left"><xsl:value-of select="$border-left"/></xsl:attribute> 1949 </xsl:if> 1950 <xsl:if test="表:边框/uof:右/@uof:宽度 !=''"> 1951 <xsl:variable name="right-line-width" select="concat(表:边框/uof:右/@uof:宽度,$uofUnit)"/> 1952 <xsl:variable name="right-line-tyle"> 1953 <xsl:choose> 1954 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 1955 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 1956 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 1957 <xsl:otherwise>solid</xsl:otherwise> 1958 </xsl:choose> 1959 </xsl:variable> 1960 <xsl:variable name="right-line-color" select="表:边框/uof:右/@uof:颜色"/> 1961 <xsl:variable name="border-right" select="concat($right-line-width,' ',$right-line-tyle,' ',$right-line-color)"/> 1962 <xsl:attribute name="fo:border-right"><xsl:value-of select="$border-right"/></xsl:attribute> 1963 </xsl:if> 1964 <xsl:if test="表:边框/uof:对角线1/@uof:宽度 !=''"> 1965 <xsl:variable name="diagonal-lr-width" select="concat(表:边框/uof:对角线1/@uof:宽度,$uofUnit)"/> 1966 <xsl:variable name="diagonal-lr-tyle"> 1967 <xsl:choose> 1968 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'none'">none</xsl:when> 1969 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'continuous'">solid</xsl:when> 1970 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'double'">double</xsl:when> 1971 <xsl:otherwise>solid</xsl:otherwise> 1972 </xsl:choose> 1973 </xsl:variable> 1974 <xsl:variable name="diagonal-lr-color" select="表:边框/uof:对角线1/@uof:颜色"/> 1975 <xsl:variable name="border-diagonal" select="concat($diagonal-lr-width,' ',$diagonal-lr-tyle,' ',$diagonal-lr-color)"/> 1976 <xsl:attribute name="style:diagonal-bl-tr"><xsl:value-of select="$border-diagonal"/></xsl:attribute> 1977 </xsl:if> 1978 <xsl:if test="表:边框/uof:对角线2/@uof:宽度 !=''"> 1979 <xsl:variable name="diagonal-rl-width" select="concat(表:边框/uof:对角线2/@uof:宽度,$uofUnit)"/> 1980 <xsl:variable name="diagonal-rl-tyle"> 1981 <xsl:choose> 1982 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'none'">none</xsl:when> 1983 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'continuous'">solid</xsl:when> 1984 <xsl:when test="表:边框/uof:对角线1/@uof:类型 = 'double'">double</xsl:when> 1985 <xsl:otherwise>solid</xsl:otherwise> 1986 </xsl:choose> 1987 </xsl:variable> 1988 <xsl:variable name="diagonal-rl-color" select="表:边框/uof:对角线2/@uof:颜色"/> 1989 <xsl:variable name="border-diagonal" select="concat($diagonal-rl-width,' ',$diagonal-rl-tyle,' ',$diagonal-rl-color)"/> 1990 <xsl:attribute name="style:diagonal-tl-br"><xsl:value-of select="$border-diagonal"/></xsl:attribute> 1991 </xsl:if> 1992 <xsl:if test="表:边框/*/@uof:阴影"> 1993 <xsl:choose> 1994 <xsl:when test="表:边框/uof:下/@uof:阴影 and 表:边框/uof:右/@uof:阴影"> 1995 <xsl:attribute name="style:shadow">#808080 0.18cm 0.18cm</xsl:attribute> 1996 </xsl:when> 1997 <xsl:when test="表:边框/uof:下/@uof:阴影 and 表:边框/uof:左/@uof:阴影"> 1998 <xsl:attribute name="style:shadow">#808080 -0.18cm 0.18cm</xsl:attribute> 1999 </xsl:when> 2000 <xsl:when test="表:边框/uof:上/@uof:阴影 and 表:边框/uof:右/@uof:阴影"> 2001 <xsl:attribute name="style:shadow">#808080 0.18cm -0.18cm</xsl:attribute> 2002 </xsl:when> 2003 <xsl:when test="表:边框/uof:上/@uof:阴影 and 表:边框/uof:左/@uof:阴影"> 2004 <xsl:attribute name="style:shadow">#808080 -0.18cm -0.18cm</xsl:attribute> 2005 </xsl:when> 2006 </xsl:choose> 2007 </xsl:if> 2008 <!--边框 end --> 2009 <xsl:if test="表:填充"> 2010 <xsl:choose> 2011 <xsl:when test="表:填充/图:颜色"> 2012 <xsl:attribute name="fo:background-color"><xsl:value-of select="表:填充/图:颜色"/></xsl:attribute> 2013 </xsl:when> 2014 <xsl:otherwise> 2015 <xsl:if test="表:填充/图:图案/@图:前景色"> 2016 <xsl:variable name="pattern-value"> 2017 <xsl:call-template name="cell-pattern-color"> 2018 <xsl:with-param name="pattern" select="concat('0.',substring-after(表:填充/图:图案/图:背景色,'y'))"/> 2019 <xsl:with-param name="color-value" select="表:填充/图:颜色"/> 2020 <xsl:with-param name="pattern-color-value" select="表:填充/图:图案/图:背景色"/> 2021 </xsl:call-template> 2022 </xsl:variable> 2023 <xsl:attribute name="fo:background-color"><xsl:value-of select="$pattern-value"/></xsl:attribute> 2024 </xsl:if> 2025 </xsl:otherwise> 2026 </xsl:choose> 2027 </xsl:if> 2028 <xsl:if test="表:字体格式/字:隐藏文字"> 2029 <xsl:choose> 2030 <xsl:when test="表:字体格式/字:隐藏文字 = 'true'"> 2031 <xsl:attribute name="style:cell-protect">protected formula-hidden</xsl:attribute> 2032 </xsl:when> 2033 <xsl:otherwise> 2034 <xsl:attribute name="style:cell-protect">none</xsl:attribute> 2035 </xsl:otherwise> 2036 </xsl:choose> 2037 </xsl:if> 2038 <xsl:attribute name="style:cell-protect">none</xsl:attribute> 2039 <xsl:attribute name="style:text-align-source">fix</xsl:attribute> 2040 </xsl:element> 2041 <xsl:element name="style:paragraph-properties"> 2042 <xsl:if test="表:对齐格式/表:水平对齐方式"> 2043 <xsl:variable name="text-align"> 2044 <xsl:choose> 2045 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'left'">start</xsl:when> 2046 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'center'">center</xsl:when> 2047 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'right'">end</xsl:when> 2048 <xsl:when test="表:对齐格式/表:水平对齐方式 = 'justify'">justify</xsl:when> 2049 <xsl:otherwise>start</xsl:otherwise> 2050 </xsl:choose> 2051 </xsl:variable> 2052 <xsl:attribute name="fo:text-align"><xsl:value-of select="$text-align"/></xsl:attribute> 2053 </xsl:if> 2054 </xsl:element> 2055 <xsl:element name="style:text-properties"> 2056 <xsl:if test="表:字体格式/字:字体"> 2057 <xsl:choose> 2058 <xsl:when test="(表:字体格式/字:字体/@字:中文字体引用)or (表:字体格式/字:字体/@字:西文字体引用)"> 2059 <xsl:variable name="fontnameZ" select="表:字体格式/字:字体/@字:中文字体引用"/> 2060 <xsl:variable name="fontnameX" select="表:字体格式/字:字体/@字:西文字体引用"/> 2061 <xsl:for-each select="/uof:UOF/uof:式样集/uof:字体集/uof:字体声明"> 2062 <xsl:if test="(./@uof:标识符 = $fontnameZ)or(./@uof:标识符 = $fontnameX)"> 2063 <xsl:attribute name="style:font-name"><xsl:value-of select="./@uof:名称"/></xsl:attribute> 2064 <xsl:attribute name="style:font-name-asian"><xsl:value-of select="./@uof:名称"/></xsl:attribute> 2065 <xsl:attribute name="style:font-name-complex"><xsl:value-of select="./@uof:名称"/></xsl:attribute> 2066 <xsl:attribute name="style:font-charset"><xsl:value-of select="./@uof:字体族"/></xsl:attribute> 2067 </xsl:if> 2068 </xsl:for-each> 2069 </xsl:when> 2070 <xsl:otherwise> 2071 <xsl:attribute name="style:font-name">Arial</xsl:attribute> 2072 </xsl:otherwise> 2073 </xsl:choose> 2074 <xsl:if test="表:字体格式/字:粗体/@字:值"> 2075 <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> 2076 <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> 2077 <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> 2078 </xsl:if> 2079 <xsl:if test="表:字体格式/字:斜体/@字:值"> 2080 <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> 2081 <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> 2082 <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> 2083 </xsl:if> 2084 <xsl:choose> 2085 <xsl:when test="表:字体格式/字:字体/@字:颜色"> 2086 <xsl:attribute name="fo:color"><xsl:value-of select="表:字体格式/字:字体/@字:颜色"/></xsl:attribute> 2087 </xsl:when> 2088 <xsl:otherwise> 2089 <xsl:attribute name="style:use-window-font-color">true</xsl:attribute> 2090 </xsl:otherwise> 2091 </xsl:choose> 2092 <xsl:choose> 2093 <xsl:when test="表:字体格式/字:字体/@字:字号"> 2094 <xsl:attribute name="fo:font-size"><xsl:value-of select="concat( 表:字体格式/字:字体/@字:字号, 'pt')"/></xsl:attribute> 2095 <xsl:attribute name="style:font-size-asian"><xsl:value-of select="concat( 表:字体格式/字:字体/@字:字号, 'pt')"/></xsl:attribute> 2096 <xsl:attribute name="style:font-size-complex"><xsl:value-of select="concat( 表:字体格式/字:字体/@字:字号, 'pt')"/></xsl:attribute> 2097 </xsl:when> 2098 <xsl:otherwise> 2099 <xsl:attribute name="fo:font-size">12pt</xsl:attribute> 2100 <xsl:attribute name="style:font-size-asian">12pt</xsl:attribute> 2101 <xsl:attribute name="style:font-size-complex">12pt</xsl:attribute> 2102 </xsl:otherwise> 2103 </xsl:choose> 2104 <xsl:if test="表:字体格式/字:浮雕"> 2105 <xsl:variable name="aa"> 2106 <xsl:value-of select="表:字体格式/字:浮雕/@字:类型"/> 2107 </xsl:variable> 2108 <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> 2109 </xsl:if> 2110 <xsl:if test="表:字体格式/字:阴影/@字:值 = '1' or 表:字体格式/字:阴影/@字:值 = 'true'"> 2111 <xsl:attribute name="fo:text-shadow">1pt 1pt</xsl:attribute> 2112 </xsl:if> 2113 <xsl:if test="表:字体格式/字:删除线"> 2114 <xsl:attribute name="style:text-line-through-style">solid</xsl:attribute> 2115 <xsl:choose> 2116 <xsl:when test="表:字体格式/字:删除线/@字:类型='double'"> 2117 <xsl:attribute name="style:text-line-through-type">double</xsl:attribute> 2118 </xsl:when> 2119 <xsl:when test="表:字体格式/字:删除线/@字:类型='single'"> 2120 <xsl:attribute name="style:text-underline-mode">continuous</xsl:attribute> 2121 <xsl:attribute name="style:text-line-through-mode">continuous</xsl:attribute> 2122 </xsl:when> 2123 <xsl:when test="表:字体格式/字:删除线/@字:类型='bold'"> 2124 <xsl:attribute name="style:text-line-through-width">bold</xsl:attribute> 2125 </xsl:when> 2126 <xsl:when test="表:字体格式/字:删除线/@字:类型='带/'"> 2127 <xsl:attribute name="style:text-line-through-text">/</xsl:attribute> 2128 </xsl:when> 2129 <xsl:when test="表:字体格式/字:删除线/@字:类型='带X'"> 2130 <xsl:attribute name="style:text-line-through-text">X</xsl:attribute> 2131 </xsl:when> 2132 <xsl:otherwise/> 2133 </xsl:choose> 2134 </xsl:if> 2135 <xsl:if test="表:字体格式/字:下划线"> 2136 <xsl:apply-templates select="表:字体格式/字:下划线"/> 2137 </xsl:if> 2138 </xsl:if> 2139 <xsl:if test="表:字体格式/字:着重号"> 2140 <xsl:apply-templates select="表:字体格式/字:着重号"/> 2141 </xsl:if> 2142 <xsl:if test="表:字体格式/字:空心/@字:值='true'"> 2143 <xsl:attribute name="style:text-outline">true</xsl:attribute> 2144 </xsl:if> 2145 </xsl:element> 2146 </xsl:template> 2147 <xsl:template name="单元格具体式样"> 2148 <xsl:choose> 2149 <xsl:when test="@表:类型 = 'Default'"> 2150 <xsl:element name="style:default-style"> 2151 <xsl:call-template name="style-style-content"/> 2152 </xsl:element> 2153 </xsl:when> 2154 <xsl:otherwise> 2155 <xsl:element name="style:style"> 2156 <xsl:attribute name="style:name"><xsl:value-of select="@表:标识符"/></xsl:attribute> 2157 <xsl:if test="表:数字格式/@表:格式码 = 'general'"> 2158 <xsl:attribute name="style:parent-style-name">Default</xsl:attribute> 2159 </xsl:if> 2160 <xsl:attribute name="style:parent-style-name">Default</xsl:attribute> 2161 <xsl:attribute name="style:data-style-name"><xsl:value-of select="concat( @表:标识符, 'F')"/></xsl:attribute> 2162 <!--chengxz这里要改 --> 2163 <!--xsl:attribute name="style:data-style-name"><xsl:value-of select="'N2'"/></xsl:attribute--> 2164 <xsl:call-template name="style-style-content"/> 2165 </xsl:element> 2166 </xsl:otherwise> 2167 </xsl:choose> 2168 </xsl:template> 2169 <xsl:template match="表:边框"> 2170 <!--chengxz 0622--> 2171 <xsl:if test="not(uof:下)"> 2172 <xsl:attribute name="fo:border-bottom">none</xsl:attribute> 2173 </xsl:if> 2174 <xsl:if test="not(uof:上)"> 2175 <xsl:attribute name="fo:border-top">none</xsl:attribute> 2176 </xsl:if> 2177 <xsl:if test="not(uof:左)"> 2178 <xsl:attribute name="fo:border-left">none</xsl:attribute> 2179 </xsl:if> 2180 <xsl:if test="not(uof:右)"> 2181 <xsl:attribute name="fo:border-right">none</xsl:attribute> 2182 </xsl:if> 2183 <xsl:apply-templates select="uof:对角线1"/> 2184 <xsl:apply-templates select="uof:对角线2"/> 2185 <xsl:apply-templates select="uof:上"/> 2186 <xsl:apply-templates select="uof:下"/> 2187 <xsl:apply-templates select="uof:左"/> 2188 <xsl:apply-templates select="uof:右"/> 2189 </xsl:template> 2190 <xsl:template match="uof:上"> 2191 <xsl:variable name="bordtype"> 2192 <xsl:choose> 2193 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2194 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2195 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2196 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2197 <xsl:otherwise>solid</xsl:otherwise> 2198 </xsl:choose> 2199 </xsl:variable> 2200 <xsl:attribute name="fo:border-top"><xsl:value-of select="concat(@uof:宽度 div 30,$uofUnit, ' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2201 <xsl:if test="@uof:类型 = 'double'"> 2202 <xsl:attribute name="style:border-line-width-top">0.035cm 0.035cm 0.035cm</xsl:attribute> 2203 </xsl:if> 2204 </xsl:template> 2205 <xsl:template match="uof:下"> 2206 <xsl:variable name="bordtype"> 2207 <xsl:choose> 2208 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2209 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2210 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2211 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2212 <xsl:otherwise>solid</xsl:otherwise> 2213 </xsl:choose> 2214 </xsl:variable> 2215 <xsl:attribute name="fo:border-bottom"><xsl:value-of select="concat(@uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ',@uof:颜色)"/></xsl:attribute> 2216 <xsl:if test="@uof:类型 = 'double'"> 2217 <xsl:attribute name="style:border-line-width-bottom">0.035cm 0.035cm 0.035cm</xsl:attribute> 2218 </xsl:if> 2219 </xsl:template> 2220 <xsl:template match="uof:左"> 2221 <xsl:variable name="bordtype"> 2222 <xsl:choose> 2223 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2224 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2225 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2226 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2227 <xsl:otherwise>solid</xsl:otherwise> 2228 </xsl:choose> 2229 </xsl:variable> 2230 <xsl:attribute name="fo:border-left"><xsl:value-of select="concat(@uof:宽度 div 30,$uofUnit, ' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2231 <xsl:if test="@uof:类型 = 'double'"> 2232 <xsl:attribute name="style:border-line-width-left">0.035cm 0.035cm 0.035cm</xsl:attribute> 2233 </xsl:if> 2234 </xsl:template> 2235 <xsl:template match="uof:右"> 2236 <xsl:variable name="bordtype"> 2237 <xsl:choose> 2238 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2239 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2240 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2241 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2242 <xsl:otherwise>solid</xsl:otherwise> 2243 </xsl:choose> 2244 </xsl:variable> 2245 <xsl:attribute name="fo:border-right"><xsl:value-of select="concat( @uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2246 <xsl:if test="@uof:类型 = 'double'"> 2247 <xsl:attribute name="style:border-line-width-right">0.035cm 0.035cm 0.035cm</xsl:attribute> 2248 </xsl:if> 2249 </xsl:template> 2250 <xsl:template match="uof:对角线1"> 2251 <xsl:variable name="bordtype"> 2252 <xsl:choose> 2253 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2254 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2255 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2256 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2257 <xsl:otherwise>solid</xsl:otherwise> 2258 </xsl:choose> 2259 </xsl:variable> 2260 <xsl:attribute name="style:diagonal-bl-tr"><xsl:value-of select="concat( @uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2261 <xsl:if test="@uof:类型 = 'double'"> 2262 <xsl:attribute name="style:diagonal-bl-tr-width">0.035cm 0.035cm 0.035cm</xsl:attribute> 2263 </xsl:if> 2264 </xsl:template> 2265 <xsl:template match="uof:对角线2"> 2266 <xsl:variable name="bordtype"> 2267 <xsl:choose> 2268 <xsl:when test="@uof:类型 = 'none'">none</xsl:when> 2269 <xsl:when test="@uof:类型 = 'continuous'">solid</xsl:when> 2270 <xsl:when test="@uof:类型 = 'double'">double</xsl:when> 2271 <!-- Dash, Dot, DashDot, DashDotDot, SlantDashDot are not supported yet --> 2272 <xsl:otherwise>solid</xsl:otherwise> 2273 </xsl:choose> 2274 </xsl:variable> 2275 <xsl:attribute name="style:diagonal-tl-br"><xsl:value-of select="concat( @uof:宽度 div 30, $uofUnit,' ',$bordtype, ' ', @uof:颜色)"/></xsl:attribute> 2276 <xsl:if test="@uof:类型 = 'double'"> 2277 <xsl:attribute name="style:diagonal-tl-br-width">0.035cm 0.035cm 0.035cm</xsl:attribute> 2278 </xsl:if> 2279 </xsl:template> 2280 <xsl:template match="表:字体格式"> 2281 <xsl:choose> 2282 <xsl:when test="字:上下标/@字:上下标 = 'sup'"> 2283 <style:style style:name="{concat(../@表:标识符,'T0')}" style:family="text"> 2284 <style:text-properties style:text-position="33% 58%"/> 2285 </style:style> 2286 </xsl:when> 2287 <xsl:when test="字:上下标/@字:上下标 = 'sub'"> 2288 <style:style style:name="{concat(../@表:标识符,'T0')}" style:family="text"> 2289 <style:text-properties style:text-position="-33% 58%"/> 2290 </style:style> 2291 </xsl:when> 2292 <xsl:otherwise/> 2293 </xsl:choose> 2294 </xsl:template> 2295 <xsl:template name="tablecolumngroup"> 2296 <xsl:param name="start"/> 2297 <xsl:param name="end"/> 2298 <xsl:param name="prestart"/> 2299 <xsl:param name="preend"/> 2300 <xsl:param name="nextstart"/> 2301 <xsl:param name="nextend"/> 2302 <table:table-column-group> 2303 <table:table-column> 2304 <xsl:attribute name="table:style-name">co1</xsl:attribute> 2305 <xsl:attribute name="table:table-column-repeated"><xsl:value-of select="@表:终止 - @表:起始 + 1"/></xsl:attribute> 2306 </table:table-column> 2307 <xsl:if test="$nextstart >= $start and $nextend <= $end"> 2308 <xsl:for-each select="following-sibling::表:列[1]"> 2309 <xsl:call-template name="tablecolumngroup"/> 2310 </xsl:for-each> 2311 </xsl:if> 2312 </table:table-column-group> 2313 </xsl:template> 2314 <xsl:template match="表:工作表"> 2315 <xsl:variable name="rowpath" select="表:工作表内容/表:行"/> 2316 <xsl:variable name="colpath" select="表:工作表内容/表:列"/> 2317 <xsl:element name="table:table"> 2318 <xsl:attribute name="table:name"><xsl:value-of select="@表:名称"/></xsl:attribute> 2319 <xsl:if test="表:工作表内容"> 2320 <xsl:attribute name="table:style-name"><xsl:value-of select="concat( 'ta', count(preceding-sibling::表:工作表)+1)"/></xsl:attribute> 2321 <xsl:if test="(@表:隐藏 = '1')or(@表:隐藏 = 'true')"> 2322 <xsl:attribute name="table:protected">true</xsl:attribute> 2323 </xsl:if> 2324 <xsl:if test="表:工作表内容/uof:锚点 or 表:工作表内容/表:图表"> 2325 <table:shapes> 2326 <xsl:apply-templates select="表:工作表内容/uof:锚点"/> 2327 <xsl:apply-templates select="表:工作表内容/表:图表"> 2328 <xsl:with-param name="table-name" select="@表:名称"/> 2329 </xsl:apply-templates> 2330 </table:shapes> 2331 </xsl:if> 2332 <xsl:variable name="table-pos"> 2333 <xsl:value-of select="count(../preceding-sibling::表:工作表)+1"/> 2334 </xsl:variable> 2335 <xsl:if test="表:工作表内容/表:分组集/表:列"> 2336 <xsl:for-each select="表:工作表内容/表:分组集/表:列"> 2337 <xsl:variable name="start" select="@表:起始"/> 2338 <xsl:variable name="end" select="@表:终止"/> 2339 <xsl:variable name="prestart" select="preceding-sibling::表:列/@表:起始"/> 2340 <xsl:variable name="preend" select="preceding-sibling::表:列/@表:终止"/> 2341 <xsl:variable name="nextstart" select="following-sibling::表:列/@表:起始"/> 2342 <xsl:variable name="nextend" select="following-sibling::表:列/@表:终止"/> 2343 <xsl:call-template name="tablecolumngroup"> 2344 <xsl:with-param name="start" select="$start"/> 2345 <xsl:with-param name="end" select="$end"/> 2346 <xsl:with-param name="prestart" select="$prestart"/> 2347 <xsl:with-param name="preend" select="$preend"/> 2348 <xsl:with-param name="nextstart" select="$nextstart"/> 2349 <xsl:with-param name="nextend" select="$nextend"/> 2350 </xsl:call-template> 2351 </xsl:for-each> 2352 </xsl:if> 2353 <xsl:for-each select="表:工作表内容/表:列"> 2354 <table:table-column> 2355 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 2356 <xsl:if test="@表:跨度 and not(@表:跨度='1')"> 2357 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="@表:跨度"/></xsl:attribute> 2358 </xsl:if> 2359 <xsl:if test="@表:隐藏"> 2360 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2361 </xsl:if> 2362 </table:table-column> 2363 </xsl:for-each> 2364 <xsl:variable name="condition-pos-str1"> 2365 <xsl:if test="../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 2366 <xsl:call-template name="condition-row-column-string"> 2367 <xsl:with-param name="last" select="''"/> 2368 <xsl:with-param name="total" select="count(../../表:公用处理规则/表:条件格式化集/表:条件格式化)"/> 2369 <xsl:with-param name="index" select="1"/> 2370 </xsl:call-template> 2371 </xsl:if> 2372 </xsl:variable> 2373 <xsl:variable name="condition-pos-str2"> 2374 <xsl:if test="../../表:公用处理规则/表:数据有效性集/表:数据有效性"> 2375 <xsl:call-template name="validation-row-column-string"> 2376 <xsl:with-param name="last" select="''"/> 2377 <xsl:with-param name="total" select="count(../../表:公用处理规则/表:数据有效性集/表:数据有效性)"/> 2378 <xsl:with-param name="index" select="1"/> 2379 </xsl:call-template> 2380 </xsl:if> 2381 </xsl:variable> 2382 <xsl:variable name="condition-pos-str" select="concat($condition-pos-str1, $condition-pos-str2)"/> 2383 <xsl:choose> 2384 <xsl:when test="./表:工作表内容/表:行"> 2385 <xsl:call-template name="create-rows"> 2386 <xsl:with-param name="lastrowpos" select="0"/> 2387 <xsl:with-param name="row-count" select="count(表:工作表内容/表:行)"/> 2388 <xsl:with-param name="currentRow" select="1"/> 2389 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2390 </xsl:call-template> 2391 </xsl:when> 2392 <xsl:otherwise> 2393 <xsl:variable name="tableHasStyle"> 2394 <xsl:choose> 2395 <xsl:when test="./表:工作表内容[@表:式样引用]"> 2396 <xsl:value-of select="1"/> 2397 </xsl:when> 2398 <xsl:otherwise> 2399 <xsl:value-of select="0"/> 2400 </xsl:otherwise> 2401 </xsl:choose> 2402 </xsl:variable> 2403 <xsl:choose> 2404 <xsl:when test="./表:分页符集/表:分页符[@表:行号]"> 2405 <xsl:for-each select="./表:分页符集/表:分页符[@表:行号]"> 2406 <xsl:variable name="number-repeated"> 2407 <xsl:choose> 2408 <xsl:when test="position() = 1"> 2409 <xsl:value-of select="./@表:行号"/> 2410 </xsl:when> 2411 <xsl:otherwise> 2412 <xsl:value-of select="./@表:行号 - preceding::表:分页符[@表:行号 and (position()=count(.))]/@表:行号 - 1"/> 2413 </xsl:otherwise> 2414 </xsl:choose> 2415 </xsl:variable> 2416 <xsl:if test="$number-repeated > 0"> 2417 <xsl:element name="table:table-row"> 2418 <xsl:if test="($rowpath/@表:隐藏 = '1') or ($rowpath/@表:隐藏 = 'true')"> 2419 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2420 </xsl:if> 2421 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro',$table-pos)"/></xsl:attribute> 2422 <xsl:attribute name="table:number-rows-repeated"><xsl:value-of select="$number-repeated"/></xsl:attribute> 2423 <xsl:choose> 2424 <xsl:when test="$tableHasStyle = 1"> 2425 <table:table-cell table:number-columns-repeated="256"/> 2426 </xsl:when> 2427 <xsl:otherwise> 2428 <table:table-cell/> 2429 </xsl:otherwise> 2430 </xsl:choose> 2431 </xsl:element> 2432 </xsl:if> 2433 <xsl:element name="table:table-row"> 2434 <xsl:if test="($colpath/@表:隐藏 = '1') or ($colpath/@表:隐藏 = 'true')"> 2435 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2436 </xsl:if> 2437 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob',$table-pos)"/></xsl:attribute> 2438 <xsl:choose> 2439 <xsl:when test="$tableHasStyle = 1"> 2440 <table:table-cell table:number-columns-repeated="256"/> 2441 </xsl:when> 2442 <xsl:otherwise> 2443 <table:table-cell/> 2444 </xsl:otherwise> 2445 </xsl:choose> 2446 </xsl:element> 2447 </xsl:for-each> 2448 </xsl:when> 2449 <xsl:otherwise> 2450 <xsl:element name="table:table-row"> 2451 <xsl:choose> 2452 <xsl:when test="表:工作表内容/@表:式样引用"> 2453 <xsl:attribute name="table:style-name"><xsl:value-of select="表:工作表内容/@表:式样引用"/></xsl:attribute> 2454 </xsl:when> 2455 <xsl:otherwise> 2456 <xsl:attribute name="table:style-name"><xsl:text>ro1</xsl:text></xsl:attribute> 2457 </xsl:otherwise> 2458 </xsl:choose> 2459 <xsl:element name="table:table-cell"/> 2460 </xsl:element> 2461 </xsl:otherwise> 2462 </xsl:choose> 2463 <xsl:if test="../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 2464 <xsl:variable name="condition-row-max"> 2465 <xsl:call-template name="condition-row-col-pos-max"> 2466 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2467 <xsl:with-param name="last-value" select="0"/> 2468 <xsl:with-param name="div-value" select="'R'"/> 2469 </xsl:call-template> 2470 </xsl:variable> 2471 <xsl:variable name="condition-col-max"> 2472 <xsl:call-template name="condition-row-col-pos-max"> 2473 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2474 <xsl:with-param name="last-value" select="0"/> 2475 <xsl:with-param name="div-value" select="'C'"/> 2476 </xsl:call-template> 2477 </xsl:variable> 2478 <xsl:variable name="break-row-max"> 2479 <xsl:call-template name="break-row-beyond-max"> 2480 <xsl:with-param name="pos" select="1"/> 2481 <xsl:with-param name="last-value" select="0"/> 2482 <xsl:with-param name="count-value" select="count(./表:分页符集/表:分页符[@表:行号])"/> 2483 </xsl:call-template> 2484 </xsl:variable> 2485 <xsl:variable name="end-value"> 2486 <xsl:choose> 2487 <xsl:when test="$condition-row-max < $break-row-max"> 2488 <xsl:value-of select="$break-row-max"/> 2489 </xsl:when> 2490 <xsl:otherwise> 2491 <xsl:value-of select="$condition-row-max"/> 2492 </xsl:otherwise> 2493 </xsl:choose> 2494 </xsl:variable> 2495 <xsl:call-template name="get-row-beyond-last"> 2496 <xsl:with-param name="index-value" select="1"/> 2497 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2498 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2499 <xsl:with-param name="end-pos" select="$end-value"/> 2500 <xsl:with-param name="total-col" select="$condition-col-max"/> 2501 </xsl:call-template> 2502 </xsl:if> 2503 <xsl:if test="./表:工作表内容/@表:式样引用"> 2504 <table:table-row table:style-name="ro1" table:number-rows-repeated="32000"> 2505 <table:table-cell table:number-columns-repeated="256"/> 2506 </table:table-row> 2507 </xsl:if> 2508 </xsl:otherwise> 2509 </xsl:choose> 2510 </xsl:if> 2511 </xsl:element> 2512 <xsl:if test="表:图表"> 2513 <table:shapes> 2514 <xsl:apply-templates select="表:图表"> 2515 <xsl:with-param name="table-name" select="@表:名称"/> 2516 </xsl:apply-templates> 2517 </table:shapes> 2518 </xsl:if> 2519 </xsl:template> 2520 <!--xsl:template name="create-columns-without-input"></xsl:template> 2521 <xsl:template name="create-columns"></xsl:template> 2522 <xsl:template name="condition-row-column-string"></xsl:template> 2523<xsl:template name="validation-row-column-string"></xsl:template> 2524<xsl:template name="create-rows"></xsl:template> 2525<xsl:template name="condition-row-col-pos-max"></xsl:template> 2526<xsl:template name="get-row-beyond-last"></xsl:template--> 2527 <!--xsl:template name="break-row-beyond-max"></xsl:template--> 2528 <!-- chengxz有问题--> 2529 <xsl:template name="create-columns-without-input"> 2530 <xsl:param name="table-pos"/> 2531 <xsl:variable name="rowpath" select="表:工作表内容/表:行"/> 2532 <xsl:variable name="colpath" select="表:工作表内容/表:列"/> 2533 <xsl:choose> 2534 <xsl:when test="./表:分页符集/表:分页符[@表:列号]"> 2535 <xsl:for-each select="./表:分页符集/表:分页符[@表:列号]"> 2536 <xsl:variable name="number-repeated"> 2537 <xsl:choose> 2538 <xsl:when test="position() = 1"> 2539 <xsl:value-of select="./@表:列号"/> 2540 </xsl:when> 2541 <xsl:otherwise> 2542 <xsl:value-of select="./@表:列号 - preceding::表:分页符[@表:列号 and (position()=count(.))]/@表:列号 - 1"/> 2543 </xsl:otherwise> 2544 </xsl:choose> 2545 </xsl:variable> 2546 <xsl:if test="$number-repeated > 0"> 2547 <xsl:element name="table:table-column"> 2548 <xsl:if test="ancestor::表:工作表/表:工作表内容/@表:式样引用"> 2549 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="ancestor::表:工作表/表:工作表内容/@表:式样引用"/></xsl:attribute> 2550 </xsl:if> 2551 <xsl:if test="($colpath/@表:隐藏 = '1') or ($colpath/@表:隐藏 = 'true')"> 2552 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2553 </xsl:if> 2554 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('co',$table-pos)"/></xsl:attribute> 2555 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$number-repeated"/></xsl:attribute> 2556 </xsl:element> 2557 </xsl:if> 2558 <xsl:element name="table:table-column"> 2559 <xsl:if test="ancestor::表:工作表/表:工作表内容/@表:式样引用"> 2560 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="ancestor::表:工作表/表:工作表内容/@表:式样引用"/></xsl:attribute> 2561 </xsl:if> 2562 <xsl:if test="($colpath/@表:隐藏 = '1') or ($colpath/@表:隐藏 = 'true')"> 2563 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2564 </xsl:if> 2565 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$table-pos)"/></xsl:attribute> 2566 </xsl:element> 2567 </xsl:for-each> 2568 </xsl:when> 2569 <xsl:otherwise> 2570 <xsl:element name="table:table-column"> 2571 <xsl:choose> 2572 <xsl:when test="表:工作表内容/@表:式样引用"> 2573 <xsl:attribute name="table:style-name"><xsl:value-of select="表:工作表内容/@表:式样引用"/></xsl:attribute> 2574 </xsl:when> 2575 <xsl:otherwise> 2576 <xsl:attribute name="table:style-name"><xsl:text>co1</xsl:text></xsl:attribute> 2577 </xsl:otherwise> 2578 </xsl:choose> 2579 <xsl:if test="表:工作表内容/@表:最大列 and 表:工作表内容/@表:最大列 > 0"> 2580 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="表:工作表内容/@表:最大列"/></xsl:attribute> 2581 </xsl:if> 2582 <xsl:attribute name="table:default-cell-style-name"><xsl:text>Default</xsl:text></xsl:attribute> 2583 </xsl:element> 2584 </xsl:otherwise> 2585 </xsl:choose> 2586 </xsl:template> 2587 <xsl:template name="create-columns"> 2588 <xsl:param name="columnCount"/> 2589 <xsl:param name="currentColumn" select="1"/> 2590 <xsl:param name="finishedColumns" select="0"/> 2591 <xsl:param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2592 <xsl:param name="currentColumnNode"/> 2593 <xsl:choose> 2594 <xsl:when test="$finishedColumns < $columnCount"> 2595 <xsl:choose> 2596 <xsl:when test="$currentColumnNode"> 2597 <xsl:choose> 2598 <xsl:when test="$currentColumnNode/@表:列号 - $finishedColumns > 1"> 2599 <xsl:call-template name="create-default-column"> 2600 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2601 <xsl:with-param name="currentColumnNode" select="$currentColumnNode"/> 2602 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2603 </xsl:call-template> 2604 <xsl:call-template name="create-columns"> 2605 <xsl:with-param name="columnCount" select="$columnCount"/> 2606 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2607 <xsl:with-param name="currentColumnNode" select="$currentColumnNode"/> 2608 <xsl:with-param name="finishedColumns" select="$finishedColumns + 1"/> 2609 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2610 </xsl:call-template> 2611 </xsl:when> 2612 <xsl:otherwise> 2613 <xsl:element name="table:table-column"> 2614 <xsl:if test="($currentColumnNode/@表:隐藏 = '1') or ($currentColumnNode/@表:隐藏 = 'true')"> 2615 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 2616 </xsl:if> 2617 <xsl:if test="$currentColumnNode/@表:跨度"> 2618 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$currentColumnNode/@表:跨度 + 1"/></xsl:attribute> 2619 </xsl:if> 2620 <xsl:choose> 2621 <xsl:when test="key('ColBreak', $currentColumn)"> 2622 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob', $worksheetNo, '-', $currentColumn)"/></xsl:attribute> 2623 </xsl:when> 2624 <xsl:otherwise> 2625 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('co', $worksheetNo, '-', $currentColumn)"/></xsl:attribute> 2626 </xsl:otherwise> 2627 </xsl:choose> 2628 </xsl:element> 2629 <xsl:call-template name="create-columns"> 2630 <xsl:with-param name="columnCount" select="$columnCount"/> 2631 <xsl:with-param name="currentColumn" select="$currentColumn + 1"/> 2632 <xsl:with-param name="finishedColumns" select="$finishedColumns + 1"/> 2633 <xsl:with-param name="currentColumnNode" select="表:工作表属性/表:列[$currentColumn + 1]"/> 2634 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2635 </xsl:call-template> 2636 </xsl:otherwise> 2637 </xsl:choose> 2638 </xsl:when> 2639 <xsl:otherwise> 2640 <xsl:call-template name="create-default-column"> 2641 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2642 <xsl:with-param name="currentColumnNode" select="$currentColumnNode"/> 2643 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2644 </xsl:call-template> 2645 <xsl:call-template name="create-columns"> 2646 <xsl:with-param name="columnCount" select="$columnCount"/> 2647 <xsl:with-param name="currentColumn" select="$currentColumn"/> 2648 <xsl:with-param name="finishedColumns" select="$finishedColumns + 1"/> 2649 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2650 </xsl:call-template> 2651 </xsl:otherwise> 2652 </xsl:choose> 2653 </xsl:when> 2654 <xsl:otherwise> 2655 <xsl:if test="$currentColumn = $columnCount"> 2656 <xsl:if test="表:分页符集/表:分页符/@表:列号 > $finishedColumns"> 2657 <xsl:call-template name="get-column-beyond-last"> 2658 <xsl:with-param name="index-value" select="$finishedColumns"/> 2659 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 2660 </xsl:call-template> 2661 </xsl:if> 2662 </xsl:if> 2663 </xsl:otherwise> 2664 </xsl:choose> 2665 </xsl:template> 2666 <xsl:template name="get-column-beyond-last"> 2667 <xsl:param name="index-value"/> 2668 <xsl:param name="worksheetNo"/> 2669 <xsl:for-each select="表:分页符集/表:分页符[@表:列号]"> 2670 <xsl:variable name="each-column-value" select="@表:列号"/> 2671 <xsl:choose> 2672 <xsl:when test="$each-column-value + 1 > $index-value"> 2673 <xsl:variable name="number-repeated"> 2674 <xsl:choose> 2675 <xsl:when test="preceding-sibling::表:分页符[@表:列号][position()=count(.)]/@表:列号 + 1 = $index-value"> 2676 <xsl:value-of select="$each-column-value - preceding-sibling::表:分页符[@表:列号 and (position()=count(.))]/@表:列号 - 1"/> 2677 </xsl:when> 2678 <xsl:when test="preceding-sibling::表:分页符[@表:列号 and (position()=count(.))]/@表:列号 + 1 > $index-value"> 2679 <xsl:value-of select="$each-column-value - preceding-sibling::表:分页符[@表:列号][position()=count(.)]/@表:列号 - 1"/> 2680 </xsl:when> 2681 <xsl:otherwise> 2682 <xsl:value-of select="$each-column-value - $index-value + 1"/> 2683 </xsl:otherwise> 2684 </xsl:choose> 2685 </xsl:variable> 2686 <xsl:if test="$number-repeated > 0"> 2687 <xsl:element name="table:table-column"> 2688 <xsl:attribute name="table:style-name"><xsl:value-of select="'co1'"/></xsl:attribute> 2689 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$number-repeated"/></xsl:attribute> 2690 </xsl:element> 2691 </xsl:if> 2692 <xsl:element name="table:table-column"> 2693 <xsl:if test="../../表:工作表内容[@表:式样引用]"> 2694 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="./表:工作表内容/@表:式样引用"/></xsl:attribute> 2695 </xsl:if> 2696 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$worksheetNo)"/></xsl:attribute> 2697 </xsl:element> 2698 </xsl:when> 2699 <xsl:when test="$each-column-value + 1 = $index-value"> 2700 <xsl:element name="table:table-column"> 2701 <xsl:if test="/../../表:工作表内容[@表:式样引用]"> 2702 <xsl:attribute name="table:default-cell-style-name"><xsl:value-of select="./../../表:工作表内容/@表:式样引用"/></xsl:attribute> 2703 </xsl:if> 2704 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$worksheetNo)"/></xsl:attribute> 2705 </xsl:element> 2706 </xsl:when> 2707 </xsl:choose> 2708 </xsl:for-each> 2709 </xsl:template> 2710 <xsl:template name="condition-row-column-string"> 2711 <xsl:param name="last"/> 2712 <xsl:param name="total"/> 2713 <xsl:param name="index"/> 2714 <xsl:variable name="table-pos" select="count(preceding-sibling::表:工作表)+1"/> 2715 <xsl:variable name="current"> 2716 <xsl:call-template name="parse-range"> 2717 <xsl:with-param name="range-value" select="../../表:公用处理规则/表:条件格式化集/表:条件格式化[position() = $index]/表:范围"/> 2718 </xsl:call-template> 2719 </xsl:variable> 2720 <xsl:variable name="current-value" select="concat('(c',$table-pos,'-',$index,':', $current,');')"/> 2721 <xsl:if test="$index < $total"> 2722 <xsl:call-template name="condition-row-column-string"> 2723 <xsl:with-param name="last" select="concat($last, $current-value)"/> 2724 <xsl:with-param name="total" select="$total"/> 2725 <xsl:with-param name="index" select="$index + 1"/> 2726 </xsl:call-template> 2727 </xsl:if> 2728 <xsl:if test="$index = $total"> 2729 <xsl:value-of select="concat($last, $current-value)"/> 2730 </xsl:if> 2731 </xsl:template> 2732 <xsl:template name="validation-row-column-string"> 2733 <xsl:param name="last"/> 2734 <xsl:param name="total"/> 2735 <xsl:param name="index"/> 2736 <xsl:variable name="table-pos" select="count(preceding-sibling::表:工作表)+1"/> 2737 <xsl:variable name="current"> 2738 <xsl:call-template name="parse-range"> 2739 <xsl:with-param name="range-value" select="../../表:公用处理规则/表:数据有效性集/表:数据有效性[position() = $index]/表:范围"/> 2740 </xsl:call-template> 2741 </xsl:variable> 2742 <xsl:variable name="current-value" select="concat('(v',$index,':', $current,');')"/> 2743 <xsl:if test="$index < $total"> 2744 <xsl:call-template name="validation-row-column-string"> 2745 <xsl:with-param name="last" select="concat($last, $current-value)"/> 2746 <xsl:with-param name="total" select="$total"/> 2747 <xsl:with-param name="index" select="$index + 1"/> 2748 </xsl:call-template> 2749 </xsl:if> 2750 <xsl:if test="$index = $total"> 2751 <xsl:value-of select="concat($last, $current-value)"/> 2752 </xsl:if> 2753 </xsl:template> 2754 <xsl:template name="create-rows"> 2755 <xsl:param name="lastrowpos"/> 2756 <xsl:param name="row-count"/> 2757 <xsl:param name="currentRow"/> 2758 <xsl:param name="condition-pos-str"/> 2759 <xsl:choose> 2760 <xsl:when test="$currentRow < ($row-count + 1)"> 2761 <xsl:variable name="span-value"> 2762 <xsl:choose> 2763 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2764 <xsl:choose> 2765 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2766 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 - $lastrowpos + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"/> 2767 </xsl:when> 2768 <xsl:otherwise> 2769 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 - $lastrowpos"/> 2770 </xsl:otherwise> 2771 </xsl:choose> 2772 </xsl:when> 2773 <xsl:otherwise> 2774 <xsl:choose> 2775 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2776 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度 + 1"/> 2777 </xsl:when> 2778 <xsl:otherwise> 2779 <xsl:value-of select="1"/> 2780 </xsl:otherwise> 2781 </xsl:choose> 2782 </xsl:otherwise> 2783 </xsl:choose> 2784 </xsl:variable> 2785 <xsl:variable name="current-index"> 2786 <xsl:choose> 2787 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2788 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"/> 2789 </xsl:when> 2790 <xsl:otherwise> 2791 <xsl:value-of select="$lastrowpos + 1"/> 2792 </xsl:otherwise> 2793 </xsl:choose> 2794 </xsl:variable> 2795 <xsl:choose> 2796 <xsl:when test="./表:工作表内容/表:分组集/表:行"> 2797 <xsl:for-each select="./表:工作表内容/表:分组集/表:行[1]"> 2798 <xsl:call-template name="table:table-row-group"/> 2799 </xsl:for-each> 2800 <xsl:for-each select="./表:工作表内容/表:行[not(@表:行号)]"> 2801 <xsl:call-template name="create-row"> 2802 <xsl:with-param name="index-value" select="$lastrowpos"/> 2803 <xsl:with-param name="span-value" select="$span-value"/> 2804 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2805 <xsl:with-param name="row-value" select="$currentRow"/> 2806 <xsl:with-param name="times" select="1"/> 2807 <xsl:with-param name="current-index" select="$current-index"/> 2808 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2809 </xsl:call-template> 2810 </xsl:for-each> 2811 </xsl:when> 2812 <xsl:when test="./表:工作表内容/表:分组集 and ( ./表:工作表内容/表:分组集/表:行/@表:起始 >= ($currentRow - 1) and ($currentRow - 1) <= ./表:工作表内容/表:分组集/表:行/@表:终止 )"> 2813 <xsl:element name="table:table-row-group"> 2814 <xsl:variable name="TempStart"> 2815 <xsl:value-of select="./表:工作表内容/表:分组集/表:行/@表:起始"/> 2816 </xsl:variable> 2817 <xsl:variable name="TempEnd"> 2818 <xsl:value-of select="./表:工作表内容/表:分组集/表:行/@表:终止"/> 2819 </xsl:variable> 2820 <xsl:for-each select="./表:工作表内容/表:行"> 2821 <xsl:if test="$TempStart >= ($currentRow - 1) and ($currentRow - 1) <= $TempEnd"> 2822 <xsl:call-template name="create-row"> 2823 <xsl:with-param name="index-value" select="$lastrowpos"/> 2824 <xsl:with-param name="span-value" select="$span-value"/> 2825 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2826 <xsl:with-param name="row-value" select="$currentRow"/> 2827 <xsl:with-param name="times" select="1"/> 2828 <xsl:with-param name="current-index" select="$current-index"/> 2829 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2830 </xsl:call-template> 2831 </xsl:if> 2832 </xsl:for-each> 2833 </xsl:element> 2834 </xsl:when> 2835 <xsl:otherwise> 2836 <xsl:call-template name="create-row"> 2837 <xsl:with-param name="index-value" select="$lastrowpos"/> 2838 <xsl:with-param name="span-value" select="$span-value"/> 2839 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2840 <xsl:with-param name="row-value" select="$currentRow"/> 2841 <xsl:with-param name="times" select="1"/> 2842 <xsl:with-param name="current-index" select="$current-index"/> 2843 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2844 </xsl:call-template> 2845 <xsl:if test="$currentRow < $row-count"> 2846 <xsl:call-template name="create-rows"> 2847 <xsl:with-param name="lastrowpos"> 2848 <xsl:choose> 2849 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2850 <xsl:choose> 2851 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2852 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"/> 2853 </xsl:when> 2854 <xsl:otherwise> 2855 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"/> 2856 </xsl:otherwise> 2857 </xsl:choose> 2858 </xsl:when> 2859 <xsl:otherwise> 2860 <xsl:choose> 2861 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2862 <xsl:value-of select="$lastrowpos + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度 + 1"/> 2863 </xsl:when> 2864 <xsl:otherwise> 2865 <xsl:value-of select="$lastrowpos + 1"/> 2866 </xsl:otherwise> 2867 </xsl:choose> 2868 </xsl:otherwise> 2869 </xsl:choose> 2870 </xsl:with-param> 2871 <xsl:with-param name="row-count" select="$row-count"/> 2872 <xsl:with-param name="currentRow" select="$currentRow + 1"/> 2873 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2874 </xsl:call-template> 2875 </xsl:if> 2876 </xsl:otherwise> 2877 </xsl:choose> 2878 </xsl:when> 2879 <xsl:when test="$currentRow = $row-count"> 2880 <xsl:variable name="last-pos"> 2881 <xsl:choose> 2882 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"> 2883 <xsl:choose> 2884 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2885 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号 + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"/> 2886 </xsl:when> 2887 <xsl:otherwise> 2888 <xsl:value-of select="./表:工作表内容/表:行[position() = $currentRow]/@表:行号"/> 2889 </xsl:otherwise> 2890 </xsl:choose> 2891 </xsl:when> 2892 <xsl:otherwise> 2893 <xsl:choose> 2894 <xsl:when test="./表:工作表内容/表:行[position() = $currentRow]/@表:跨度"> 2895 <xsl:value-of select="$lastrowpos + ./表:工作表内容/表:行[position() = $currentRow]/@表:跨度 + 1"/> 2896 </xsl:when> 2897 <xsl:otherwise> 2898 <xsl:value-of select="$lastrowpos + 1"/> 2899 </xsl:otherwise> 2900 </xsl:choose> 2901 </xsl:otherwise> 2902 </xsl:choose> 2903 </xsl:variable> 2904 <xsl:if test="./表:分页符集/表:分页符/@表:行号 > ($last-pos - 1) or ../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 2905 <xsl:variable name="condition-row-max"> 2906 <xsl:call-template name="condition-row-col-pos-max"> 2907 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2908 <xsl:with-param name="last-value" select="0"/> 2909 <xsl:with-param name="div-value" select="'R'"/> 2910 </xsl:call-template> 2911 </xsl:variable> 2912 <xsl:variable name="condition-col-max"> 2913 <xsl:call-template name="condition-row-col-pos-max"> 2914 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2915 <xsl:with-param name="last-value" select="0"/> 2916 <xsl:with-param name="div-value" select="'C'"/> 2917 </xsl:call-template> 2918 </xsl:variable> 2919 <xsl:variable name="break-row-max"> 2920 <xsl:call-template name="break-row-beyond-max"> 2921 <xsl:with-param name="pos" select="1"/> 2922 <xsl:with-param name="last-value" select="0"/> 2923 <xsl:with-param name="count-value" select="count(./表:分页符集/表:分页符[@表:行号])"/> 2924 </xsl:call-template> 2925 </xsl:variable> 2926 <xsl:variable name="end-value"> 2927 <xsl:choose> 2928 <xsl:when test="$condition-row-max < $break-row-max"> 2929 <xsl:value-of select="$break-row-max"/> 2930 </xsl:when> 2931 <xsl:otherwise> 2932 <xsl:value-of select="$condition-row-max"/> 2933 </xsl:otherwise> 2934 </xsl:choose> 2935 </xsl:variable> 2936 <xsl:call-template name="get-row-beyond-last"> 2937 <xsl:with-param name="index-value" select="$last-pos + 1"/> 2938 <xsl:with-param name="worksheetNo" select="count(preceding-sibling::表:工作表)+1"/> 2939 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 2940 <xsl:with-param name="end-pos" select="$end-value"/> 2941 <xsl:with-param name="total-col" select="$condition-col-max"/> 2942 </xsl:call-template> 2943 </xsl:if> 2944 <xsl:if test="./表:工作表内容/表:列[@表:式样引用] or ./表:工作表内容[@表:式样引用]"> 2945 <table:table-row table:style-name="ro1" table:number-rows-repeated="31990"> 2946 <table:table-cell table:number-columns-repeated="256"/> 2947 </table:table-row> 2948 <table:table-row table:style-name="ro1"> 2949 <table:table-cell table:number-columns-repeated="256"/> 2950 </table:table-row> 2951 </xsl:if> 2952 </xsl:when> 2953 </xsl:choose> 2954 </xsl:template> 2955 <!-- add row-group 2.6--> 2956 <xsl:template name="table:table-row-group"> 2957 <xsl:param name="start"/> 2958 <xsl:param name="end"/> 2959 <xsl:variable name="start1" select="@表:起始"/> 2960 <xsl:variable name="end1" select="@表:终止"/> 2961 <xsl:variable name="nextstart" select="following-sibling::表:行/@表:起始"/> 2962 <xsl:variable name="nextend" select="following-sibling::表:行/@表:终止"/> 2963 <xsl:variable name="prestart" select="preceding-sibling::表:行/@表:起始"/> 2964 <xsl:variable name="preend" select="preceding-sibling::表:行/@表:终止"/> 2965 <xsl:variable name="numrow" select="$end1 - $start1"/> 2966 <xsl:variable name="position" select="position()"/> 2967 <xsl:choose> 2968 <xsl:when test="$nextstart >= $start1 and $nextend <= $end1"> 2969 <table:table-row-group> 2970 <xsl:call-template name="creategroup"/> 2971 </table:table-row-group> 2972 </xsl:when> 2973 <xsl:when test="$nextstart >= $end1"> 2974 <xsl:choose> 2975 <xsl:when test="$nextend <=$preend"> 2976 <xsl:call-template name="row"> 2977 <xsl:with-param name="start1" select="$start1"/> 2978 <xsl:with-param name="end1" select="$end1"/> 2979 <xsl:with-param name="nextstart" select="$nextstart"/> 2980 <xsl:with-param name="nextend" select="$nextend"/> 2981 <xsl:with-param name="prestart" select="$prestart"/> 2982 <xsl:with-param name="preend" select="$preend"/> 2983 </xsl:call-template> 2984 </xsl:when> 2985 <xsl:otherwise> 2986 <xsl:call-template name="levelgroup"/> 2987 </xsl:otherwise> 2988 </xsl:choose> 2989 </xsl:when> 2990 <xsl:otherwise> 2991 <xsl:call-template name="row"> 2992 <xsl:with-param name="start1" select="$start1"/> 2993 <xsl:with-param name="end1" select="$end1"/> 2994 <xsl:with-param name="nextstart" select="$nextstart"/> 2995 <xsl:with-param name="nextend" select="$nextend"/> 2996 <xsl:with-param name="prestart" select="$prestart"/> 2997 <xsl:with-param name="preend" select="$preend"/> 2998 </xsl:call-template> 2999 </xsl:otherwise> 3000 </xsl:choose> 3001 </xsl:template> 3002 <xsl:template name="levelrowgroup"> 3003 <xsl:param name="start"/> 3004 <xsl:param name="end"/> 3005 <xsl:variable name="start1" select="@表:起始"/> 3006 <xsl:variable name="end1" select="@表:终止"/> 3007 <xsl:variable name="nextstart" select="following-sibling::表:行/@表:起始"/> 3008 <xsl:variable name="nextend" select="following-sibling::表:行/@表:终止"/> 3009 <xsl:variable name="prestart" select="preceding-sibling::表:行/@表:起始"/> 3010 <xsl:variable name="preend" select="preceding-sibling::表:行/@表:终止"/> 3011 <xsl:variable name="numrow" select="$end1 - $start1"/> 3012 <xsl:variable name="position" select="position()"/> 3013 <xsl:call-template name="row"> 3014 <xsl:with-param name="start1" select="$start1"/> 3015 <xsl:with-param name="end1" select="$end1"/> 3016 <xsl:with-param name="nextstart" select="$nextstart"/> 3017 <xsl:with-param name="nextend" select="$nextend"/> 3018 <xsl:with-param name="prestart" select="$prestart"/> 3019 <xsl:with-param name="preend" select="$preend"/> 3020 </xsl:call-template> 3021 </xsl:template> 3022 <xsl:template name="creategroup"> 3023 <xsl:for-each select="following-sibling::表:行"> 3024 <xsl:variable name="start1" select="@表:起始"/> 3025 <xsl:variable name="end1" select="@表:终止"/> 3026 <xsl:variable name="nextstart" select="following-sibling::表:行/@表:起始"/> 3027 <xsl:variable name="nextend" select="following-sibling::表:行/@表:终止"/> 3028 <xsl:variable name="prestart" select="preceding-sibling::表:行/@表:起始"/> 3029 <xsl:variable name="preend" select="preceding-sibling::表:行/@表:终止"/> 3030 <xsl:if test="$start1 >= $prestart and $end1 <= $preend"> 3031 <xsl:call-template name="table:table-row-group"/> 3032 </xsl:if> 3033 </xsl:for-each> 3034 </xsl:template> 3035 <xsl:template name="levelgroup"> 3036 <xsl:for-each select="parent::表:分组集/表:行"> 3037 <xsl:call-template name="levelrowgroup"/> 3038 </xsl:for-each> 3039 </xsl:template> 3040 <xsl:template name="row"> 3041 <xsl:param name="start1"/> 3042 <xsl:param name="end1"/> 3043 <xsl:param name="nextstart"/> 3044 <xsl:param name="nextend"/> 3045 <xsl:param name="prestart"/> 3046 <xsl:param name="preend"/> 3047 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3048 <xsl:variable name="rownum" select="@表:行号"/> 3049 <xsl:variable name="aa" select="$start1 - $prestart"/> 3050 <xsl:if test="$rownum >= $prestart and $rownum <= ($prestart + $aa - 1) and $start1 <= $preend"> 3051 <table:table-row> 3052 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3053 <xsl:call-template name="celldata"/> 3054 </table:table-row> 3055 </xsl:if> 3056 </xsl:for-each> 3057 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3058 <xsl:variable name="rownum" select="@表:行号"/> 3059 <xsl:variable name="ss" select="$start1 - $preend"/> 3060 <xsl:if test="$rownum >= ($preend +1) and $rownum <= ($preend + $ss - 1) and $start1 >= $preend"> 3061 <table:table-row> 3062 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3063 <xsl:call-template name="celldata"/> 3064 </table:table-row> 3065 </xsl:if> 3066 </xsl:for-each> 3067 <table:table-row-group> 3068 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3069 <xsl:variable name="rownum" select="@表:行号"/> 3070 <xsl:if test="$rownum <= $end1"> 3071 <xsl:if test="$rownum >= $start1"> 3072 <table:table-row> 3073 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3074 <xsl:call-template name="celldata"/> 3075 </table:table-row> 3076 </xsl:if> 3077 </xsl:if> 3078 </xsl:for-each> 3079 </table:table-row-group> 3080 <xsl:for-each select="ancestor::表:工作表内容/表:行[@表:行号]"> 3081 <xsl:variable name="rownum" select="@表:行号"/> 3082 <xsl:variable name="bb" select="$preend - $end1"/> 3083 <xsl:if test="$rownum >= ($end1 + 1) and $rownum <= ($end1 + $bb) and $start1 < $preend"> 3084 <table:table-row> 3085 <xsl:attribute name="table:style-name"><xsl:value-of select="@表:式样引用"/></xsl:attribute> 3086 <xsl:call-template name="celldata"/> 3087 </table:table-row> 3088 </xsl:if> 3089 </xsl:for-each> 3090 </xsl:template> 3091 <xsl:template name="celldata"> 3092 <xsl:for-each select="./表:单元格"> 3093 <table:table-cell> 3094 <xsl:choose> 3095 <xsl:when test="表:数据/@表:数据类型 = 'number'"> 3096 <xsl:attribute name="office:value-type">float</xsl:attribute> 3097 <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> 3098 </xsl:when> 3099 <xsl:when test="表:数据/@表:数据类型 = 'date'"> 3100 <xsl:attribute name="office:value-type">date</xsl:attribute> 3101 <xsl:attribute name="table:date-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 3102 </xsl:when> 3103 <xsl:when test="表:数据/@表:数据类型 = 'time'"> 3104 <xsl:attribute name="office:value-type">time</xsl:attribute> 3105 <xsl:attribute name="table:time-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 3106 </xsl:when> 3107 <xsl:when test="表:数据/@表:数据类型 = 'boolean'"> 3108 <xsl:attribute name="office:value-type">boolean</xsl:attribute> 3109 <xsl:attribute name="table:boolean-value"><xsl:choose><xsl:when test="表:数据/字:句/字:文本串 = '1'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 3110 </xsl:when> 3111 <xsl:when test="表:数据/@表:数据类型 = 'text'"> 3112 <xsl:attribute name="office:value-type">string</xsl:attribute> 3113 <xsl:attribute name="table:string-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 3114 </xsl:when> 3115 </xsl:choose> 3116 <xsl:if test="表:数据/字:句/字:文本串"> 3117 <text:p> 3118 <xsl:value-of select="表:数据/字:句/字:文本串"/> 3119 </text:p> 3120 </xsl:if> 3121 </table:table-cell> 3122 </xsl:for-each> 3123 </xsl:template> 3124 <!-- add row-group 2.8 --> 3125 <xsl:template name="create-row"> 3126 <xsl:param name="index-value"/> 3127 <xsl:param name="span-value"/> 3128 <xsl:param name="worksheetNo"/> 3129 <xsl:param name="row-value"/> 3130 <xsl:param name="times"/> 3131 <xsl:param name="current-index"/> 3132 <xsl:param name="condition-pos-str"/> 3133 <xsl:element name="table:table-row"> 3134 <xsl:choose> 3135 <xsl:when test="./表:分页符集/表:分页符/@表:行号 = ($index-value + $times - 1)"> 3136 <xsl:choose> 3137 <xsl:when test="($index-value + $times < $current-index) and ($current-index != 0)"> 3138 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob',$worksheetNo)"/></xsl:attribute> 3139 </xsl:when> 3140 <xsl:otherwise> 3141 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob', $worksheetNo, '-', $row-value)"/></xsl:attribute> 3142 </xsl:otherwise> 3143 </xsl:choose> 3144 </xsl:when> 3145 <xsl:otherwise> 3146 <xsl:choose> 3147 <xsl:when test="($index-value + $times < $current-index) and ($current-index != 0)"> 3148 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro',$worksheetNo)"/></xsl:attribute> 3149 </xsl:when> 3150 <xsl:otherwise> 3151 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro', $worksheetNo, '-', $row-value)"/></xsl:attribute> 3152 </xsl:otherwise> 3153 </xsl:choose> 3154 </xsl:otherwise> 3155 </xsl:choose> 3156 <!--chengxiuzhi0617--> 3157 <xsl:if test="./表:工作表内容/表:行[position() = $row-value]/@表:隐藏 = 'true'"> 3158 <xsl:choose> 3159 <xsl:when test="./表:工作表内容/表:行[position() = $row-value]/@表:跨度"> 3160 <xsl:if test="$index-value + $times > ($current-index - 1)"> 3161 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 3162 </xsl:if> 3163 </xsl:when> 3164 <xsl:otherwise> 3165 <xsl:if test="$index-value + $times = $current-index"> 3166 <xsl:attribute name="table:visibility">collapse</xsl:attribute> 3167 </xsl:if> 3168 </xsl:otherwise> 3169 </xsl:choose> 3170 </xsl:if> 3171 <xsl:choose> 3172 <xsl:when test="not(./表:工作表内容/表:行[position() = $row-value]/*)"> 3173 <table:table-cell> 3174 <xsl:for-each select="./表:单元格/表:数据"> 3175 <xsl:choose> 3176 <xsl:when test="@表:数据类型 = 'number'"> 3177 <xsl:attribute name="office:value-type">float</xsl:attribute> 3178 <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> 3179 </xsl:when> 3180 <xsl:when test="@表:数据类型 = 'date'"> 3181 <xsl:attribute name="office:value-type">date</xsl:attribute> 3182 <xsl:attribute name="table:date-value"><xsl:value-of select="@表:数据数值"/></xsl:attribute> 3183 </xsl:when> 3184 <xsl:when test="@表:数据类型 = 'time'"> 3185 <xsl:attribute name="office:value-type">time</xsl:attribute> 3186 <xsl:attribute name="table:time-value"><xsl:value-of select="@表:数据数值"/></xsl:attribute> 3187 </xsl:when> 3188 <xsl:when test="@表:数据类型 = 'boolean'"> 3189 <xsl:attribute name="office:value-type">boolean</xsl:attribute> 3190 <xsl:attribute name="table:boolean-value"><xsl:choose><xsl:when test="字:句/字:文本串 = '1'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 3191 </xsl:when> 3192 <xsl:when test="@表:数据类型 = 'text'"> 3193 <xsl:attribute name="office:value-type">string</xsl:attribute> 3194 <xsl:attribute name="table:string-value"><xsl:value-of select="@表:数据数值"/></xsl:attribute> 3195 </xsl:when> 3196 </xsl:choose> 3197 <xsl:if test="字:句/字:文本串"> 3198 <text:p> 3199 <xsl:value-of select="字:句/字:文本串"/> 3200 </text:p> 3201 </xsl:if> 3202 </xsl:for-each> 3203 </table:table-cell> 3204 </xsl:when> 3205 <xsl:otherwise> 3206 <xsl:choose> 3207 <xsl:when test="$index-value + $times < $current-index"> 3208 <xsl:variable name="current" select="concat('R',($index-value + $times),'C')"/> 3209 <xsl:variable name="col-pos-max"> 3210 <xsl:call-template name="condition-row-col-pos-max"> 3211 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3212 <xsl:with-param name="last-value" select="0"/> 3213 <xsl:with-param name="div-value" select="'C'"/> 3214 </xsl:call-template> 3215 </xsl:variable> 3216 <xsl:choose> 3217 <xsl:when test="contains($condition-pos-str,$current)"> 3218 <xsl:call-template name="get-cell-span-in"> 3219 <xsl:with-param name="row-pos" select="$index-value + $times"/> 3220 <xsl:with-param name="c-start" select="1"/> 3221 <xsl:with-param name="c-end" select="$col-pos-max"/> 3222 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3223 </xsl:call-template> 3224 </xsl:when> 3225 <xsl:otherwise> 3226 <table:table-cell/> 3227 </xsl:otherwise> 3228 </xsl:choose> 3229 </xsl:when> 3230 <xsl:when test="$index-value + $times = $current-index"> 3231 <xsl:apply-templates select="表:工作表内容/表:行[position() = $row-value]" mode="selected"> 3232 <xsl:with-param name="row-pos" select="$index-value + $times"/> 3233 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3234 </xsl:apply-templates> 3235 </xsl:when> 3236 <xsl:otherwise> 3237 <table:table-cell/> 3238 </xsl:otherwise> 3239 </xsl:choose> 3240 </xsl:otherwise> 3241 </xsl:choose> 3242 </xsl:element> 3243 <xsl:if test="$times < $span-value"> 3244 <xsl:call-template name="create-row"> 3245 <xsl:with-param name="index-value" select="$index-value"/> 3246 <xsl:with-param name="span-value" select="$span-value"/> 3247 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 3248 <xsl:with-param name="row-value" select="$row-value"/> 3249 <xsl:with-param name="times" select="$times + 1"/> 3250 <xsl:with-param name="current-index" select="$current-index"/> 3251 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3252 </xsl:call-template> 3253 </xsl:if> 3254 </xsl:template> 3255 <xsl:template name="condition-row-col-pos-max"> 3256 <xsl:param name="condition-pos-str"/> 3257 <xsl:param name="last-value"/> 3258 <xsl:param name="div-value"/> 3259 <xsl:variable name="pre-value"> 3260 <xsl:choose> 3261 <xsl:when test="$div-value = 'R'"> 3262 <xsl:value-of select="substring-before(substring-after($condition-pos-str,$div-value),'C')"/> 3263 </xsl:when> 3264 <xsl:otherwise> 3265 <xsl:value-of select="substring-before(substring-after($condition-pos-str,$div-value),',')"/> 3266 </xsl:otherwise> 3267 </xsl:choose> 3268 </xsl:variable> 3269 <xsl:variable name="end-value"> 3270 <xsl:choose> 3271 <xsl:when test="$last-value < $pre-value"> 3272 <xsl:value-of select="$pre-value"/> 3273 </xsl:when> 3274 <xsl:otherwise> 3275 <xsl:value-of select="$last-value"/> 3276 </xsl:otherwise> 3277 </xsl:choose> 3278 </xsl:variable> 3279 <xsl:choose> 3280 <xsl:when test="contains($condition-pos-str,$div-value)"> 3281 <xsl:call-template name="condition-row-col-pos-max"> 3282 <xsl:with-param name="condition-pos-str" select="substring-after($condition-pos-str,$div-value)"/> 3283 <xsl:with-param name="last-value" select="$end-value"/> 3284 <xsl:with-param name="div-value" select="$div-value"/> 3285 </xsl:call-template> 3286 </xsl:when> 3287 <xsl:otherwise> 3288 <xsl:value-of select="$end-value"/> 3289 </xsl:otherwise> 3290 </xsl:choose> 3291 </xsl:template> 3292 <xsl:template name="break-row-beyond-max"> 3293 <xsl:param name="pos"/> 3294 <xsl:param name="last-value"/> 3295 <xsl:param name="count-value"/> 3296 <xsl:variable name="pre-value" select="./表:分页符集/表:分页符[@表:列号 and (position() = $pos)]/@表:列号"/> 3297 <xsl:variable name="end-value"> 3298 <xsl:choose> 3299 <xsl:when test="$last-value < $pre-value"> 3300 <xsl:value-of select="$pre-value"/> 3301 </xsl:when> 3302 <xsl:otherwise> 3303 <xsl:value-of select="$last-value"/> 3304 </xsl:otherwise> 3305 </xsl:choose> 3306 </xsl:variable> 3307 <xsl:choose> 3308 <xsl:when test="$pos < $count-value"> 3309 <xsl:call-template name="break-row-beyond-max"> 3310 <xsl:with-param name="pos" select="$pos + 1"/> 3311 <xsl:with-param name="last-value" select="$end-value"/> 3312 <xsl:with-param name="count-value" select="$count-value"/> 3313 </xsl:call-template> 3314 </xsl:when> 3315 <xsl:otherwise> 3316 <xsl:value-of select="$end-value"/> 3317 </xsl:otherwise> 3318 </xsl:choose> 3319 </xsl:template> 3320 <xsl:template name="get-row-beyond-last"> 3321 <xsl:param name="index-value"/> 3322 <xsl:param name="worksheetNo"/> 3323 <xsl:param name="condition-pos-str"/> 3324 <xsl:param name="end-pos"/> 3325 <xsl:param name="total-col"/> 3326 <xsl:variable name="current" select="concat('R',$index-value)"/> 3327 <xsl:element name="table:table-row"> 3328 <xsl:choose> 3329 <xsl:when test="./表:分页符集/表:分页符/@行号 = ($index-value - 1)"> 3330 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('rob',$worksheetNo)"/></xsl:attribute> 3331 </xsl:when> 3332 <xsl:otherwise> 3333 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('ro',$worksheetNo)"/></xsl:attribute> 3334 </xsl:otherwise> 3335 </xsl:choose> 3336 <xsl:choose> 3337 <xsl:when test="contains($condition-pos-str,$current)"> 3338 <xsl:call-template name="get-cell-span-in"> 3339 <xsl:with-param name="row-pos" select="$index-value"/> 3340 <xsl:with-param name="c-start" select="1"/> 3341 <xsl:with-param name="c-end" select="$total-col"/> 3342 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3343 </xsl:call-template> 3344 </xsl:when> 3345 <xsl:otherwise> 3346 <table:table-cell/> 3347 </xsl:otherwise> 3348 </xsl:choose> 3349 </xsl:element> 3350 <xsl:if test="$index-value < ($end-pos + 1)"> 3351 <xsl:call-template name="get-row-beyond-last"> 3352 <xsl:with-param name="index-value" select="$index-value + 1"/> 3353 <xsl:with-param name="worksheetNo" select="$worksheetNo"/> 3354 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3355 <xsl:with-param name="end-pos" select="$end-pos"/> 3356 <xsl:with-param name="total-col" select="$total-col"/> 3357 </xsl:call-template> 3358 </xsl:if> 3359 </xsl:template> 3360 <xsl:template name="get-cell-span-in"> 3361 <xsl:param name="row-pos"/> 3362 <xsl:param name="c-start"/> 3363 <xsl:param name="c-end"/> 3364 <xsl:param name="condition-pos-str"/> 3365 <xsl:variable name="current" select="concat('R',$row-pos,'C',$c-start,',')"/> 3366 <xsl:variable name="style-name"> 3367 <xsl:choose> 3368 <xsl:when test="contains($condition-pos-str,$current)"> 3369 <xsl:variable name="temp-str"> 3370 <xsl:call-template name="condition-str"> 3371 <xsl:with-param name="param-str" select="substring-before($condition-pos-str,$current)"/> 3372 </xsl:call-template> 3373 </xsl:variable> 3374 <xsl:choose> 3375 <xsl:when test="starts-with($temp-str, 'c')"> 3376 <xsl:value-of select="concat('ce', substring-after($temp-str, 'c'))"/> 3377 </xsl:when> 3378 <xsl:when test="starts-with($temp-str, 'v')"> 3379 <xsl:value-of select="concat('val', substring-after($temp-str, 'v'))"/> 3380 </xsl:when> 3381 </xsl:choose> 3382 </xsl:when> 3383 <xsl:otherwise> 3384 <xsl:choose> 3385 <xsl:when test="../表:单元格[position() = position() - 1]/@表:式样引用"> 3386 <xsl:value-of select="../表:单元格[position() = position() - 1]/@表:式样引用 "/> 3387 </xsl:when> 3388 <xsl:when test="../@表:式样引用"> 3389 <xsl:value-of select="../@表:式样引用"/> 3390 </xsl:when> 3391 <xsl:otherwise> 3392 <xsl:value-of select="'Default'"/> 3393 </xsl:otherwise> 3394 </xsl:choose> 3395 </xsl:otherwise> 3396 </xsl:choose> 3397 </xsl:variable> 3398 <xsl:choose> 3399 <xsl:when test="$c-start < $c-end"> 3400 <xsl:call-template name="get-cell-condition-in"> 3401 <xsl:with-param name="style-name" select="$style-name"/> 3402 </xsl:call-template> 3403 <xsl:call-template name="get-cell-span-in"> 3404 <xsl:with-param name="row-pos" select="$row-pos"/> 3405 <xsl:with-param name="c-start" select="$c-start + 1"/> 3406 <xsl:with-param name="c-end" select="$c-end"/> 3407 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3408 </xsl:call-template> 3409 </xsl:when> 3410 <xsl:when test="$c-start = $c-end"> 3411 <xsl:call-template name="get-cell-condition-in"> 3412 <xsl:with-param name="style-name" select="$style-name"/> 3413 </xsl:call-template> 3414 </xsl:when> 3415 <xsl:otherwise> 3416 <table:table-cell/> 3417 </xsl:otherwise> 3418 </xsl:choose> 3419 </xsl:template> 3420 <xsl:template name="get-cell-condition-in"> 3421 <xsl:param name="style-name"/> 3422 <xsl:element name="table:table-cell"> 3423 <xsl:if test="not( contains($style-name, 'Default'))"> 3424 <xsl:choose> 3425 <xsl:when test="starts-with($style-name, 'val')"> 3426 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="$style-name"/></xsl:attribute> 3427 </xsl:when> 3428 <xsl:when test="starts-with($style-name, 'ce')"> 3429 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-name"/></xsl:attribute> 3430 </xsl:when> 3431 <xsl:otherwise> 3432 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-name"/></xsl:attribute> 3433 </xsl:otherwise> 3434 </xsl:choose> 3435 </xsl:if> 3436 <!--chengxiuzhi0617 单元格--> 3437 </xsl:element> 3438 </xsl:template> 3439 <xsl:key match="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:分页符集/表:分页符[@表:列号]" name="ColBreak" use="Column"/> 3440 <xsl:template name="create-default-column"> 3441 <xsl:param name="currentColumn"/> 3442 <xsl:param name="currentColumnNode"/> 3443 <xsl:param name="worksheetNo"/> 3444 <xsl:element name="table:table-column"> 3445 <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> 3446 <xsl:choose> 3447 <xsl:when test="key('ColBreak', $currentColumn)"> 3448 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('cob',$worksheetNo)"/></xsl:attribute> 3449 </xsl:when> 3450 <xsl:otherwise> 3451 <xsl:attribute name="table:style-name"><xsl:value-of select="concat('co',$worksheetNo)"/></xsl:attribute> 3452 </xsl:otherwise> 3453 </xsl:choose> 3454 <!--chengxiuzhi0617用key就错--> 3455 </xsl:element> 3456 </xsl:template> 3457 <xsl:template name="get-default-cell-style"> 3458 <xsl:param name="currentColumnNode"/> 3459 <xsl:choose> 3460 <xsl:when test="$currentColumnNode"> 3461 <xsl:choose> 3462 <xsl:when test="$currentColumnNode/@表:式样引用"> 3463 <xsl:value-of select="$currentColumnNode/@表:式样引用"/> 3464 </xsl:when> 3465 <xsl:otherwise>Default</xsl:otherwise> 3466 </xsl:choose> 3467 </xsl:when> 3468 <xsl:otherwise> 3469 <xsl:choose> 3470 <xsl:when test="./表:工作表内容[@表:式样引用]"> 3471 <xsl:value-of select="./表:工作表内容/@表:式样引用"/> 3472 </xsl:when> 3473 <xsl:otherwise>Default</xsl:otherwise> 3474 </xsl:choose> 3475 </xsl:otherwise> 3476 </xsl:choose> 3477 </xsl:template> 3478 <xsl:template match="表:行" mode="selected"> 3479 <xsl:param name="row-pos"/> 3480 <xsl:param name="condition-pos-str"/> 3481 <xsl:choose> 3482 <xsl:when test="表:单元格"> 3483 <xsl:apply-templates select="表:单元格[1]" mode="selected"> 3484 <xsl:with-param name="row-pos" select="$row-pos"/> 3485 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3486 <xsl:with-param name="col-pos-max"> 3487 <xsl:call-template name="condition-row-col-pos-max"> 3488 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3489 <xsl:with-param name="last-value" select="0"/> 3490 <xsl:with-param name="div-value" select="'C'"/> 3491 </xsl:call-template> 3492 </xsl:with-param> 3493 <xsl:with-param name="col-pos-before" select="0"/> 3494 </xsl:apply-templates> 3495 </xsl:when> 3496 <xsl:otherwise> 3497 <xsl:variable name="current" select="concat('R',$row-pos,'C')"/> 3498 <xsl:choose> 3499 <xsl:when test="contains($condition-pos-str,$current)"> 3500 <xsl:call-template name="get-cell-span-in"> 3501 <xsl:with-param name="row-pos" select="$row-pos"/> 3502 <xsl:with-param name="c-start" select="1"/> 3503 <xsl:with-param name="c-end"> 3504 <xsl:call-template name="condition-row-col-pos-max"> 3505 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3506 <xsl:with-param name="last-value" select="0"/> 3507 <xsl:with-param name="div-value" select="'C'"/> 3508 </xsl:call-template> 3509 </xsl:with-param> 3510 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3511 <xsl:with-param name="col-pos" select="1"/> 3512 </xsl:call-template> 3513 </xsl:when> 3514 <xsl:otherwise> 3515 <table:table-cell/> 3516 </xsl:otherwise> 3517 </xsl:choose> 3518 </xsl:otherwise> 3519 </xsl:choose> 3520 </xsl:template> 3521 <xsl:template match="表:单元格" mode="selected"> 3522 <xsl:param name="condition-pos-str"/> 3523 <xsl:param name="col-pos-max"/> 3524 <xsl:param name="col-pos-before"/> 3525 <xsl:param name="row-pos"/> 3526 <xsl:param name="col-repeated" select="1"/> 3527 <xsl:variable name="col-pos"> 3528 <xsl:choose> 3529 <xsl:when test="@表:列号"> 3530 <xsl:choose> 3531 <xsl:when test="@表:合并列数"> 3532 <xsl:value-of select="@表:合并列数 + @表:列号"/> 3533 </xsl:when> 3534 <xsl:otherwise> 3535 <xsl:value-of select="@表:列号"/> 3536 </xsl:otherwise> 3537 </xsl:choose> 3538 </xsl:when> 3539 <xsl:otherwise> 3540 <xsl:choose> 3541 <xsl:when test="@表:合并列数"> 3542 <xsl:value-of select="1 + @表:合并列数 + $col-pos-before"/> 3543 </xsl:when> 3544 <xsl:otherwise> 3545 <xsl:value-of select="1 + $col-pos-before"/> 3546 </xsl:otherwise> 3547 </xsl:choose> 3548 </xsl:otherwise> 3549 </xsl:choose> 3550 </xsl:variable> 3551 <xsl:variable name="next-cell" select="following-sibling::表:单元格[1]"/> 3552 <xsl:variable name="maodian" select="boolean($next-cell/uof:锚点)"/> 3553 <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/@表:列号)"/> 3554 <xsl:if test="$col-repeated = 1"> 3555 <xsl:if test="@表:列号 != ($col-pos-before + 1)"> 3556 <xsl:call-template name="get-cell-span-in"> 3557 <xsl:with-param name="row-pos" select="$row-pos"/> 3558 <xsl:with-param name="c-start" select="$col-pos-before + 1"/> 3559 <xsl:with-param name="c-end" select="@表:列号 - 1"/> 3560 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3561 </xsl:call-template> 3562 </xsl:if> 3563 <xsl:element name="table:table-cell"> 3564 <xsl:call-template name="create-table-cell-attributes"> 3565 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3566 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3567 <xsl:with-param name="col-pos" select="$col-pos"/> 3568 <xsl:with-param name="row-pos" select="$row-pos"/> 3569 </xsl:call-template> 3570 <xsl:if test="$cell-is-repeatable"> 3571 <xsl:apply-templates select="$next-cell" mode="selected"> 3572 <xsl:with-param name="row-pos" select="$row-pos"/> 3573 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3574 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3575 <xsl:with-param name="col-pos-before" select="$col-pos + 1"/> 3576 <xsl:with-param name="col-repeated" select="$col-repeated + 1"/> 3577 </xsl:apply-templates> 3578 </xsl:if> 3579 <xsl:call-template name="create-table-cell-content"> 3580 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3581 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3582 <xsl:with-param name="col-pos" select="$col-pos"/> 3583 <xsl:with-param name="row-pos" select="$row-pos"/> 3584 </xsl:call-template> 3585 </xsl:element> 3586 <xsl:if test="@表:合并列数"> 3587 <xsl:element name="table:covered-table-cell"> 3588 <xsl:if test="@表:合并列数 > 1"> 3589 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="@表:合并列数"/></xsl:attribute> 3590 </xsl:if> 3591 </xsl:element> 3592 </xsl:if> 3593 </xsl:if> 3594 <xsl:choose> 3595 <xsl:when test="not($cell-is-repeatable and $col-repeated = 1)"> 3596 <xsl:choose> 3597 <xsl:when test="not($cell-is-repeatable) and $col-repeated > 1"> 3598 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="$col-repeated"/></xsl:attribute> 3599 </xsl:when> 3600 <xsl:when test="not($next-cell)"> 3601 <xsl:if test="../../../../../表:公用处理规则/表:条件格式化集/表:条件格式化"> 3602 <xsl:call-template name="get-cell-span-in"> 3603 <xsl:with-param name="row-pos" select="$row-pos"/> 3604 <xsl:with-param name="c-start" select="$col-pos"/> 3605 <xsl:with-param name="c-end" select="$col-pos-max"/> 3606 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3607 </xsl:call-template> 3608 </xsl:if> 3609 </xsl:when> 3610 <xsl:when test="not($cell-is-repeatable)"> 3611 <xsl:apply-templates select="$next-cell" mode="selected"> 3612 <xsl:with-param name="row-pos" select="$row-pos"/> 3613 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3614 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3615 <xsl:with-param name="col-pos-before" select="$col-pos"/> 3616 </xsl:apply-templates> 3617 </xsl:when> 3618 <xsl:otherwise> 3619 <xsl:apply-templates select="$next-cell" mode="selected"> 3620 <xsl:with-param name="row-pos" select="$row-pos"/> 3621 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3622 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3623 <xsl:with-param name="col-pos-before" select="$col-pos"/> 3624 <xsl:with-param name="col-repeated" select="$col-repeated + 1"/> 3625 </xsl:apply-templates> 3626 </xsl:otherwise> 3627 </xsl:choose> 3628 </xsl:when> 3629 <xsl:otherwise> 3630 <xsl:if test="$next-cell"> 3631 <xsl:apply-templates select="$next-cell" mode="skip"> 3632 <xsl:with-param name="row-pos" select="$row-pos"/> 3633 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 3634 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 3635 <xsl:with-param name="col-pos-before" select="$col-pos"/> 3636 </xsl:apply-templates> 3637 </xsl:if> 3638 </xsl:otherwise> 3639 </xsl:choose> 3640 </xsl:template> 3641 <!--Redoffice comment liliang sc0012 06.02.15--> 3642 <!--新增内容--> 3643 <xsl:template match="uof:锚点"> 3644 <xsl:variable name="tuxing1" select="@uof:图形引用"/> 3645 <xsl:choose> 3646 <xsl:when test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]"> 3647 <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'"> 3648 <xsl:element name="draw:frame"> 3649 <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> 3650 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3651 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 3652 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 3653 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute> 3654 <xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]"> 3655 <xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 3656 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 3657 <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')"> 3658 <xsl:variable name="rotate-angle"> 3659 <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/> 3660 </xsl:variable> 3661 <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute> 3662 </xsl:if> 3663 <xsl:if test="图:文本内容"> 3664 <xsl:apply-templates select="图:文本内容/字:段落"/> 3665 <xsl:apply-templates select="图:文本内容/字:文字表"/> 3666 </xsl:if> 3667 </xsl:for-each> 3668 <xsl:element name="draw:image"> 3669 <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"> 3670 <xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符= $tuxing1]/uof:路径"/></xsl:attribute> 3671 </xsl:if> 3672 <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据"> 3673 <office:binary-data> 3674 <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据"/> 3675 </office:binary-data> 3676 </xsl:if> 3677 </xsl:element> 3678 </xsl:element> 3679 </xsl:if> 3680 </xsl:when> 3681 <xsl:when test="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:文本内容[@图:文本框='true']"> 3682 <draw:text-box text:anchor-type="paragraph"> 3683 <xsl:attribute name="draw:style-name"><xsl:value-of select="$tuxing1"/></xsl:attribute> 3684 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 3685 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute> 3686 <xsl:if test="@uof:x坐标"> 3687 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3688 </xsl:if> 3689 <xsl:if test="@uof:y坐标"> 3690 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 3691 </xsl:if> 3692 <xsl:attribute name="draw:z-index"><xsl:value-of select="/uof:UOF/uof:对象集/图:图形/@图:层次"/></xsl:attribute> 3693 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:文本内容/字:段落"/> 3694 <xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:文本内容/字:文字表"/> 3695 </draw:text-box> 3696 </xsl:when> 3697 <xsl:otherwise> 3698 <xsl:call-template name="graph"> 3699 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]"/> 3700 <xsl:with-param name="groupx" select="0"/> 3701 <xsl:with-param name="groupy" select="0"/> 3702 </xsl:call-template> 3703 </xsl:otherwise> 3704 </xsl:choose> 3705 </xsl:template> 3706 <xsl:template name="graph"> 3707 <xsl:param name="id"/> 3708 <xsl:param name="groupx"/> 3709 <xsl:param name="groupy"/> 3710 <xsl:for-each select="$id"> 3711 <xsl:variable name="tuxing1"> 3712 <xsl:value-of select="图:预定义图形/图:类别"/> 3713 </xsl:variable> 3714 <xsl:choose> 3715 <xsl:when test="$tuxing1='11'"> 3716 <xsl:call-template name="Rectangle"> 3717 <xsl:with-param name="groupx1" select="$groupx"/> 3718 <xsl:with-param name="groupy1" select="$groupy"/> 3719 </xsl:call-template> 3720 </xsl:when> 3721 <xsl:when test="$tuxing1='19'"> 3722 <xsl:call-template name="Oval"> 3723 <xsl:with-param name="groupx1" select="$groupx"/> 3724 <xsl:with-param name="groupy1" select="$groupy"/> 3725 </xsl:call-template> 3726 </xsl:when> 3727 <xsl:when test="$tuxing1='61'"> 3728 <xsl:call-template name="Line"> 3729 <xsl:with-param name="groupx1" select="$groupx"/> 3730 <xsl:with-param name="groupy1" select="$groupy"/> 3731 </xsl:call-template> 3732 </xsl:when> 3733 <xsl:when test="$tuxing1='64'"> 3734 <xsl:call-template name="Curve"> 3735 <xsl:with-param name="groupx1" select="$groupx"/> 3736 <xsl:with-param name="groupy1" select="$groupy"/> 3737 </xsl:call-template> 3738 </xsl:when> 3739 <xsl:when test="$tuxing1='65'"> 3740 <xsl:call-template name="Freeform"> 3741 <xsl:with-param name="groupx1" select="$groupx"/> 3742 <xsl:with-param name="groupy1" select="$groupy"/> 3743 </xsl:call-template> 3744 </xsl:when> 3745 <xsl:when test="$tuxing1='66'"> 3746 <xsl:call-template name="Scribble"> 3747 <xsl:with-param name="groupx1" select="$groupx"/> 3748 <xsl:with-param name="groupy1" select="$groupy"/> 3749 </xsl:call-template> 3750 </xsl:when> 3751 <xsl:when test="$tuxing1='4'"> 3752 <xsl:element name="draw:g"> 3753 <xsl:variable name="tu"> 3754 <xsl:value-of select="@图:标识符"/> 3755 </xsl:variable> 3756 <xsl:attribute name="draw:style-name"><xsl:value-of select="$tu"/></xsl:attribute> 3757 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 3758 <xsl:variable name="this-group-x"> 3759 <xsl:choose> 3760 <xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:x坐标"> 3761 <xsl:value-of select="key('rel_graphic_name',@图:标识符)/@uof:x坐标"/> 3762 </xsl:when> 3763 <xsl:otherwise> 3764 <xsl:value-of select="number(0)"/> 3765 </xsl:otherwise> 3766 </xsl:choose> 3767 </xsl:variable> 3768 <xsl:variable name="this-group-y"> 3769 <xsl:choose> 3770 <xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:y坐标"> 3771 <xsl:value-of select="key('rel_graphic_name',@图:标识符)/@uof:y坐标"/> 3772 </xsl:when> 3773 <xsl:otherwise> 3774 <xsl:value-of select="number(0)"/> 3775 </xsl:otherwise> 3776 </xsl:choose> 3777 </xsl:variable> 3778 <xsl:variable name="group-x"> 3779 <xsl:value-of select="number($groupx + $this-group-x)"/> 3780 </xsl:variable> 3781 <xsl:variable name="group-y"> 3782 <xsl:value-of select="number($groupy + $this-group-y)"/> 3783 </xsl:variable> 3784 <xsl:call-template name="组合图形"> 3785 <xsl:with-param name="zuheliebiao" select="@图:组合列表"/> 3786 <xsl:with-param name="groupx1" select="$group-x"/> 3787 <xsl:with-param name="groupy1" select="$group-y"/> 3788 </xsl:call-template> 3789 </xsl:element> 3790 </xsl:when> 3791 </xsl:choose> 3792 </xsl:for-each> 3793 </xsl:template> 3794 <xsl:template name="common"> 3795 <xsl:param name="groupx"/> 3796 <xsl:param name="groupy"/> 3797 <xsl:variable name="tuxing"> 3798 <xsl:value-of select="@图:标识符"/> 3799 </xsl:variable> 3800 <xsl:choose> 3801 <xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:x坐标"> 3802 <xsl:for-each select="key('rel_graphic_name',@图:标识符)"> 3803 <xsl:if test="@uof:x坐标"> 3804 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3805 </xsl:if> 3806 <xsl:if test="@uof:y坐标"> 3807 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 3808 </xsl:if> 3809 <xsl:variable name="tuxing1" select="@uof:图形引用"/> 3810 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 3811 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute> 3812 </xsl:for-each> 3813 </xsl:when> 3814 <xsl:otherwise> 3815 <xsl:variable name="zuheweizhi-x"> 3816 <xsl:value-of select="图:组合位置/@图:x坐标"/> 3817 </xsl:variable> 3818 <xsl:variable name="zuheweizhi-y"> 3819 <xsl:value-of select="图:组合位置/@图:y坐标"/> 3820 </xsl:variable> 3821 <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute> 3822 <xsl:attribute name="svg:x"><xsl:value-of select="concat(($groupx + $zuheweizhi-x),$uofUnit)"/></xsl:attribute> 3823 <xsl:attribute name="svg:y"><xsl:value-of select="concat(($groupy + $zuheweizhi-y),$uofUnit)"/></xsl:attribute> 3824 <xsl:attribute name="svg:width"><xsl:value-of select="concat(图:预定义图形/图:属性/图:宽度,$uofUnit)"/></xsl:attribute> 3825 <xsl:attribute name="svg:height"><xsl:value-of select="concat(图:预定义图形/图:属性 /图:高度,$uofUnit)"/></xsl:attribute> 3826 </xsl:otherwise> 3827 </xsl:choose> 3828 <xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute> 3829 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 3830 <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')"> 3831 <xsl:variable name="rotate-angle"> 3832 <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/> 3833 </xsl:variable> 3834 <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute> 3835 </xsl:if> 3836 <xsl:if test="图:文本内容"> 3837 <xsl:apply-templates select="图:文本内容/字:段落"/> 3838 <xsl:apply-templates select="图:文本内容/字:文字表"/> 3839 </xsl:if> 3840 </xsl:template> 3841 <xsl:template name="组合图形"> 3842 <xsl:param name="zuheliebiao"/> 3843 <xsl:param name="groupx1"/> 3844 <xsl:param name="groupy1"/> 3845 <xsl:variable name="x"> 3846 <xsl:value-of select="$groupx1"/> 3847 </xsl:variable> 3848 <xsl:variable name="y"> 3849 <xsl:value-of select="$groupy1"/> 3850 </xsl:variable> 3851 <xsl:variable name="first-pictures"> 3852 <xsl:value-of select="substring-before($zuheliebiao,',')"/> 3853 </xsl:variable> 3854 <xsl:variable name="other-pictures"> 3855 <xsl:value-of select="substring-after($zuheliebiao,',')"/> 3856 </xsl:variable> 3857 <xsl:choose> 3858 <xsl:when test="contains($other-pictures,',')"> 3859 <xsl:call-template name="graph"> 3860 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/> 3861 <xsl:with-param name="groupx" select="$groupx1"/> 3862 <xsl:with-param name="groupy" select="$groupy1"/> 3863 </xsl:call-template> 3864 <xsl:call-template name="组合图形"> 3865 <xsl:with-param name="zuheliebiao" select="$other-pictures"/> 3866 <xsl:with-param name="groupx1" select="$x"/> 3867 <xsl:with-param name="groupy1" select="$y"/> 3868 </xsl:call-template> 3869 </xsl:when> 3870 <xsl:otherwise> 3871 <xsl:call-template name="graph"> 3872 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/> 3873 <xsl:with-param name="groupx" select="$groupx1"/> 3874 <xsl:with-param name="groupy" select="$groupy1"/> 3875 </xsl:call-template> 3876 <xsl:call-template name="graph"> 3877 <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $other-pictures]"/> 3878 <xsl:with-param name="groupx" select="$groupx1"/> 3879 <xsl:with-param name="groupy" select="$groupy1"/> 3880 </xsl:call-template> 3881 </xsl:otherwise> 3882 </xsl:choose> 3883 </xsl:template> 3884 <xsl:template name="Curve"> 3885 <xsl:param name="groupx1"/> 3886 <xsl:param name="groupy1"/> 3887 <xsl:element name="draw:path"> 3888 <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/> 3889 <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/> 3890 <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute> 3891 <xsl:attribute name="svg:d"><xsl:value-of select="图:预定义图形/图:关键点坐标/@图:路径"/></xsl:attribute> 3892 <xsl:call-template name="common"> 3893 <xsl:with-param name="groupx" select="$groupx1"/> 3894 <xsl:with-param name="groupy" select="$groupy1"/> 3895 </xsl:call-template> 3896 </xsl:element> 3897 </xsl:template> 3898 <xsl:template name="Freeform"> 3899 <xsl:param name="groupx1"/> 3900 <xsl:param name="groupy1"/> 3901 <xsl:element name="draw:polygon"> 3902 <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/> 3903 <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/> 3904 <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute> 3905 <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> 3906 <xsl:call-template name="common"> 3907 <xsl:with-param name="groupx" select="$groupx1"/> 3908 <xsl:with-param name="groupy" select="$groupy1"/> 3909 </xsl:call-template> 3910 </xsl:element> 3911 </xsl:template> 3912 <xsl:template name="Scribble"> 3913 <xsl:param name="groupx1"/> 3914 <xsl:param name="groupy1"/> 3915 <xsl:element name="draw:polyline"> 3916 <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/> 3917 <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/> 3918 <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute> 3919 <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> 3920 <xsl:call-template name="common"> 3921 <xsl:with-param name="groupx" select="$groupx1"/> 3922 <xsl:with-param name="groupy" select="$groupy1"/> 3923 </xsl:call-template> 3924 </xsl:element> 3925 </xsl:template> 3926 <xsl:template name="drawpoints"> 3927 <xsl:param name="points"/> 3928 <xsl:param name="value"/> 3929 <xsl:variable name="frist-piont"> 3930 <xsl:value-of select="substring-before($points,'lineto')"/> 3931 </xsl:variable> 3932 <xsl:variable name="other-points"> 3933 <xsl:value-of select="substring-after($points,'lineto')"/> 3934 </xsl:variable> 3935 <xsl:choose> 3936 <xsl:when test="contains($other-points,'lineto')"> 3937 <xsl:variable name="x-coor"> 3938 <xsl:value-of select="substring-before($frist-piont,' ') * 1000"/> 3939 </xsl:variable> 3940 <xsl:variable name="y-coor"> 3941 <xsl:value-of select="substring-after($frist-piont,' ') * 1000"/> 3942 </xsl:variable> 3943 <xsl:variable name="all-points"> 3944 <xsl:value-of select="concat($value,$x-coor,',',$y-coor,' ')"/> 3945 </xsl:variable> 3946 <xsl:call-template name="drawpoints"> 3947 <xsl:with-param name="points" select="$other-points"/> 3948 <xsl:with-param name="value" select="$all-points"/> 3949 </xsl:call-template> 3950 </xsl:when> 3951 <xsl:otherwise> 3952 <xsl:variable name="q-x-coor"> 3953 <xsl:value-of select="substring-before($frist-piont,' ') * 1000"/> 3954 </xsl:variable> 3955 <xsl:variable name="q-y-coor"> 3956 <xsl:value-of select="substring-after($frist-piont,' ') * 1000"/> 3957 </xsl:variable> 3958 <xsl:variable name="e-x-coor"> 3959 <xsl:value-of select="substring-before($other-points,' ') * 1000"/> 3960 </xsl:variable> 3961 <xsl:variable name="e-y-coor"> 3962 <xsl:value-of select="substring-after($other-points,' ') * 1000"/> 3963 </xsl:variable> 3964 <xsl:value-of select="concat($value,$q-x-coor,',',$q-y-coor,' ',$e-x-coor,',',$e-y-coor)"/> 3965 </xsl:otherwise> 3966 </xsl:choose> 3967 </xsl:template> 3968 <xsl:template name="Oval"> 3969 <xsl:param name="groupx1"/> 3970 <xsl:param name="groupy1"/> 3971 <xsl:element name="draw:ellipse"> 3972 <xsl:call-template name="common"> 3973 <xsl:with-param name="groupx" select="$groupx1"/> 3974 <xsl:with-param name="groupy" select="$groupy1"/> 3975 </xsl:call-template> 3976 </xsl:element> 3977 </xsl:template> 3978 <xsl:template name="Rectangle"> 3979 <xsl:param name="groupx1"/> 3980 <xsl:param name="groupy1"/> 3981 <xsl:element name="draw:rect"> 3982 <xsl:call-template name="common"> 3983 <xsl:with-param name="groupx" select="$groupx1"/> 3984 <xsl:with-param name="groupy" select="$groupy1"/> 3985 </xsl:call-template> 3986 </xsl:element> 3987 </xsl:template> 3988 <xsl:template name="Line"> 3989 <xsl:param name="groupx1"/> 3990 <xsl:param name="groupy1"/> 3991 <xsl:element name="draw:line"> 3992 <xsl:variable name="tuxing1" select="@图:标识符"/> 3993 <xsl:choose> 3994 <xsl:when test="key('rel_graphic_name',@图:标识符)"> 3995 <xsl:for-each select="key('rel_graphic_name',@图:标识符)"> 3996 <xsl:attribute name="svg:x1"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute> 3997 <xsl:attribute name="svg:y1"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute> 3998 <xsl:attribute name="svg:x2"><xsl:value-of select="concat((number(@uof:x坐标) + number(@uof:宽度)),$uofUnit)"/></xsl:attribute> 3999 <xsl:attribute name="svg:y2"><xsl:value-of select="concat((number(@uof:y坐标) + number(@uof:高度)),$uofUnit)"/></xsl:attribute> 4000 </xsl:for-each> 4001 </xsl:when> 4002 <xsl:otherwise> 4003 <xsl:variable name="zuheweizhi-x"> 4004 <xsl:value-of select="图:组合位置/@图:x坐标"/> 4005 </xsl:variable> 4006 <xsl:variable name="zuheweizhi-y"> 4007 <xsl:value-of select="图:组合位置/@图:y坐标"/> 4008 </xsl:variable> 4009 <xsl:variable name="hex"> 4010 <xsl:value-of select="concat(number($groupx1 + $zuheweizhi-x),$uofUnit)"/> 4011 </xsl:variable> 4012 <xsl:variable name="hey"> 4013 <xsl:value-of select="concat(number($groupy1 + $zuheweizhi-y),$uofUnit)"/> 4014 </xsl:variable> 4015 <xsl:attribute name="svg:x1"><xsl:value-of select="$hex"/></xsl:attribute> 4016 <xsl:attribute name="svg:y1"><xsl:value-of select="$hey"/></xsl:attribute> 4017 <xsl:attribute name="svg:x2"><xsl:value-of select="concat(($hex + 图:预定义图形/图:属性/图:宽度),$uofUnit)"/></xsl:attribute> 4018 <xsl:attribute name="svg:y2"><xsl:value-of select="concat(($hey + 图:预定义图形/图:属性/图:高度),$uofUnit)"/></xsl:attribute> 4019 </xsl:otherwise> 4020 </xsl:choose> 4021 <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute> 4022 <xsl:attribute name="draw:style-name"><xsl:value-of select="$tuxing1"/></xsl:attribute> 4023 <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute> 4024 <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')"> 4025 <xsl:variable name="rotate-angle"> 4026 <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/> 4027 </xsl:variable> 4028 <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute> 4029 </xsl:if> 4030 <xsl:if test="图:文本内容"> 4031 <xsl:apply-templates select="图:文本内容/字:段落"/> 4032 <xsl:apply-templates select="图:文本内容/字:文字表"/> 4033 </xsl:if> 4034 </xsl:element> 4035 </xsl:template> 4036 <!--Redoffice comment liliang end 06.02.15--> 4037 <xsl:template match="表:单元格" mode="skip"> 4038 <xsl:param name="condition-pos-str"/> 4039 <xsl:param name="col-pos-max"/> 4040 <xsl:param name="col-pos-before"/> 4041 <xsl:param name="row-pos"/> 4042 <xsl:variable name="next-cell" select="following-sibling::表:单元格[1]"/> 4043 <xsl:variable name="cell-is-repeatable" select="not($next-cell/*) and not($next-cell/text()) and (@表:式样引用 = $next-cell/@表:式样引用) and not($next-cell/@表:列号)"/> 4044 <xsl:choose> 4045 <xsl:when test="$cell-is-repeatable"> 4046 <xsl:apply-templates select="$next-cell" mode="skip"> 4047 <xsl:with-param name="row-pos" select="$row-pos"/> 4048 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 4049 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 4050 <xsl:with-param name="col-pos-before" select="$col-pos-before + 1"/> 4051 </xsl:apply-templates> 4052 </xsl:when> 4053 <xsl:otherwise> 4054 <xsl:if test="$next-cell"> 4055 <xsl:apply-templates select="$next-cell" mode="selected"> 4056 <xsl:with-param name="row-pos" select="$row-pos"/> 4057 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 4058 <xsl:with-param name="col-pos-max" select="$col-pos-max"/> 4059 <xsl:with-param name="col-pos-before" select="$col-pos-before +1"/> 4060 </xsl:apply-templates> 4061 <!--chengxz0925 no otherwise ,some content cells missed --> 4062 </xsl:if> 4063 <!--chengxz 060418 add if sentence--> 4064 </xsl:otherwise> 4065 </xsl:choose> 4066 </xsl:template> 4067 <!--xsl:template name="create-table-cell-attributes"></xsl:template> 4068<xsl:template name="create-table-cell-content"></xsl:template> 4069<xsl:template name="create-data-content"></xsl:template> 4070<xsl:template name="get-condition-dependent-cell-attributes"></xsl:template--> 4071 <xsl:template name="create-table-cell-attributes"> 4072 <xsl:param name="condition-pos-str"/> 4073 <xsl:param name="col-pos-max"/> 4074 <xsl:param name="col-pos"/> 4075 <xsl:param name="row-pos"/> 4076 <xsl:choose> 4077 <xsl:when test="$condition-pos-str"> 4078 <xsl:call-template name="get-condition-dependent-cell-attributes"> 4079 <xsl:with-param name="condition-pos-str" select="$condition-pos-str"/> 4080 <xsl:with-param name="current-pos-str" select="concat('R',$row-pos,'C',$col-pos,',')"/> 4081 </xsl:call-template> 4082 </xsl:when> 4083 <xsl:otherwise> 4084 <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> 4085 <!--chengxiuzhi--> 4086 </xsl:otherwise> 4087 </xsl:choose> 4088 <xsl:if test="@表:合并列数 or @表:合并行数"> 4089 <xsl:choose> 4090 <xsl:when test="@表:合并列数"> 4091 <xsl:attribute name="table:number-columns-spanned"><xsl:value-of select="@表:合并列数 + 1"/></xsl:attribute> 4092 </xsl:when> 4093 <xsl:otherwise> 4094 <xsl:attribute name="table:number-columns-spanned">1</xsl:attribute> 4095 </xsl:otherwise> 4096 </xsl:choose> 4097 <xsl:choose> 4098 <xsl:when test="@表:合并行数"> 4099 <xsl:attribute name="table:number-rows-spanned"><xsl:value-of select="@表:合并行数+1"/></xsl:attribute> 4100 </xsl:when> 4101 <xsl:otherwise> 4102 <xsl:attribute name="table:number-rows-spanned">1</xsl:attribute> 4103 </xsl:otherwise> 4104 </xsl:choose> 4105 </xsl:if> 4106 <xsl:if test="表:数据"> 4107 <xsl:if test="表:数据/表:公式"> 4108 <xsl:variable name="calc-formula"> 4109 <xsl:call-template name="translate-expression"> 4110 <xsl:with-param name="cell-row-pos" select="$row-pos"/> 4111 <xsl:with-param name="cell-column-pos" select="$col-pos"/> 4112 <xsl:with-param name="expression" select="表:数据/表:公式"/> 4113 <xsl:with-param name="return-value" select="''"/> 4114 </xsl:call-template> 4115 </xsl:variable> 4116 <xsl:attribute name="table:formula"><xsl:value-of select="$calc-formula"/></xsl:attribute> 4117 </xsl:if> 4118 <!--RedOffice Comment from Zengjh:UOF0020 2006-04-17 Based on Original--> 4119 <xsl:variable name="table-stylename" select="@表:式样引用"/> 4120 <xsl:variable name="data-format"> 4121 <xsl:for-each select="/uof:UOF/uof:式样集/uof:单元格式样"> 4122 <xsl:if test="$table-stylename = ./@ 表:标识符"> 4123 <xsl:value-of select="表:数字格式/@表:分类名称"/> 4124 </xsl:if> 4125 </xsl:for-each> 4126 </xsl:variable> 4127 <xsl:variable name="data-formatcode"> 4128 <xsl:for-each select="/uof:UOF/uof:式样集/uof:单元格式样"> 4129 <xsl:if test="$table-stylename= ./@表:标识符"> 4130 <xsl:value-of select="表:数字格式/@表:格式码"/> 4131 </xsl:if> 4132 </xsl:for-each> 4133 </xsl:variable> 4134 <xsl:choose> 4135 <xsl:when test="表:数据/@表:数据类型 = 'number'"> 4136 <xsl:choose> 4137 <xsl:when test="$data-format = 'percentage' or contains( $data-formatcode, '%')"> 4138 <xsl:attribute name="office:value-type">percentage</xsl:attribute> 4139 </xsl:when> 4140 <xsl:when test="contains($data-format, 'currency')"> 4141 <xsl:attribute name="office:value-type">currency</xsl:attribute> 4142 <xsl:attribute name="office:currency">CNY</xsl:attribute> 4143 </xsl:when> 4144 <xsl:otherwise> 4145 <xsl:attribute name="office:value-type">float</xsl:attribute> 4146 </xsl:otherwise> 4147 </xsl:choose> 4148 <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> 4149 </xsl:when> 4150 <xsl:when test="表:数据/@表:数据类型 = 'date'"> 4151 <xsl:attribute name="office:value-type">date</xsl:attribute> 4152 <xsl:attribute name="office:date-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 4153 </xsl:when> 4154 <xsl:when test="表:数据/@表:数据类型 = 'time'"> 4155 <xsl:attribute name="office:value-type">time</xsl:attribute> 4156 <xsl:attribute name="office:time-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 4157 </xsl:when> 4158 <xsl:when test="表:数据/@表:数据类型 = 'boolean'"> 4159 <xsl:attribute name="office:value-type">boolean</xsl:attribute> 4160 <xsl:attribute name="office:boolean-value"><xsl:choose><xsl:when test="表:数据/字:句/字:文本串 = '1'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 4161 </xsl:when> 4162 <xsl:when test="表:数据/@表:数据类型 = 'text'"> 4163 <xsl:attribute name="office:value-type">string</xsl:attribute> 4164 <xsl:attribute name="office:string-value"><xsl:value-of select="表:数据/@表:数据数值"/></xsl:attribute> 4165 </xsl:when> 4166 </xsl:choose> 4167 </xsl:if> 4168 <!-- zhangying ok and /uof:UOF/uof:电子表格/表:公共处理规则/表:数据有效性集--> 4169 <xsl:if test="表:数据"> 4170 <xsl:variable name="validation-name"> 4171 <xsl:call-template name="zyvalidationtest"> 4172 <xsl:with-param name="column-num" select="$col-pos"/> 4173 <xsl:with-param name="row-num" select="$row-pos"/> 4174 <xsl:with-param name="table-name" select="ancestor::表:工作表/@表:名称"/> 4175 <xsl:with-param name="validation-set" select="/uof:UOF/uof:电子表格/表:公用处理规则/表:数据有效性集/表:数据有效性"/> 4176 <xsl:with-param name="validation-num" select="'1'"/> 4177 </xsl:call-template> 4178 </xsl:variable> 4179 <xsl:if test="$validation-name!=''"> 4180 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="$validation-name"/></xsl:attribute> 4181 </xsl:if> 4182 </xsl:if> 4183 <!-- zhangying mod end --> 4184 </xsl:template> 4185 <!-- zhangying o --> 4186 <xsl:template name="zyvalidationtest"> 4187 <xsl:param name="row-num"/> 4188 <xsl:param name="column-num"/> 4189 <xsl:param name="table-name"/> 4190 <xsl:param name="validation-set"/> 4191 <xsl:param name="validation-num"/> 4192 <xsl:if test="$validation-set"> 4193 <xsl:variable name="zone" select="$validation-set/表:区域/text()"/> 4194 <xsl:variable name="success"> 4195 <xsl:choose> 4196 <xsl:when test="$table-name=substring-after(substring-before($zone,'.'),'$')"> 4197 <xsl:variable name="validation-row-left-top" select="substring-before(substring-after(substring-after(substring-after($zone,'$'),'$'),'$'),':')"/> 4198 <xsl:variable name="validation-row-right-bottom" select="substring-after(substring-after(substring-after($zone,':$'),'$'),'$')"/> 4199 <xsl:choose> 4200 <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"> 4201 <xsl:variable name="validation-column-left-top"> 4202 <xsl:call-template name="translate-column-char-to-number"> 4203 <xsl:with-param name="string" select="substring-before(substring-after(substring-after($zone,'$'),'$'),'$')"/> 4204 </xsl:call-template> 4205 </xsl:variable> 4206 <xsl:variable name="validation-column-right-bottom"> 4207 <xsl:call-template name="translate-column-char-to-number"> 4208 <xsl:with-param name="string" select="substring-before(substring-after(substring-after($zone,':$'),'$'),'$')"/> 4209 </xsl:call-template> 4210 </xsl:variable> 4211 <xsl:choose> 4212 <xsl:when test="($column-num >= $validation-column-left-top) and ($column-num <= $validation-column-right-bottom)">yes</xsl:when> 4213 <xsl:otherwise/> 4214 </xsl:choose> 4215 </xsl:when> 4216 <xsl:otherwise/> 4217 </xsl:choose> 4218 </xsl:when> 4219 <xsl:otherwise/> 4220 </xsl:choose> 4221 </xsl:variable> 4222 <xsl:choose> 4223 <xsl:when test="$success='yes'"> 4224 <xsl:value-of select="concat('val',$validation-num)"/> 4225 </xsl:when> 4226 <xsl:otherwise> 4227 <xsl:call-template name="zyvalidationtest"> 4228 <xsl:with-param name="table-name" select="$table-name"/> 4229 <xsl:with-param name="row-num" select="$row-num"/> 4230 <xsl:with-param name="column-num" select="$column-num"/> 4231 <xsl:with-param name="validation-set" select="$validation-set[position()!=1]"/> 4232 <xsl:with-param name="validation-num" select="$validation-num + 1"/> 4233 </xsl:call-template> 4234 </xsl:otherwise> 4235 </xsl:choose> 4236 </xsl:if> 4237 </xsl:template> 4238 <!--zhangying mod end --> 4239 <xsl:template name="create-table-cell-content"> 4240 <xsl:param name="condition-pos-str"/> 4241 <xsl:param name="col-pos-max"/> 4242 <xsl:param name="col-pos"/> 4243 <xsl:param name="row-pos"/> 4244 <!--Redoffice comment liliang SC0011 06.02.15 --> 4245 <!--新增内容--> 4246 <xsl:apply-templates select="uof:锚点"/> 4247 <!--Redoffice comment liliang end 06.02.15 --> 4248 <xsl:apply-templates select="表:批注" mode="body"/> 4249 <!--RedOffice Comment from Zengjh:UOF0020 2006-04-26 charts--> 4250 <xsl:apply-templates select="表:图表"/> 4251 <xsl:if test="表:数据/字:句"> 4252 <text:p> 4253 <xsl:call-template name="create-data-content"> 4254 <xsl:with-param name="style-id" select="../../@表:式样引用"/> 4255 </xsl:call-template> 4256 </text:p> 4257 </xsl:if> 4258 <!--chengxz0701多个句不能读入--> 4259 </xsl:template> 4260 <xsl:template name="create-data-content"> 4261 <xsl:param name="style-id" select="@表:式样引用"/> 4262 <xsl:variable name="html-children" select="表:式样引用/descendant-or-self::*[namespace-uri()='http://www.w3.org/TR/REC-html40'][string-length(text()) != 0]"/> 4263 <xsl:choose> 4264 <xsl:when test="$html-children and $html-children != ''"> 4265 <xsl:for-each select="$html-children"> 4266 <text:span text:style-name="{concat($style-id, 'T', count(preceding::表:数据/字:句/字:文本串[child::html:*]), '_', position())}"> 4267 <xsl:copy-of select="text()"/> 4268 </text:span> 4269 </xsl:for-each> 4270 </xsl:when> 4271 <xsl:when test="@表:超链接引用"> 4272 <text:a xlink:href="{@表:超链接引用}"> 4273 <xsl:value-of select="表:数据/字:句/字:文本串"/> 4274 </text:a> 4275 </xsl:when> 4276 <xsl:otherwise> 4277 <xsl:for-each select="表:数据/字:句"> 4278 <xsl:choose> 4279 <xsl:when test="name(descendant::*[1])='字:句属性'"> 4280 <text:span> 4281 <xsl:attribute name="text:style-name"><xsl:value-of select="descendant::*[1]/@字:式样引用"/></xsl:attribute> 4282 <xsl:value-of select="./字:文本串"/> 4283 </text:span> 4284 </xsl:when> 4285 <xsl:otherwise> 4286 <xsl:value-of select="./字:文本串"/> 4287 </xsl:otherwise> 4288 </xsl:choose> 4289 </xsl:for-each> 4290 </xsl:otherwise> 4291 </xsl:choose> 4292 </xsl:template> 4293 <xsl:template name="create-comment-data-content"> 4294 <xsl:param name="style-id" select="@表:式样引用"/> 4295 <xsl:variable name="html-children" select="表:式样引用/descendant-or-self::*[namespace-uri()='http://www.w3.org/TR/REC-html40'][string-length(text()) != 0]"/> 4296 <xsl:choose> 4297 <xsl:when test="$html-children and $html-children != ''"> 4298 <xsl:for-each select="$html-children"> 4299 <text:span text:style-name="{concat($style-id, 'T', count(preceding::图:文本内容/字:段落/字:句/字:文本串[child::html:*]), '_', position())}"> 4300 <xsl:copy-of select="text()"/> 4301 </text:span> 4302 </xsl:for-each> 4303 </xsl:when> 4304 <xsl:when test="@表:超链接引用"> 4305 <text:a xlink:href="{@表:超链接引用}"> 4306 <xsl:value-of select="图:文本内容/字:段落/字:句/字:文本串"/> 4307 </text:a> 4308 </xsl:when> 4309 <xsl:otherwise> 4310 <xsl:value-of select="图:文本内容/字:段落/字:句/字:文本串"/> 4311 </xsl:otherwise> 4312 </xsl:choose> 4313 </xsl:template> 4314 <xsl:template name="get-condition-dependent-cell-attributes"> 4315 <xsl:param name="condition-pos-str"/> 4316 <xsl:param name="current-pos-str"/> 4317 <xsl:variable name="temp-str"> 4318 <xsl:call-template name="condition-str"> 4319 <xsl:with-param name="param-str" select="substring-before($condition-pos-str,$current-pos-str)"/> 4320 </xsl:call-template> 4321 </xsl:variable> 4322 <xsl:variable name="style-name"> 4323 <xsl:choose> 4324 <xsl:when test="contains($condition-pos-str, $current-pos-str) and starts-with($temp-str, 'c')"> 4325 <xsl:value-of select="concat('ce', substring-after($temp-str, 'c'))"/> 4326 </xsl:when> 4327 <xsl:otherwise> 4328 <xsl:choose> 4329 <xsl:when test="@表:式样引用"> 4330 <xsl:value-of select="@表:式样引用"/> 4331 </xsl:when> 4332 <xsl:when test="../@表:式样引用"> 4333 <xsl:value-of select="../@表:式样引用"/> 4334 </xsl:when> 4335 <xsl:otherwise> 4336 <xsl:value-of select="'Default'"/> 4337 </xsl:otherwise> 4338 </xsl:choose> 4339 </xsl:otherwise> 4340 </xsl:choose> 4341 </xsl:variable> 4342 <xsl:if test="not( contains($style-name, 'Default'))"> 4343 <xsl:choose> 4344 <xsl:when test="starts-with($style-name, 'val')"> 4345 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="$style-name"/></xsl:attribute> 4346 </xsl:when> 4347 <xsl:otherwise> 4348 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-name"/></xsl:attribute> 4349 </xsl:otherwise> 4350 </xsl:choose> 4351 </xsl:if> 4352 <xsl:if test="contains($style-name, 'Default')"> 4353 <xsl:variable name="style-nametemp"> 4354 <xsl:choose> 4355 <xsl:when test="@表:式样引用"> 4356 <xsl:value-of select="@表:式样引用"/> 4357 </xsl:when> 4358 <xsl:when test="../@表:式样引用"> 4359 <xsl:value-of select="../@表:式样引用"/> 4360 </xsl:when> 4361 <xsl:otherwise> 4362 <xsl:value-of select="'Default'"/> 4363 </xsl:otherwise> 4364 </xsl:choose> 4365 </xsl:variable> 4366 <xsl:attribute name="table:style-name"><xsl:value-of select="$style-nametemp"/></xsl:attribute> 4367 <!--xsl:attribute name="style:data-style-name"><xsl:value-of select="N104" /></xsl:attribute--> 4368 </xsl:if> 4369 <!--chengxz--> 4370 <xsl:if test="contains($condition-pos-str, $current-pos-str)"> 4371 <xsl:choose> 4372 <xsl:when test="starts-with($temp-str, 'v')"> 4373 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="concat('val', substring-after($temp-str, 'v'))"/></xsl:attribute> 4374 </xsl:when> 4375 <xsl:otherwise> 4376 <xsl:variable name="after-str" select="substring-after($condition-pos-str, $current-pos-str)"/> 4377 <xsl:if test="contains( $after-str, $current-pos-str)"> 4378 <xsl:variable name="temp-str-2"> 4379 <xsl:call-template name="condition-str"> 4380 <xsl:with-param name="param-str" select="substring-before( $after-str,$current-pos-str)"/> 4381 </xsl:call-template> 4382 </xsl:variable> 4383 <xsl:if test="starts-with( $temp-str-2, 'v')"> 4384 <xsl:attribute name="table:content-validation-name"><xsl:value-of select="concat('val', substring-after($temp-str-2, 'v'))"/></xsl:attribute> 4385 </xsl:if> 4386 </xsl:if> 4387 </xsl:otherwise> 4388 </xsl:choose> 4389 </xsl:if> 4390 </xsl:template> 4391 <xsl:template match="表:工作表内容"> 4392 <xsl:variable name="default-column-width"> 4393 <xsl:choose> 4394 <xsl:when test="@表:缺省列宽"> 4395 <xsl:call-template name="convert2cm"> 4396 <xsl:with-param name="value" select="concat(@表:缺省列宽,'pt')"/> 4397 </xsl:call-template> 4398 <xsl:text>cm</xsl:text> 4399 </xsl:when> 4400 <xsl:otherwise>2.096cm</xsl:otherwise> 4401 </xsl:choose> 4402 </xsl:variable> 4403 <xsl:variable name="table-pos"> 4404 <xsl:value-of select="count(../preceding-sibling::表:工作表)+1"/> 4405 </xsl:variable> 4406 <xsl:choose> 4407 <xsl:when test="表:列"> 4408 <xsl:call-template name="get-column-style-name"> 4409 <xsl:with-param name="finishedColumns" select="0"/> 4410 <xsl:with-param name="columnCount" select="count(./表:列)"/> 4411 <xsl:with-param name="currentCount" select="1"/> 4412 <xsl:with-param name="table-pos" select="$table-pos"/> 4413 <xsl:with-param name="default-column-width" select="$default-column-width"/> 4414 </xsl:call-template> 4415 </xsl:when> 4416 </xsl:choose> 4417 <xsl:if test="../表:分页符集/表:分页符[@表:列号]"> 4418 <style:style style:name="{concat('cob',$table-pos)}" style:family="table-column"> 4419 <xsl:element name="style:table-column-properties"> 4420 <xsl:attribute name="style:column-width"><xsl:value-of select="$default-column-width"/></xsl:attribute> 4421 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4422 </xsl:element> 4423 </style:style> 4424 </xsl:if> 4425 <xsl:variable name="default-row-height"> 4426 <xsl:choose> 4427 <xsl:when test="@表:缺省行高"> 4428 <xsl:call-template name="convert2cm"> 4429 <xsl:with-param name="value" select="concat(@表:缺省行高,'pt')"/> 4430 </xsl:call-template> 4431 <xsl:text>cm</xsl:text> 4432 </xsl:when> 4433 <xsl:otherwise>0.503cm</xsl:otherwise> 4434 </xsl:choose> 4435 </xsl:variable> 4436 <style:style style:family="table-row" style:name="{concat('ro', $table-pos)}"> 4437 <style:table-row-properties style:row-height="{$default-row-height}" style:use-optimal-row-height="false"/> 4438 </style:style> 4439 <xsl:if test="表:行"> 4440 <xsl:call-template name="get-row-style-name"> 4441 <xsl:with-param name="lastrowpos" select="0"/> 4442 <xsl:with-param name="row-count" select="count(./表:行)"/> 4443 <xsl:with-param name="currentRow" select="1"/> 4444 <xsl:with-param name="table-pos" select="$table-pos"/> 4445 <xsl:with-param name="default-row-height" select="$default-row-height"/> 4446 </xsl:call-template> 4447 </xsl:if> 4448 <!--RedOffice Comment from Zengjh:UOF0020 2006-06-11 charts--> 4449 <xsl:for-each select="//表:图表"> 4450 <xsl:variable name="chart-current"> 4451 <xsl:number level="any" count="表:图表" format="1"/> 4452 </xsl:variable> 4453 <style:style style:family="graphics" style:name="{concat('chart', $chart-current)}"> 4454 <style:graphic-properties> 4455 <xsl:choose> 4456 <xsl:when test="@表:随动方式='none'"> 4457 <xsl:attribute name="draw:move-protect">true</xsl:attribute> 4458 <xsl:attribute name="draw:size-protect">true</xsl:attribute> 4459 </xsl:when> 4460 <xsl:when test="@表:随动方式='move'"> 4461 <xsl:attribute name="draw:size-protect">true</xsl:attribute> 4462 </xsl:when> 4463 <xsl:otherwise/> 4464 </xsl:choose> 4465 </style:graphic-properties> 4466 </style:style> 4467 </xsl:for-each> 4468 <!--RedOffice comment (Zengjh) end charts--> 4469 <xsl:if test="../表:分页符集/表:分页符[@行号]"> 4470 <style:style style:name="{concat('rob',$table-pos)}" style:family="table-row"> 4471 <xsl:element name="style:table-row-properties"> 4472 <xsl:attribute name="style:row-height"><xsl:value-of select="$default-row-height"/></xsl:attribute> 4473 <xsl:attribute name="style:use-optimal-row-height">false</xsl:attribute> 4474 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4475 </xsl:element> 4476 </style:style> 4477 </xsl:if> 4478 <xsl:element name="style:style"> 4479 <xsl:attribute name="style:name"><xsl:value-of select="concat( 'ta', $table-pos)"/></xsl:attribute> 4480 <xsl:attribute name="style:family">table</xsl:attribute> 4481 <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> 4482 <xsl:element name="style:properties"> 4483 <xsl:choose> 4484 <xsl:when test="../@表:隐藏 = 'true'"> 4485 <xsl:attribute name="table:display">false</xsl:attribute> 4486 </xsl:when> 4487 <xsl:otherwise> 4488 <xsl:attribute name="table:display">true</xsl:attribute> 4489 </xsl:otherwise> 4490 </xsl:choose> 4491 </xsl:element> 4492 </xsl:element> 4493 </xsl:template> 4494 <xsl:template name="get-column-style-name"> 4495 <xsl:param name="finishedColumns"/> 4496 <xsl:param name="columnCount"/> 4497 <xsl:param name="currentCount"/> 4498 <xsl:param name="table-pos"/> 4499 <xsl:param name="default-column-width"/> 4500 <xsl:if test="$currentCount < ($columnCount + 1)"> 4501 <xsl:variable name="span-value"> 4502 <xsl:choose> 4503 <xsl:when test="./表:列[position() = $currentCount]/@表:跨度"> 4504 <xsl:value-of select="./表:跨度[position() = $currentCount]/@表:跨度 + 1"/> 4505 </xsl:when> 4506 <xsl:otherwise> 4507 <xsl:value-of select="0"/> 4508 </xsl:otherwise> 4509 </xsl:choose> 4510 </xsl:variable> 4511 <xsl:variable name="current-index"> 4512 <xsl:choose> 4513 <xsl:when test="./表:列[position() = $currentCount]/@表:列号"> 4514 <xsl:value-of select="./表:列[position() = $currentCount]/@表:列号 - 1"/> 4515 </xsl:when> 4516 <xsl:otherwise> 4517 <xsl:value-of select="$finishedColumns"/> 4518 </xsl:otherwise> 4519 </xsl:choose> 4520 </xsl:variable> 4521 <xsl:variable name="column-break"> 4522 <xsl:choose> 4523 <xsl:when test="$span-value = 0"> 4524 <xsl:if test="../表:分页符集/表:分页符/表:列 = $current-index"> 4525 <xsl:value-of select="1"/> 4526 </xsl:if> 4527 </xsl:when> 4528 <xsl:otherwise> 4529 <xsl:if test="../表:分页符集/表:分页符[(@表:列号 > $finishedColumns) and (@表:列号 < ($finishedColumns + $span-value))]"> 4530 <xsl:value-of select="1"/> 4531 </xsl:if> 4532 </xsl:otherwise> 4533 </xsl:choose> 4534 </xsl:variable> 4535 <xsl:if test="$column-break = 1"> 4536 <xsl:element name="style:style"> 4537 <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> 4538 <xsl:attribute name="style:family">table-column</xsl:attribute> 4539 <xsl:element name="style:table-column-properties"> 4540 <xsl:choose> 4541 <xsl:when test="./表:列[position() = $currentCount]/@表:列宽"> 4542 <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> 4543 </xsl:when> 4544 <xsl:otherwise> 4545 <xsl:attribute name="style:column-width"><xsl:value-of select="$default-column-width"/></xsl:attribute> 4546 </xsl:otherwise> 4547 </xsl:choose> 4548 <xsl:choose> 4549 <xsl:when test="./表:列[position() = $currentCount]/@表:列宽 > 0"> 4550 <xsl:attribute name="style:use-optimal-column-width">false</xsl:attribute> 4551 </xsl:when> 4552 <xsl:otherwise> 4553 <xsl:attribute name="style:use-optimal-column-width">true</xsl:attribute> 4554 </xsl:otherwise> 4555 </xsl:choose> 4556 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4557 </xsl:element> 4558 </xsl:element> 4559 </xsl:if> 4560 <style:style style:name="{concat('co', $table-pos, '-',$currentCount)}" style:family="table-column"> 4561 <xsl:element name="style:table-column-properties"> 4562 <xsl:choose> 4563 <xsl:when test="./表:列[position() = $currentCount]/@表:列宽"> 4564 <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> 4565 </xsl:when> 4566 <xsl:otherwise> 4567 <xsl:attribute name="style:column-width"><xsl:value-of select="$default-column-width"/></xsl:attribute> 4568 </xsl:otherwise> 4569 </xsl:choose> 4570 <xsl:attribute name="fo:break-before">auto</xsl:attribute> 4571 </xsl:element> 4572 </style:style> 4573 <xsl:if test="$currentCount < $columnCount"> 4574 <xsl:call-template name="get-column-style-name"> 4575 <xsl:with-param name="finishedColumns"> 4576 <xsl:choose> 4577 <xsl:when test="./表:列[position() = $currentCount]/@表:列号"> 4578 <xsl:choose> 4579 <xsl:when test="./表:列[position() = $currentCount]/@表:跨度"> 4580 <xsl:value-of select="./表:列[position() = $currentCount]/@表:列宽 + ./表:列[position() = $currentCount]/@表:跨度"/> 4581 </xsl:when> 4582 <xsl:otherwise> 4583 <xsl:value-of select="./表:列[position() = $currentCount]/@表:列号"/> 4584 </xsl:otherwise> 4585 </xsl:choose> 4586 </xsl:when> 4587 <xsl:otherwise> 4588 <xsl:choose> 4589 <xsl:when test="./表:列[position() = $currentCount]/@表:跨度"> 4590 <xsl:value-of select="$finishedColumns + ./表:列[position() = $currentCount]/@表:跨度 + 1"/> 4591 </xsl:when> 4592 <xsl:otherwise> 4593 <xsl:value-of select="$finishedColumns + 1"/> 4594 </xsl:otherwise> 4595 </xsl:choose> 4596 </xsl:otherwise> 4597 </xsl:choose> 4598 </xsl:with-param> 4599 <xsl:with-param name="columnCount" select="$columnCount"/> 4600 <xsl:with-param name="currentCount" select="$currentCount + 1"/> 4601 <xsl:with-param name="table-pos" select="$table-pos"/> 4602 <xsl:with-param name="default-column-width" select="$default-column-width"/> 4603 </xsl:call-template> 4604 </xsl:if> 4605 </xsl:if> 4606 </xsl:template> 4607 <xsl:template name="get-row-style-name"> 4608 <xsl:param name="lastrowpos"/> 4609 <xsl:param name="row-count"/> 4610 <xsl:param name="currentRow"/> 4611 <xsl:param name="table-pos"/> 4612 <xsl:param name="default-row-height"/> 4613 <xsl:if test="$currentRow < ($row-count + 1)"> 4614 <xsl:variable name="span-value"> 4615 <xsl:choose> 4616 <xsl:when test="./表:行[position() = $currentRow]/@表:行号"> 4617 <xsl:choose> 4618 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4619 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号 - $lastrowpos+ ./表:行[position() = $currentRow]/@表:跨度"/> 4620 </xsl:when> 4621 <xsl:otherwise> 4622 <xsl:value-of select="0"/> 4623 </xsl:otherwise> 4624 </xsl:choose> 4625 </xsl:when> 4626 <xsl:otherwise> 4627 <xsl:choose> 4628 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4629 <xsl:value-of select="./表:行[position() = $currentRow]/@表:跨度 + 1"/> 4630 </xsl:when> 4631 <xsl:otherwise> 4632 <xsl:value-of select="0"/> 4633 </xsl:otherwise> 4634 </xsl:choose> 4635 </xsl:otherwise> 4636 </xsl:choose> 4637 </xsl:variable> 4638 <xsl:variable name="current-index"> 4639 <xsl:choose> 4640 <xsl:when test="./表:行[position() = $currentRow]/@表:行号"> 4641 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号 - 1"/> 4642 </xsl:when> 4643 <xsl:otherwise> 4644 <xsl:value-of select="$lastrowpos"/> 4645 </xsl:otherwise> 4646 </xsl:choose> 4647 </xsl:variable> 4648 <xsl:variable name="row-break"> 4649 <xsl:choose> 4650 <xsl:when test="$span-value = 0"> 4651 <xsl:if test="../表:分页符集/表:分页符/@表:行号 = $current-index"> 4652 <xsl:value-of select="1"/> 4653 </xsl:if> 4654 </xsl:when> 4655 <xsl:otherwise> 4656 <xsl:if test="../表:分页符集/表:分页符[(@表:行号 > $lastrowpos) and (@表:行号 < ($lastrowpos + $span-value))]"> 4657 <xsl:value-of select="1"/> 4658 </xsl:if> 4659 </xsl:otherwise> 4660 </xsl:choose> 4661 </xsl:variable> 4662 <xsl:if test="$row-break = 1"> 4663 <style:style style:name="{concat('rob', $table-pos, '-',$currentRow)}" style:family="table-row"> 4664 <xsl:element name="style:table-row-properties"> 4665 <xsl:choose> 4666 <xsl:when test="./表:行[position() = $currentRow]/@表:行高"> 4667 <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> 4668 </xsl:when> 4669 <xsl:otherwise> 4670 <xsl:attribute name="style:row-height"><xsl:value-of select="$default-row-height"/></xsl:attribute> 4671 </xsl:otherwise> 4672 </xsl:choose> 4673 <xsl:choose> 4674 <xsl:when test="./表:行[position() = $currentRow]/@表:行高 > 0"> 4675 <xsl:attribute name="style:use-optimal-row-height">false</xsl:attribute> 4676 </xsl:when> 4677 <xsl:otherwise> 4678 <xsl:attribute name="style:use-optimal-row-height">true</xsl:attribute> 4679 </xsl:otherwise> 4680 </xsl:choose> 4681 <xsl:attribute name="fo:break-before">page</xsl:attribute> 4682 </xsl:element> 4683 </style:style> 4684 </xsl:if> 4685 <style:style style:name="{concat('ro', $table-pos, '-',$currentRow)}" style:family="table-row"> 4686 <xsl:element name="style:table-row-properties"> 4687 <xsl:choose> 4688 <xsl:when test="./表:行[position() = $currentRow]/@表:行高"> 4689 <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> 4690 </xsl:when> 4691 <xsl:otherwise> 4692 <xsl:attribute name="style:row-height"><xsl:value-of select="$default-row-height"/></xsl:attribute> 4693 </xsl:otherwise> 4694 </xsl:choose> 4695 <xsl:attribute name="style:use-optimal-row-height">true</xsl:attribute> 4696 <xsl:choose> 4697 <xsl:when test="./表:行[position() = $currentRow]/@表:行高 > 0"> 4698 <xsl:attribute name="style:use-optimal-row-height">false</xsl:attribute> 4699 </xsl:when> 4700 <xsl:otherwise> 4701 <xsl:attribute name="style:use-optimal-row-height">true</xsl:attribute> 4702 </xsl:otherwise> 4703 </xsl:choose> 4704 <xsl:attribute name="fo:break-before">auto</xsl:attribute> 4705 </xsl:element> 4706 </style:style> 4707 <xsl:if test="$currentRow < $row-count"> 4708 <xsl:call-template name="get-row-style-name"> 4709 <xsl:with-param name="lastrowpos"> 4710 <xsl:choose> 4711 <xsl:when test="./表:行[position() = $currentRow]/@表:行号"> 4712 <xsl:choose> 4713 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4714 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号 + ./表:行[position() = $currentRow]/@表:跨度"/> 4715 </xsl:when> 4716 <xsl:otherwise> 4717 <xsl:value-of select="./表:行[position() = $currentRow]/@表:行号"/> 4718 </xsl:otherwise> 4719 </xsl:choose> 4720 </xsl:when> 4721 <xsl:otherwise> 4722 <xsl:choose> 4723 <xsl:when test="./表:行[position() = $currentRow]/@表:跨度"> 4724 <xsl:value-of select="$lastrowpos + ./表:行[position() = $currentRow]/@表:跨度 + 1"/> 4725 </xsl:when> 4726 <xsl:otherwise> 4727 <xsl:value-of select="$lastrowpos + 1"/> 4728 </xsl:otherwise> 4729 </xsl:choose> 4730 </xsl:otherwise> 4731 </xsl:choose> 4732 </xsl:with-param> 4733 <xsl:with-param name="row-count" select="$row-count"/> 4734 <xsl:with-param name="currentRow" select="$currentRow + 1"/> 4735 <xsl:with-param name="table-pos" select="$table-pos"/> 4736 <xsl:with-param name="default-row-height" select="$default-row-height"/> 4737 </xsl:call-template> 4738 </xsl:if> 4739 </xsl:if> 4740 </xsl:template> 4741 <xsl:template name="encode-as-nc-name"> 4742 <xsl:param name="string"/> 4743 <xsl:value-of select="translate($string, '. %()/\+', '')"/> 4744 </xsl:template> 4745 <xsl:key match="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/表:单元格" name="cells" use="@表:式样引用"/> 4746 <xsl:template match="表:数字格式"> 4747 <xsl:variable name="unit-count" select="string-length(@表:格式码) - string-length(translate(@表:格式码,';','')) + 1"/> 4748 <xsl:variable name="style-id" select="../@表:标识符"/> 4749 <xsl:variable name="number-format-name"> 4750 <xsl:choose> 4751 <xsl:when test="@表:分类名称='fraction' or @表:分类名称='scientific'">number</xsl:when> 4752 <xsl:otherwise> 4753 <xsl:value-of select="@表:分类名称"/> 4754 </xsl:otherwise> 4755 </xsl:choose> 4756 </xsl:variable> 4757 <xsl:call-template name="process-number-format"> 4758 <xsl:with-param name="number-format-name" select="$number-format-name"/> 4759 <xsl:with-param name="number-format-unit" select="@表:格式码"/> 4760 <xsl:with-param name="style-id" select="concat($style-id,'F')"/> 4761 <xsl:with-param name="format-type" select="key('cells', $style-id)/表:数据/@表:数据类型"/> 4762 <xsl:with-param name="total-unit" select="$unit-count"/> 4763 <xsl:with-param name="current-unit" select="0"/> 4764 </xsl:call-template> 4765 </xsl:template> 4766 <xsl:template name="process-number-format"> 4767 <xsl:param name="number-format-name"/> 4768 <xsl:param name="number-format-unit"/> 4769 <xsl:param name="style-id"/> 4770 <xsl:param name="format-type"/> 4771 <xsl:param name="total-unit"/> 4772 <xsl:param name="current-unit"/> 4773 <xsl:choose> 4774 <xsl:when test="$current-unit < ($total-unit -1)"> 4775 <xsl:variable name="style-name"> 4776 <xsl:choose> 4777 <xsl:when test="contains(substring-before($number-format-unit,';'),'[$')">currency</xsl:when> 4778 <xsl:when test="contains(substring-before($number-format-unit,';'),'%')">percentage</xsl:when> 4779 <xsl:otherwise>number</xsl:otherwise> 4780 </xsl:choose> 4781 </xsl:variable> 4782 <xsl:element name="{concat('number:',$style-name,'-style')}"> 4783 <xsl:attribute name="style:name"><xsl:value-of select="concat( $style-id, 'P',$current-unit)"/></xsl:attribute> 4784 <xsl:attribute name="style:volatile">true</xsl:attribute> 4785 <xsl:call-template name="general-number"> 4786 <xsl:with-param name="number-format-unit" select="substring-before($number-format-unit,';')"/> 4787 </xsl:call-template> 4788 </xsl:element> 4789 <xsl:call-template name="process-number-format"> 4790 <xsl:with-param name="number-format-name" select="$number-format-name"/> 4791 <xsl:with-param name="number-format-unit" select="substring-after($number-format-unit,';')"/> 4792 <xsl:with-param name="style-id" select="$style-id"/> 4793 <xsl:with-param name="format-type" select="$format-type"/> 4794 <xsl:with-param name="total-unit" select="$total-unit"/> 4795 <xsl:with-param name="current-unit" select="$current-unit +1"/> 4796 </xsl:call-template> 4797 </xsl:when> 4798 <xsl:otherwise> 4799 <xsl:element name="{concat('number:',$number-format-name,'-style')}"> 4800 <xsl:attribute name="style:name"><xsl:value-of select="$style-id"/></xsl:attribute> 4801 <xsl:call-template name="element-attribute"> 4802 <xsl:with-param name="number-format-unit" select="string($number-format-unit)"/> 4803 </xsl:call-template> 4804 <xsl:call-template name="general-number"> 4805 <xsl:with-param name="number-format-unit" select="string($number-format-unit)"/> 4806 </xsl:call-template> 4807 <xsl:call-template name="style-map"> 4808 <xsl:with-param name="number-format-name" select="@表:分类名称"/> 4809 <xsl:with-param name="number-format-unit" select="@表:格式码"/> 4810 <xsl:with-param name="style-id" select="$style-id"/> 4811 <xsl:with-param name="format-type" select="$format-type"/> 4812 <xsl:with-param name="total-unit" select="$total-unit"/> 4813 <xsl:with-param name="current-unit" select="0"/> 4814 </xsl:call-template> 4815 </xsl:element> 4816 </xsl:otherwise> 4817 </xsl:choose> 4818 </xsl:template> 4819 <xsl:template name="style-map"> 4820 <xsl:param name="number-format-name"/> 4821 <xsl:param name="number-format-unit"/> 4822 <xsl:param name="style-id"/> 4823 <xsl:param name="format-type"/> 4824 <xsl:param name="total-unit"/> 4825 <xsl:param name="current-unit"/> 4826 <xsl:if test="$current-unit < ($total-unit -1)"> 4827 <xsl:variable name="stylecondition" select="substring-after(substring-before($number-format-unit,']'),'[')"/> 4828 <style:map style:condition="{$stylecondition}" style:apply-style-name="{concat( $style-id, 'P',$current-unit)}"/> 4829 <xsl:call-template name="style-map"> 4830 <xsl:with-param name="number-format-name" select="$number-format-name"/> 4831 <xsl:with-param name="number-format-unit" select="substring-after($number-format-unit,';')"/> 4832 <xsl:with-param name="style-id" select="$style-id"/> 4833 <xsl:with-param name="format-type" select="$format-type"/> 4834 <xsl:with-param name="total-unit" select="$total-unit"/> 4835 <xsl:with-param name="current-unit" select="$current-unit +1"/> 4836 </xsl:call-template> 4837 </xsl:if> 4838 </xsl:template> 4839 <xsl:template name="general-number"> 4840 <xsl:param name="number-format-unit"/> 4841 <xsl:call-template name="number-format-color"> 4842 <xsl:with-param name="number-format-unit" select="$number-format-unit"/> 4843 </xsl:call-template> 4844 <xsl:call-template name="number-format-currency"> 4845 <xsl:with-param name="number-format-unit" select="$number-format-unit"/> 4846 </xsl:call-template> 4847 <xsl:choose> 4848 <xsl:when test="starts-with($number-format-unit,'"')"> 4849 <number:text> 4850 <xsl:value-of select="substring-before(substring-after($number-format-unit,'"'),'"')"/> 4851 </number:text> 4852 </xsl:when> 4853 <xsl:when test="starts-with($number-format-unit,'@')"> 4854 <number:text-content/> 4855 </xsl:when> 4856 <xsl:when test="starts-with($number-format-unit,'-') or starts-with($number-format-unit,'$') or starts-with($number-format-unit,'¥')"> 4857 <number:text> 4858 <xsl:value-of select="substring($number-format-unit,1,1)"/> 4859 </number:text> 4860 </xsl:when> 4861 <xsl:when test="starts-with($number-format-unit,'YYYY')"> 4862 <number:year number:style="long"/> 4863 </xsl:when> 4864 <xsl:when test="starts-with($number-format-unit,'YY')"> 4865 <number:year number:style="rolong"/> 4866 </xsl:when> 4867 <xsl:when test="starts-with($number-format-unit,'MMMM')"> 4868 <number:month number:style="long" number:textual="true"/> 4869 </xsl:when> 4870 <xsl:when test="starts-with($number-format-unit,'MMM')"> 4871 <number:month number:style="rolong" number:textual="true"/> 4872 </xsl:when> 4873 <xsl:when test="starts-with($number-format-unit,'DD')"> 4874 <number:day number:style="long"/> 4875 </xsl:when> 4876 <xsl:when test="starts-with($number-format-unit,'D')"> 4877 <number:day number:style="rolong"/> 4878 </xsl:when> 4879 <xsl:when test="starts-with($number-format-unit,'[HH]')"> 4880 <number:hours number:style="long"/> 4881 </xsl:when> 4882 <xsl:when test="starts-with($number-format-unit,'HH')"> 4883 <number:hours number:style="long"/> 4884 </xsl:when> 4885 <xsl:when test="starts-with($number-format-unit,'H')"> 4886 <number:hours/> 4887 </xsl:when> 4888 <xsl:when test="starts-with($number-format-unit,'SS.00')"> 4889 <number:seconds number:style="long" number:decimal-places="2"/> 4890 </xsl:when> 4891 <xsl:when test="starts-with($number-format-unit,'SS')"> 4892 <number:seconds number:style="long"/> 4893 </xsl:when> 4894 <xsl:when test="starts-with($number-format-unit,'S')"> 4895 <number:seconds/> 4896 </xsl:when> 4897 <xsl:when test="starts-with($number-format-unit,'AM/PM')"> 4898 <number:am-pm/> 4899 </xsl:when> 4900 <xsl:when test="starts-with($number-format-unit,'NNNN')"> 4901 <number:day-of-week number:style="long"/> 4902 </xsl:when> 4903 <xsl:when test="starts-with($number-format-unit,'NNN')"> 4904 <number:day-of-week/> 4905 </xsl:when> 4906 <xsl:when test="starts-with($number-format-unit,'QQ')"> 4907 <number:quarter number:style="long"/> 4908 </xsl:when> 4909 <xsl:when test="starts-with($number-format-unit,'Q')"> 4910 <number:quarter/> 4911 </xsl:when> 4912 <xsl:when test="starts-with($number-format-unit,'WW')"> 4913 <number:week-of-year/> 4914 </xsl:when> 4915 <xsl:when test="starts-with($number-format-unit,'MM')"> 4916 <xsl:choose> 4917 <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'))"> 4918 <number:minutes number:style="long"/> 4919 </xsl:when> 4920 <xsl:otherwise> 4921 <number:month number:style="long"/> 4922 </xsl:otherwise> 4923 </xsl:choose> 4924 </xsl:when> 4925 <xsl:when test="starts-with($number-format-unit,'M')"> 4926 <xsl:choose> 4927 <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'))"> 4928 <number:minutes/> 4929 </xsl:when> 4930 <xsl:otherwise> 4931 <number:month/> 4932 </xsl:otherwise> 4933 </xsl:choose> 4934 </xsl:when> 4935 <xsl:when test="starts-with($number-format-unit,'#') or starts-with($number-format-unit,'0')"> 4936 <xsl:variable name="digits-part"> 4937 <xsl:choose> 4938 <xsl:when test="contains($number-format-unit,'"')"> 4939 <xsl:value-of select="substring-before($number-format-unit,'"')"/> 4940 </xsl:when> 4941 <xsl:otherwise> 4942 <xsl:value-of select="$number-format-unit"/> 4943 </xsl:otherwise> 4944 </xsl:choose> 4945 </xsl:variable> 4946 <xsl:call-template name="decimal-integer-exponent-fraction"> 4947 <xsl:with-param name="digits-part" select="$digits-part"/> 4948 </xsl:call-template> 4949 </xsl:when> 4950 </xsl:choose> 4951 <xsl:variable name="unit-length"> 4952 <xsl:choose> 4953 <xsl:when test="starts-with($number-format-unit,'[value()')"> 4954 <xsl:value-of select="string-length(substring-before($number-format-unit,']')) +2"/> 4955 </xsl:when> 4956 <xsl:when test="starts-with($number-format-unit,'[NatNum')"> 4957 <xsl:value-of select="string-length(substring-before($number-format-unit,']')) +2"/> 4958 </xsl:when> 4959 <xsl:when test="starts-with($number-format-unit,'[$-804]')">8</xsl:when> 4960 <xsl:when test="starts-with($number-format-unit,'"')"> 4961 <xsl:value-of select="string-length(substring-before(substring-after($number-format-unit,'"'),'"')) +3"/> 4962 </xsl:when> 4963 <xsl:when test="starts-with($number-format-unit,'@')">2</xsl:when> 4964 <xsl:when test="starts-with($number-format-unit,'-') or starts-with($number-format-unit,'$') or starts-with($number-format-unit,'¥')">2</xsl:when> 4965 <xsl:when test="starts-with($number-format-unit,'YYYY')">5</xsl:when> 4966 <xsl:when test="starts-with($number-format-unit,'YY')">3</xsl:when> 4967 <xsl:when test="starts-with($number-format-unit,'MMMM')">5</xsl:when> 4968 <xsl:when test="starts-with($number-format-unit,'MMM')">4</xsl:when> 4969 <xsl:when test="starts-with($number-format-unit,'MM')">3</xsl:when> 4970 <xsl:when test="starts-with($number-format-unit,'M')">2</xsl:when> 4971 <xsl:when test="starts-with($number-format-unit,'DD')">3</xsl:when> 4972 <xsl:when test="starts-with($number-format-unit,'D')">2</xsl:when> 4973 <xsl:when test="starts-with($number-format-unit,'[HH]')">5</xsl:when> 4974 <xsl:when test="starts-with($number-format-unit,'HH')">3</xsl:when> 4975 <xsl:when test="starts-with($number-format-unit,'H')">2</xsl:when> 4976 <xsl:when test="starts-with($number-format-unit,'SS.00')">6</xsl:when> 4977 <xsl:when test="starts-with($number-format-unit,'SS')">3</xsl:when> 4978 <xsl:when test="starts-with($number-format-unit,'S')">2</xsl:when> 4979 <xsl:when test="starts-with($number-format-unit,'AM/PM')">6</xsl:when> 4980 <xsl:when test="starts-with($number-format-unit,'NNNN')">5</xsl:when> 4981 <xsl:when test="starts-with($number-format-unit,'NNN')">4</xsl:when> 4982 <xsl:when test="starts-with($number-format-unit,'QQ')">3</xsl:when> 4983 <xsl:when test="starts-with($number-format-unit,'Q')">2</xsl:when> 4984 <xsl:when test="starts-with($number-format-unit,'WW')">3</xsl:when> 4985 <xsl:when test="starts-with($number-format-unit,'#') or starts-with($number-format-unit,'0')"> 4986 <xsl:choose> 4987 <xsl:when test="contains($number-format-unit,'"')"> 4988 <xsl:value-of select="string-length(substring-before($number-format-unit,'"')) +1"/> 4989 </xsl:when> 4990 <xsl:otherwise> 4991 <xsl:value-of select="string-length($number-format-unit) +1"/> 4992 </xsl:otherwise> 4993 </xsl:choose> 4994 </xsl:when> 4995 <xsl:otherwise>1</xsl:otherwise> 4996 </xsl:choose> 4997 </xsl:variable> 4998 <xsl:if test="$unit-length >1 and $unit-length <=string-length($number-format-unit)"> 4999 <xsl:call-template name="general-number"> 5000 <xsl:with-param name="number-format-unit" select="substring($number-format-unit,$unit-length)"/> 5001 </xsl:call-template> 5002 </xsl:if> 5003 </xsl:template> 5004 <xsl:template name="decimal-integer-exponent-fraction"> 5005 <xsl:param name="digits-part"/> 5006 <xsl:variable name="decimal-digits"> 5007 <xsl:choose> 5008 <xsl:when test="contains($digits-part,'.')"> 5009 <xsl:choose> 5010 <xsl:when test="contains($digits-part,' ')"> 5011 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),' '))"/> 5012 </xsl:when> 5013 <xsl:when test="contains(substring-after($digits-part,'.'),',')"> 5014 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),','))"/> 5015 </xsl:when> 5016 <xsl:when test="contains($digits-part,'E')"> 5017 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),'E'))"/> 5018 </xsl:when> 5019 <xsl:when test="contains($digits-part,'e')"> 5020 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,'.'),'e'))"/> 5021 </xsl:when> 5022 <xsl:otherwise> 5023 <xsl:value-of select="string-length(substring-after($digits-part,'.'))"/> 5024 </xsl:otherwise> 5025 </xsl:choose> 5026 </xsl:when> 5027 <xsl:otherwise>0</xsl:otherwise> 5028 </xsl:choose> 5029 </xsl:variable> 5030 <xsl:variable name="decimal-replacement"> 5031 <xsl:choose> 5032 <xsl:when test="contains($digits-part,'.')"> 5033 <xsl:choose> 5034 <xsl:when test="contains($digits-part,' ') and contains(substring-before(substring-after($digits-part,'.'),' '),'#')">true</xsl:when> 5035 <xsl:when test="contains($digits-part,'E') and contains(substring-before(substring-after($digits-part,'.'),'E'),'#')">true</xsl:when> 5036 <xsl:when test="contains($digits-part,'e') and contains(substring-before(substring-after($digits-part,'.'),'e'),'#')">true</xsl:when> 5037 <xsl:otherwise> 5038 <xsl:choose> 5039 <xsl:when test="contains(substring-after($digits-part,'.'),'#')">true</xsl:when> 5040 <xsl:otherwise>false</xsl:otherwise> 5041 </xsl:choose> 5042 </xsl:otherwise> 5043 </xsl:choose> 5044 </xsl:when> 5045 <xsl:otherwise>false</xsl:otherwise> 5046 </xsl:choose> 5047 </xsl:variable> 5048 <xsl:variable name="integer-digits"> 5049 <xsl:choose> 5050 <xsl:when test="contains($digits-part,'.')"> 5051 <xsl:value-of select="string-length(substring-before($digits-part,'.')) - string-length(translate(substring-before($digits-part,'.'),'0',''))"/> 5052 </xsl:when> 5053 <xsl:otherwise> 5054 <xsl:value-of select="string-length($digits-part) - string-length(translate($digits-part,'0',''))"/> 5055 </xsl:otherwise> 5056 </xsl:choose> 5057 </xsl:variable> 5058 <xsl:variable name="factor-digits"> 5059 <xsl:call-template name="display-factor-digits"> 5060 <xsl:with-param name="digits-part" select="$digits-part"/> 5061 <xsl:with-param name="count" select="0"/> 5062 </xsl:call-template> 5063 </xsl:variable> 5064 <xsl:variable name="grouping"> 5065 <xsl:choose> 5066 <xsl:when test="(string-length($digits-part) - string-length(translate($digits-part,',',''))) >$factor-digits">true</xsl:when> 5067 <xsl:otherwise>false</xsl:otherwise> 5068 </xsl:choose> 5069 </xsl:variable> 5070 <xsl:variable name="exponent-digits"> 5071 <xsl:choose> 5072 <xsl:when test="contains($digits-part,'E')"> 5073 <xsl:value-of select="string-length(substring-after($digits-part,'E')) -1"/> 5074 </xsl:when> 5075 <xsl:when test="contains($digits-part,'e')"> 5076 <xsl:value-of select="string-length(substring-after($digits-part,'e')) -1"/> 5077 </xsl:when> 5078 <xsl:otherwise>0</xsl:otherwise> 5079 </xsl:choose> 5080 </xsl:variable> 5081 <xsl:variable name="numerator-digits"> 5082 <xsl:choose> 5083 <xsl:when test="contains($digits-part,' ')"> 5084 <xsl:value-of select="string-length(substring-before(substring-after($digits-part,' '),'/'))"/> 5085 </xsl:when> 5086 <xsl:otherwise>0</xsl:otherwise> 5087 </xsl:choose> 5088 </xsl:variable> 5089 <xsl:variable name="denominator-digits"> 5090 <xsl:choose> 5091 <xsl:when test="contains($digits-part,' ')"> 5092 <xsl:value-of select="string-length(substring-after(substring-after($digits-part,' '),'/'))"/> 5093 </xsl:when> 5094 <xsl:otherwise>0</xsl:otherwise> 5095 </xsl:choose> 5096 </xsl:variable> 5097 <xsl:variable name="number-type"> 5098 <xsl:choose> 5099 <xsl:when test="$exponent-digits >0">number:scientific-number</xsl:when> 5100 <xsl:when test="($numerator-digits >0) or ($denominator-digits >0)">number:fraction</xsl:when> 5101 <xsl:otherwise>number:number</xsl:otherwise> 5102 </xsl:choose> 5103 </xsl:variable> 5104 <xsl:element name="{$number-type}"> 5105 <xsl:if test="$decimal-digits >=0"> 5106 <xsl:attribute name="number:decimal-places"><xsl:value-of select="$decimal-digits"/></xsl:attribute> 5107 </xsl:if> 5108 <xsl:if test="$decimal-replacement='true'"> 5109 <xsl:attribute name="number:decimal-replacement"/> 5110 </xsl:if> 5111 <xsl:if test="$integer-digits >=0"> 5112 <xsl:attribute name="number:min-integer-digits"><xsl:value-of select="$integer-digits"/></xsl:attribute> 5113 </xsl:if> 5114 <xsl:if test="$grouping='true'"> 5115 <xsl:attribute name="number:grouping"><xsl:value-of select="$grouping"/></xsl:attribute> 5116 </xsl:if> 5117 <xsl:if test="$factor-digits >0"> 5118 <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> 5119 </xsl:if> 5120 <xsl:if test="$exponent-digits >0"> 5121 <xsl:attribute name="number:min-exponent-digits"><xsl:value-of select="$exponent-digits"/></xsl:attribute> 5122 </xsl:if> 5123 <xsl:if test="$numerator-digits >0"> 5124 <xsl:attribute name="number:min-numerator-digits"><xsl:value-of select="$numerator-digits"/></xsl:attribute> 5125 </xsl:if> 5126 <xsl:if test="$denominator-digits >0"> 5127 <xsl:attribute name="number:min-denominator-digits"><xsl:value-of select="$denominator-digits"/></xsl:attribute> 5128 </xsl:if> 5129 </xsl:element> 5130 </xsl:template> 5131 <xsl:template name="number-format-color"> 5132 <xsl:param name="number-format-unit"/> 5133 <xsl:choose> 5134 <xsl:when test="starts-with($number-format-unit,'[Black]')"> 5135 <style:text-properties fo:color="#000000"/> 5136 </xsl:when> 5137 <xsl:when test="starts-with($number-format-unit,'[Blue]')"> 5138 <style:text-properties fo:color="#0000ff"/> 5139 </xsl:when> 5140 <xsl:when test="starts-with($number-format-unit,'[Cyan]')"> 5141 <style:text-properties fo:color="#00ffff"/> 5142 </xsl:when> 5143 <xsl:when test="starts-with($number-format-unit,'[Green]')"> 5144 <style:text-properties fo:color="#00ff00"/> 5145 </xsl:when> 5146 <xsl:when test="starts-with($number-format-unit,'[Magenta]')"> 5147 <style:text-properties fo:color="#ff00ff"/> 5148 </xsl:when> 5149 <xsl:when test="starts-with($number-format-unit,'[Red]')"> 5150 <style:text-properties fo:color="#ff0000"/> 5151 </xsl:when> 5152 <xsl:when test="starts-with($number-format-unit,'[White]')"> 5153 <style:text-properties fo:color="#ffffff"/> 5154 </xsl:when> 5155 <xsl:when test="starts-with($number-format-unit,'[Yellow]')"> 5156 <style:text-properties fo:color="#ffff00"/> 5157 </xsl:when> 5158 </xsl:choose> 5159 <xsl:variable name="unit-length"> 5160 <xsl:choose> 5161 <xsl:when test="starts-with($number-format-unit,'[Black]')">8</xsl:when> 5162 <xsl:when test="starts-with($number-format-unit,'[Blue]')">7</xsl:when> 5163 <xsl:when test="starts-with($number-format-unit,'[Cyan]')">7</xsl:when> 5164 <xsl:when test="starts-with($number-format-unit,'[Green]')">8</xsl:when> 5165 <xsl:when test="starts-with($number-format-unit,'[Magenta]')">10</xsl:when> 5166 <xsl:when test="starts-with($number-format-unit,'[Red]')">6</xsl:when> 5167 <xsl:when test="starts-with($number-format-unit,'[White]')">8</xsl:when> 5168 <xsl:when test="starts-with($number-format-unit,'[Yellow]')">9</xsl:when> 5169 <xsl:otherwise>1</xsl:otherwise> 5170 </xsl:choose> 5171 </xsl:variable> 5172 <xsl:if test="$unit-length >1 and $unit-length <=string-length($number-format-unit)"> 5173 <xsl:call-template name="general-number"> 5174 <xsl:with-param name="number-format-unit" select="substring($number-format-unit,$unit-length)"/> 5175 </xsl:call-template> 5176 </xsl:if> 5177 </xsl:template> 5178 <xsl:template name="number-format-currency"> 5179 <xsl:param name="number-format-unit"/> 5180 <xsl:choose> 5181 <xsl:when test="starts-with($number-format-unit,'[$¥-804]')"> 5182 <number:currency-symbol number:language="zh" number:country="CN">¥</number:currency-symbol> 5183 </xsl:when> 5184 <xsl:when test="starts-with($number-format-unit,'[$$-409]')"> 5185 <number:currency-symbol number:language="en" number:country="US">$</number:currency-symbol> 5186 </xsl:when> 5187 <xsl:when test="starts-with($number-format-unit,'[$$-2C0A]')"> 5188 <number:currency-symbol number:language="es" number:country="AR">$</number:currency-symbol> 5189 </xsl:when> 5190 <xsl:when test="starts-with($number-format-unit,'[$$-C0C]')"> 5191 <number:currency-symbol number:language="fr" number:country="CA">$</number:currency-symbol> 5192 </xsl:when> 5193 <xsl:when test="starts-with($number-format-unit,'[$CNY]')"> 5194 <number:currency-symbol>CNY</number:currency-symbol> 5195 </xsl:when> 5196 <xsl:when test="starts-with($number-format-unit,'[$AFA]')"> 5197 <number:currency-symbol>AFA</number:currency-symbol> 5198 </xsl:when> 5199 <xsl:when test="starts-with($number-format-unit,'CNY')"> 5200 <number:currency-symbol>CNY</number:currency-symbol> 5201 </xsl:when> 5202 <xsl:when test="starts-with($number-format-unit,'CCC')"> 5203 <number:currency-symbol>CCC</number:currency-symbol> 5204 </xsl:when> 5205 </xsl:choose> 5206 <xsl:variable name="unit-length"> 5207 <xsl:choose> 5208 <xsl:when test="starts-with($number-format-unit,'[$¥-804]')">9</xsl:when> 5209 <xsl:when test="starts-with($number-format-unit,'[$$-409]')">9</xsl:when> 5210 <xsl:when test="starts-with($number-format-unit,'[$$-2C0A]')">10</xsl:when> 5211 <xsl:when test="starts-with($number-format-unit,'[$$-C0C]')">9</xsl:when> 5212 <xsl:when test="starts-with($number-format-unit,'[$CNY]')">7</xsl:when> 5213 <xsl:when test="starts-with($number-format-unit,'[$AFA]')">7</xsl:when> 5214 <xsl:when test="starts-with($number-format-unit,'CNY')">4</xsl:when> 5215 <xsl:when test="starts-with($number-format-unit,'CCC')">4</xsl:when> 5216 <xsl:otherwise>1</xsl:otherwise> 5217 </xsl:choose> 5218 </xsl:variable> 5219 <xsl:if test="$unit-length >1 and $unit-length <=string-length($number-format-unit)"> 5220 <xsl:call-template name="general-number"> 5221 <xsl:with-param name="number-format-unit" select="substring($number-format-unit,$unit-length)"/> 5222 </xsl:call-template> 5223 </xsl:if> 5224 </xsl:template> 5225 <xsl:template name="display-factor-digits"> 5226 <xsl:param name="digits-part"/> 5227 <xsl:param name="count"/> 5228 <xsl:choose> 5229 <xsl:when test="not(substring($digits-part,string-length($digits-part),1) =',')"> 5230 <xsl:value-of select="$count"/> 5231 </xsl:when> 5232 <xsl:otherwise> 5233 <xsl:call-template name="display-factor-digits"> 5234 <xsl:with-param name="digits-part" select="substring($digits-part,1,string-length($digits-part) -1)"/> 5235 <xsl:with-param name="count" select="$count +1"/> 5236 </xsl:call-template> 5237 </xsl:otherwise> 5238 </xsl:choose> 5239 </xsl:template> 5240 <xsl:template name="element-attribute"> 5241 <xsl:param name="number-format-unit"/> 5242 <xsl:if test="contains($number-format-unit,'[HH]')"> 5243 <xsl:attribute name="number:truncate-on-overflow">false</xsl:attribute> 5244 </xsl:if> 5245 <xsl:if test="starts-with($number-format-unit,'[NatNum1]')"> 5246 <xsl:attribute name="number:transliteration-format">一</xsl:attribute> 5247 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5248 </xsl:if> 5249 <xsl:if test="starts-with($number-format-unit,'[NatNum2]')"> 5250 <xsl:attribute name="number:transliteration-format">壹</xsl:attribute> 5251 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5252 </xsl:if> 5253 <xsl:if test="starts-with($number-format-unit,'[NatNum3]')"> 5254 <xsl:attribute name="number:transliteration-format">1</xsl:attribute> 5255 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5256 </xsl:if> 5257 <xsl:if test="starts-with($number-format-unit,'[NatNum4]')"> 5258 <xsl:attribute name="number:transliteration-format">一</xsl:attribute> 5259 <xsl:attribute name="number:transliteration-style">long</xsl:attribute> 5260 </xsl:if> 5261 <xsl:if test="starts-with($number-format-unit,'[NatNum5]')"> 5262 <xsl:attribute name="number:transliteration-format">壹</xsl:attribute> 5263 <xsl:attribute name="number:transliteration-style">long</xsl:attribute> 5264 </xsl:if> 5265 <xsl:if test="starts-with($number-format-unit,'[NatNum6]')"> 5266 <xsl:attribute name="number:transliteration-format">1</xsl:attribute> 5267 <xsl:attribute name="number:transliteration-style">long</xsl:attribute> 5268 </xsl:if> 5269 <xsl:if test="starts-with($number-format-unit,'[NatNum7]')"> 5270 <xsl:attribute name="number:transliteration-format">一</xsl:attribute> 5271 <xsl:attribute name="number:transliteration-style">medium</xsl:attribute> 5272 </xsl:if> 5273 <xsl:if test="starts-with($number-format-unit,'[NatNum8]')"> 5274 <xsl:attribute name="number:transliteration-format">壹</xsl:attribute> 5275 <xsl:attribute name="number:transliteration-style">medium</xsl:attribute> 5276 </xsl:if> 5277 <xsl:if test="starts-with($number-format-unit,'[NatNum0]')"> 5278 <xsl:attribute name="number:transliteration-format">1</xsl:attribute> 5279 <xsl:attribute name="number:transliteration-style">short</xsl:attribute> 5280 </xsl:if> 5281 <xsl:if test="contains($number-format-unit,'[$-804]')"> 5282 <xsl:attribute name="number:transliteration-language">zh</xsl:attribute> 5283 <xsl:attribute name="number:transliteration-country">CN</xsl:attribute> 5284 </xsl:if> 5285 </xsl:template> 5286 <xsl:key name="pz" match="/uof:UOF/uof:对象集/图:图形" use="@图:标识符"/> 5287 <xsl:template match="表:批注" mode="body"> 5288 <xsl:element name="office:annotation"> 5289 <xsl:if test="@表:是否显示 = 'true'"> 5290 <xsl:attribute name="office:display">true</xsl:attribute> 5291 </xsl:if> 5292 <xsl:attribute name="draw:style-name"><xsl:value-of select="uof:锚点/@uof:图形引用"/></xsl:attribute> 5293 <xsl:attribute name="svg:height"><xsl:value-of select="concat(uof:锚点/@uof:高度,$uofUnit)"/></xsl:attribute> 5294 <xsl:attribute name="svg:x"><xsl:value-of select="concat(uof:锚点/@uof:x坐标,$uofUnit)"/></xsl:attribute> 5295 <xsl:attribute name="svg:y"><xsl:value-of select="concat(uof:锚点/@uof:y坐标,$uofUnit)"/></xsl:attribute> 5296 <xsl:attribute name="svg:width"><xsl:value-of select="concat(uof:锚点/@uof:宽度,$uofUnit)"/></xsl:attribute> 5297 <xsl:variable name="w"> 5298 <xsl:value-of select="./uof:锚点/@uof:图形引用"/> 5299 </xsl:variable> 5300 <xsl:choose> 5301 <xsl:when test="key('pz',$w)/图:文本内容/字:句/字:文本串"> 5302 <text:p> 5303 <xsl:for-each select="key('pz',$w)/图:文本内容/字:句"> 5304 <text:span> 5305 <xsl:if test="字:句属性/@字:式样引用"> 5306 <xsl:attribute name="text:style-name"><xsl:value-of select="字:句属性/@字:式样引用"/></xsl:attribute> 5307 </xsl:if> 5308 <xsl:value-of select="字:文本串"/> 5309 </text:span> 5310 </xsl:for-each> 5311 </text:p> 5312 </xsl:when> 5313 </xsl:choose> 5314 <!--xsl:if test="图:文本内容/字:段落/字:句/字:文本串"> 5315 <text:p> 5316 <xsl:call-template name="create-comment-data-content"> 5317 <xsl:with-param name="style-id" select="../@表:式样引用"/> 5318 </xsl:call-template> 5319 </text:p> 5320 </xsl:if--> 5321 </xsl:element> 5322 </xsl:template> 5323 <xsl:template name="auto-filter-condition"> 5324 <xsl:param name="conditon-set"/> 5325 <xsl:param name="zone-left-column-num"/> 5326 <xsl:if test="$conditon-set"> 5327 <xsl:variable name="first-condition" select="$conditon-set[1]"/> 5328 <xsl:element name="table:filter-condition"> 5329 <xsl:attribute name="table:field-number"><xsl:value-of select="$first-condition/@表:列号 - $zone-left-column-num"/></xsl:attribute> 5330 <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> 5331 <xsl:variable name="operator"> 5332 <xsl:choose> 5333 <xsl:when test="$first-condition/表:普通"> 5334 <xsl:variable name="general" select="$first-condition/表:普通/@表:类型"/> 5335 <xsl:choose> 5336 <xsl:when test="$general ='topitem'">top values</xsl:when> 5337 </xsl:choose> 5338 </xsl:when> 5339 <xsl:when test="$first-condition/表:自定义"> 5340 <xsl:variable name="operator-text" select="$first-condition/表:自定义/表:操作条件/表:操作码/text()"/> 5341 <xsl:choose> 5342 <xsl:when test="$operator-text ='less than'"><</xsl:when> 5343 <xsl:when test="$operator-text ='greater than'">></xsl:when> 5344 <xsl:when test="$operator-text ='equal to'"> 5345 <xsl:value-of select="'='"/> 5346 </xsl:when> 5347 <xsl:when test="$operator-text ='greater than or equal to'"> 5348 <xsl:value-of select="'>='"/> 5349 </xsl:when> 5350 <xsl:when test="$operator-text ='less than or equal to'"> 5351 <xsl:value-of select="'<='"/> 5352 </xsl:when> 5353 <xsl:when test="$operator-text ='not equal to'"> 5354 <xsl:value-of select="'!='"/> 5355 </xsl:when> 5356 </xsl:choose> 5357 </xsl:when> 5358 </xsl:choose> 5359 </xsl:variable> 5360 <xsl:attribute name="table:operator"><xsl:value-of select="$operator"/></xsl:attribute> 5361 </xsl:element> 5362 <xsl:call-template name="auto-filter-condition"> 5363 <xsl:with-param name="conditon-set" select="$conditon-set[position()!=1]"/> 5364 <xsl:with-param name="zone-left-column-num" select="$zone-left-column-num"/> 5365 </xsl:call-template> 5366 </xsl:if> 5367 </xsl:template> 5368 <xsl:template name="translate-column-char-to-number"> 5369 <xsl:param name="string"/> 5370 <xsl:choose> 5371 <xsl:when test="string-length($string)=1"> 5372 <xsl:call-template name="char-to-number"> 5373 <xsl:with-param name="char" select="$string"/> 5374 </xsl:call-template> 5375 </xsl:when> 5376 <xsl:otherwise> 5377 <xsl:variable name="tens-place"> 5378 <xsl:call-template name="char-to-number"> 5379 <xsl:with-param name="char" select="substring($string,1,1)"/> 5380 </xsl:call-template> 5381 </xsl:variable> 5382 <xsl:variable name="units-place"> 5383 <xsl:call-template name="char-to-number"> 5384 <xsl:with-param name="char" select="substring($string,2,1)"/> 5385 </xsl:call-template> 5386 </xsl:variable> 5387 <xsl:value-of select="$tens-place * 26 + $units-place"/> 5388 </xsl:otherwise> 5389 </xsl:choose> 5390 </xsl:template> 5391 <xsl:template name="char-to-number"> 5392 <xsl:param name="char"/> 5393 <xsl:choose> 5394 <xsl:when test="$char='A'">1</xsl:when> 5395 <xsl:when test="$char='B'">2</xsl:when> 5396 <xsl:when test="$char='C'">3</xsl:when> 5397 <xsl:when test="$char='D'">4</xsl:when> 5398 <xsl:when test="$char='E'">5</xsl:when> 5399 <xsl:when test="$char='F'">6</xsl:when> 5400 <xsl:when test="$char='G'">7</xsl:when> 5401 <xsl:when test="$char='H'">8</xsl:when> 5402 <xsl:when test="$char='I'">9</xsl:when> 5403 <xsl:when test="$char='J'">10</xsl:when> 5404 <xsl:when test="$char='K'">11</xsl:when> 5405 <xsl:when test="$char='L'">12</xsl:when> 5406 <xsl:when test="$char='M'">13</xsl:when> 5407 <xsl:when test="$char='N'">14</xsl:when> 5408 <xsl:when test="$char='O'">15</xsl:when> 5409 <xsl:when test="$char='P'">16</xsl:when> 5410 <xsl:when test="$char='Q'">17</xsl:when> 5411 <xsl:when test="$char='R'">18</xsl:when> 5412 <xsl:when test="$char='S'">19</xsl:when> 5413 <xsl:when test="$char='T'">20</xsl:when> 5414 <xsl:when test="$char='U'">21</xsl:when> 5415 <xsl:when test="$char='V'">22</xsl:when> 5416 <xsl:when test="$char='W'">23</xsl:when> 5417 <xsl:when test="$char='X'">24</xsl:when> 5418 <xsl:when test="$char='Y'">25</xsl:when> 5419 <xsl:when test="$char='Z'">26</xsl:when> 5420 </xsl:choose> 5421 </xsl:template> 5422 <xsl:template name="translate-expression2"> 5423 <xsl:param name="expression2"/> 5424 <xsl:choose> 5425 <xsl:when test="contains($expression2,':')"> 5426 <xsl:variable name="column-one"> 5427 <xsl:value-of select="substring(substring-before($expression2,':'),1,1)"/> 5428 </xsl:variable> 5429 <xsl:variable name="row-one"> 5430 <xsl:value-of select="substring(substring-before($expression2,':'),2)"/> 5431 </xsl:variable> 5432 <xsl:variable name="column-two"> 5433 <xsl:value-of select="substring(substring-after($expression2,':'),1,1)"/> 5434 </xsl:variable> 5435 <xsl:variable name="row-two"> 5436 <xsl:value-of select="substring(substring-after($expression2,':'),2)"/> 5437 </xsl:variable> 5438 <xsl:variable name="column-value1"> 5439 <xsl:call-template name="character-to-column"> 5440 <xsl:with-param name="column-value" select="$column-one"/> 5441 </xsl:call-template> 5442 </xsl:variable> 5443 <xsl:variable name="column-value2"> 5444 <xsl:call-template name="character-to-column"> 5445 <xsl:with-param name="column-value" select="$column-two"/> 5446 </xsl:call-template> 5447 </xsl:variable> 5448 <xsl:value-of select="concat('R',$row-one,'C',$column-value1,':','R',$row-two,'C',$column-value2)"/> 5449 </xsl:when> 5450 <xsl:otherwise> 5451 <xsl:variable name="column-one"> 5452 <xsl:value-of select="substring($expression2,1,1)"/> 5453 </xsl:variable> 5454 <xsl:variable name="row-one"> 5455 <xsl:value-of select="substring($expression2,2)"/> 5456 </xsl:variable> 5457 <xsl:variable name="column-value1"> 5458 <xsl:call-template name="character-to-column"> 5459 <xsl:with-param name="column-value" select="$column-one"/> 5460 </xsl:call-template> 5461 </xsl:variable> 5462 <xsl:value-of select="concat('R',$row-one,'C',$column-value1)"/> 5463 </xsl:otherwise> 5464 </xsl:choose> 5465 </xsl:template> 5466 <xsl:template name="character-to-column"> 5467 <xsl:param name="column-value"/> 5468 <xsl:choose> 5469 <xsl:when test="$column-value= 'A'">1</xsl:when> 5470 <xsl:when test="$column-value= 'B'">2</xsl:when> 5471 <xsl:when test="$column-value= 'C'">3</xsl:when> 5472 <xsl:when test="$column-value= 'D'">4</xsl:when> 5473 <xsl:when test="$column-value= 'E'">5</xsl:when> 5474 <xsl:when test="$column-value= 'F'">6</xsl:when> 5475 <xsl:when test="$column-value= 'G'">7</xsl:when> 5476 <xsl:when test="$column-value= 'H'">8</xsl:when> 5477 <xsl:when test="$column-value= 'I'">9</xsl:when> 5478 <xsl:when test="$column-value= 'J'">10</xsl:when> 5479 <xsl:when test="$column-value= 'K'">11</xsl:when> 5480 <xsl:when test="$column-value= 'L'">12</xsl:when> 5481 <xsl:when test="$column-value= 'M'">13</xsl:when> 5482 <xsl:when test="$column-value= 'N'">14</xsl:when> 5483 <xsl:when test="$column-value= 'O'">15</xsl:when> 5484 <xsl:when test="$column-value= 'P'">16</xsl:when> 5485 <xsl:when test="$column-value= 'Q'">17</xsl:when> 5486 <xsl:when test="$column-value= 'R'">18</xsl:when> 5487 <xsl:when test="$column-value= 'S'">19</xsl:when> 5488 <xsl:when test="$column-value= 'T'">20</xsl:when> 5489 <xsl:when test="$column-value= 'U'">21</xsl:when> 5490 <xsl:when test="$column-value= 'V'">22</xsl:when> 5491 <xsl:when test="$column-value= 'W'">23</xsl:when> 5492 <xsl:when test="$column-value= 'X'">24</xsl:when> 5493 <xsl:when test="$column-value= 'Y'">25</xsl:when> 5494 <xsl:when test="$column-value= 'Z'">26</xsl:when> 5495 <xsl:otherwise/> 5496 </xsl:choose> 5497 </xsl:template> 5498 <!--chenjh end 20050611--> 5499 <xsl:template name="工作表属性"> 5500 <!--office:settings--> 5501 <xsl:variable name="sheetprop" select="/uof:UOF/uof:电子表格/表:主体/表:工作表"/> 5502 <config:config-item-set config:name="ooo:view-settings"> 5503 <xsl:variable name="ratio" select="15"/> 5504 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/表:单元格/表:数据/字:句/字:修订开始"> 5505 <config:config-item-set config:name="TrackedChangesViewSettings"> 5506 <config:config-item config:name="ShowChanges" config:type="boolean">true</config:config-item> 5507 <config:config-item config:name="ShowAcceptedChanges" config:type="boolean">false</config:config-item> 5508 <config:config-item config:name="ShowRejectedChanges" config:type="boolean">false</config:config-item> 5509 <config:config-item config:name="ShowChangesByDatetime" config:type="boolean">false</config:config-item> 5510 <config:config-item config:name="ShowChangesByDatetimeMode" config:type="short">0</config:config-item> 5511 <config:config-item config:name="ShowChangesByDatetimeFirstDatetime" config:type="datetime">2007-01-17T10:56:46.21</config:config-item> 5512 <config:config-item config:name="ShowChangesByDatetimeSecondDatetime" config:type="datetime">2007-01-17T10:56:46.21</config:config-item> 5513 <config:config-item config:name="ShowChangesByAuthor" config:type="boolean">false</config:config-item> 5514 <config:config-item config:name="ShowChangesByAuthorName" config:type="string"/> 5515 <config:config-item config:name="ShowChangesByComment" config:type="boolean">false</config:config-item> 5516 <config:config-item config:name="ShowChangesByCommentText" config:type="string"/> 5517 <config:config-item config:name="ShowChangesByRanges" config:type="boolean">false</config:config-item> 5518 <config:config-item config:name="ShowChangesByRangesList" config:type="string"/> 5519 </config:config-item-set> 5520 </xsl:if> 5521 <config:config-item-map-indexed config:name="Views"> 5522 <config:config-item-map-entry> 5523 <config:config-item config:name="ViewId" config:type="string">View1</config:config-item> 5524 <config:config-item-map-named config:name="Tables"> 5525 <xsl:for-each select="$sheetprop/表:工作表属性/表:视图"> 5526 <xsl:element name="config:config-item-map-entry"> 5527 <xsl:attribute name="config:name"><xsl:value-of select="ancestor::表:工作表/@表:名称"/></xsl:attribute> 5528 <xsl:element name="config:config-item"> 5529 <xsl:attribute name="config:name">HorizontalSplitMode</xsl:attribute> 5530 <xsl:attribute name="config:type">short</xsl:attribute> 5531 <xsl:choose> 5532 <xsl:when test="表:冻结 and 表:冻结/@表:列号!=0">2</xsl:when> 5533 <xsl:when test="表:冻结 and 表:冻结/@表:列号=0">0</xsl:when> 5534 <xsl:when test="表:拆分 and 表:拆分/@表:宽度!=0">1</xsl:when> 5535 <xsl:when test="表:拆分 and 表:拆分/@表:宽度=0">0</xsl:when> 5536 </xsl:choose> 5537 </xsl:element> 5538 <xsl:element name="config:config-item"> 5539 <xsl:attribute name="config:name">VerticalSplitMode</xsl:attribute> 5540 <xsl:attribute name="config:type">short</xsl:attribute> 5541 <xsl:choose> 5542 <xsl:when test="表:冻结 and 表:冻结/@表:行号!=0">2</xsl:when> 5543 <xsl:when test="表:冻结 and 表:冻结/@表:行号=0">0</xsl:when> 5544 <xsl:when test="表:拆分 and 表:拆分/@表:高度!=0">1</xsl:when> 5545 <xsl:when test="表:拆分 and 表:拆分/@表:高度=0">0</xsl:when> 5546 </xsl:choose> 5547 </xsl:element> 5548 <xsl:element name="config:config-item"> 5549 <xsl:attribute name="config:name">HorizontalSplitPosition</xsl:attribute> 5550 <xsl:attribute name="config:type">int</xsl:attribute> 5551 <xsl:choose> 5552 <xsl:when test="表:冻结 and 表:冻结/@表:列号=0">0</xsl:when> 5553 <xsl:when test="表:冻结 and 表:冻结/@表:列号!=0"> 5554 <xsl:value-of select="表:冻结/@表:列号"/> 5555 </xsl:when> 5556 <xsl:when test="表:拆分 and 表:拆分/@表:宽度=0">0</xsl:when> 5557 <xsl:when test="表:拆分 and 表:拆分/@表:宽度!=0"> 5558 <xsl:value-of select="表:拆分/@表:宽度"/> 5559 </xsl:when> 5560 </xsl:choose> 5561 </xsl:element> 5562 <xsl:element name="config:config-item"> 5563 <xsl:attribute name="config:name">VerticalSplitPosition</xsl:attribute> 5564 <xsl:attribute name="config:type">int</xsl:attribute> 5565 <xsl:choose> 5566 <xsl:when test="表:冻结 and 表:冻结/@表:行号=0">0</xsl:when> 5567 <xsl:when test="表:冻结 and 表:冻结/@表:行号!=0"> 5568 <xsl:value-of select="表:冻结/@表:行号"/> 5569 </xsl:when> 5570 <xsl:when test="表:拆分 and 表:拆分/@表:高度=0">0</xsl:when> 5571 <xsl:when test="表:拆分 and 表:拆分/@表:高度!=0"> 5572 <xsl:value-of select="表:拆分/@表:高度"/> 5573 </xsl:when> 5574 </xsl:choose> 5575 </xsl:element> 5576 <xsl:variable name="position-top"> 5577 <xsl:choose> 5578 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:最上行"> 5579 <xsl:value-of select="//表:工作表属性/表:视图/表:最上行"/> 5580 </xsl:when> 5581 <xsl:otherwise>0</xsl:otherwise> 5582 </xsl:choose> 5583 </xsl:variable> 5584 <xsl:variable name="position-left"> 5585 <xsl:choose> 5586 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:最左列"> 5587 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图/表:最左列"/> 5588 </xsl:when> 5589 <xsl:otherwise>0</xsl:otherwise> 5590 </xsl:choose> 5591 </xsl:variable> 5592 <config:config-item config:name="PositionRight" config:type="int"> 5593 <xsl:value-of select="$position-left"/> 5594 </config:config-item> 5595 <config:config-item config:name="PositionBottom" config:type="int"> 5596 <xsl:value-of select="$position-top"/> 5597 </config:config-item> 5598 </xsl:element> 5599 </xsl:for-each> 5600 </config:config-item-map-named> 5601 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:当前视图"> 5602 <xsl:element name="config:config-item"> 5603 <xsl:attribute name="config:name">ShowPageBreakPreview</xsl:attribute> 5604 <xsl:attribute name="config:type">boolean</xsl:attribute> 5605 <xsl:choose> 5606 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:当前视图/@表:类型='normal'">false</xsl:when> 5607 <xsl:otherwise>true</xsl:otherwise> 5608 </xsl:choose> 5609 </xsl:element> 5610 </xsl:if> 5611 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:网格"> 5612 <xsl:element name="config:config-item"> 5613 <xsl:attribute name="config:name">ShowGrid</xsl:attribute> 5614 <xsl:attribute name="config:type">boolean</xsl:attribute> 5615 <xsl:choose> 5616 <xsl:when test="$sheetprop/表:工作表属性/表:视图/表:网格/@表:值=1 or $sheetprop/表:工作表属性/表:视图/表:网格/@表:值='true'">true</xsl:when> 5617 <xsl:otherwise>false</xsl:otherwise> 5618 </xsl:choose> 5619 </xsl:element> 5620 </xsl:if> 5621 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:网格颜色"> 5622 <xsl:element name="config:config-item"> 5623 <xsl:attribute name="config:name">GridColor</xsl:attribute> 5624 <xsl:attribute name="config:type">long</xsl:attribute> 5625 <xsl:call-template name="transform-hex-to-decimal"> 5626 <xsl:with-param name="number" select="//表:视图/表:网格颜色/text()"/> 5627 </xsl:call-template> 5628 </xsl:element> 5629 </xsl:if> 5630 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:选中"> 5631 <xsl:element name="config:config-item"> 5632 <xsl:attribute name="config:name">ActiveTable</xsl:attribute> 5633 <xsl:attribute name="config:type">string</xsl:attribute> 5634 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图[表:选中]/ancestor::表:工作表/@表:名称"/> 5635 </xsl:element> 5636 </xsl:if> 5637 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:缩放"> 5638 <config:config-item config:name="ZoomValue" config:type="int"> 5639 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图/表:缩放/text()"/> 5640 </config:config-item> 5641 </xsl:if> 5642 <xsl:if test="$sheetprop/表:工作表属性/表:视图/表:分页缩放"> 5643 <config:config-item config:name="PageViewZoomValue" config:type="int"> 5644 <xsl:value-of select="$sheetprop/表:工作表属性/表:视图/表:分页缩放/text()"/> 5645 </config:config-item> 5646 </xsl:if> 5647 </config:config-item-map-entry> 5648 </config:config-item-map-indexed> 5649 </config:config-item-set> 5650 </xsl:template> 5651 <xsl:template name="create-page-master"> 5652 <xsl:param name="worksheetoptions"/> 5653 <xsl:for-each select="$worksheetoptions"> 5654 <xsl:element name="style:page-layout"> 5655 <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> 5656 <xsl:element name="style:page-layout-properties"> 5657 <xsl:if test="表:页面设置/表:纸张/@uof:宽度"> 5658 <xsl:attribute name="fo:page-width"><xsl:value-of select="concat(表:页面设置/表:纸张/@uof:宽度,$uofUnit)"/></xsl:attribute> 5659 </xsl:if> 5660 <xsl:if test="表:页面设置/表:纸张/@uof:高度"> 5661 <xsl:attribute name="fo:page-height"><xsl:value-of select="concat(表:页面设置/表:纸张/@uof:高度,$uofUnit)"/></xsl:attribute> 5662 </xsl:if> 5663 <xsl:if test="表:页面设置/表:纸张方向"> 5664 <xsl:attribute name="style:print-orientation"><xsl:value-of select="表:页面设置/表:纸张方向"/></xsl:attribute> 5665 </xsl:if> 5666 <xsl:if test="表:页面设置/表:缩放"> 5667 <xsl:attribute name="style:scale-to"><xsl:value-of select="concat(表:页面设置/表:缩放,'%')"/></xsl:attribute> 5668 </xsl:if> 5669 <xsl:if test="/uof:UOF/uof:电子表格/表:主体/表:工作表/@表:背景"> 5670 <xsl:attribute name="fo:background-color"><xsl:value-of select="/uof:UOF/uof:电子表格/表:主体/表:工作表/@表:背景"/></xsl:attribute> 5671 </xsl:if> 5672 <xsl:attribute name="style:first-page-number">continue</xsl:attribute> 5673 <xsl:if test="表:页面设置/表:页边距"> 5674 <xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:上,$uofUnit)"/></xsl:attribute> 5675 <xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:下,$uofUnit)"/></xsl:attribute> 5676 <xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:左,$uofUnit)"/></xsl:attribute> 5677 <xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(表:页面设置/表:页边距/@uof:右,$uofUnit)"/></xsl:attribute> 5678 </xsl:if> 5679 <xsl:if test="表:页面设置/表:打印/@表:先列后行='true'"> 5680 <xsl:attribute name="style:print-page-order">ltr</xsl:attribute> 5681 </xsl:if> 5682 <xsl:if test="表:页面设置/表:垂直对齐/@表:对齐方式"> 5683 <xsl:attribute name="style:table-centering">vertical</xsl:attribute> 5684 </xsl:if> 5685 <xsl:if test="表:页面设置/表:水平对齐/@表:对齐方式"> 5686 <xsl:attribute name="style:table-centering">horizontal</xsl:attribute> 5687 </xsl:if> 5688 </xsl:element> 5689 <xsl:element name="style:header-style"> 5690 <xsl:element name="style:header-footer-properties"> 5691 <xsl:attribute name="fo:min-height">0.75cm</xsl:attribute> 5692 <xsl:choose> 5693 <xsl:when test="表:页面设置/表:页眉页脚/@uof:边距"> 5694 <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> 5695 </xsl:when> 5696 <xsl:otherwise> 5697 <xsl:attribute name="fo:margin-bottom">0.25cm</xsl:attribute> 5698 </xsl:otherwise> 5699 </xsl:choose> 5700 </xsl:element> 5701 </xsl:element> 5702 <xsl:element name="style:footer-style"> 5703 <xsl:element name="style:header-footer-properties"> 5704 <xsl:attribute name="fo:min-height">0.75cm</xsl:attribute> 5705 <xsl:choose> 5706 <xsl:when test="表:页面设置/表:页眉页脚/@uof:边距"> 5707 <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> 5708 </xsl:when> 5709 <xsl:otherwise> 5710 <xsl:attribute name="fo:margin-top">0.25cm</xsl:attribute> 5711 </xsl:otherwise> 5712 </xsl:choose> 5713 </xsl:element> 5714 </xsl:element> 5715 </xsl:element> 5716 </xsl:for-each> 5717 </xsl:template> 5718 <xsl:template match="字:文本串"> 5719 <xsl:value-of select="text()"/> 5720 </xsl:template> 5721 <xsl:template match="字:换行符"> 5722 <xsl:element name="text:line-break"/> 5723 </xsl:template> 5724 <xsl:template match="字:制表符"> 5725 <xsl:element name="text:tab-stop"/> 5726 </xsl:template> 5727 <xsl:template match="字:区域开始"> 5728 <xsl:if test="@字:类型='hyperlink'"> 5729 <xsl:variable name="superlink" select="//uof:超级链接[@uof:标识符=current()/@字:标识符]"/> 5730 <xsl:element name="text:a"> 5731 <xsl:attribute name="xlink:href"><xsl:value-of select="$superlink/@uof:目标"/></xsl:attribute> 5732 <xsl:value-of select="$superlink/@uof:提示"/> 5733 </xsl:element> 5734 </xsl:if> 5735 </xsl:template> 5736 <xsl:template match="字:空格符"> 5737 <xsl:element name="text:s"> 5738 <xsl:if test="@字:个数"> 5739 <xsl:attribute name="text:c"><xsl:value-of select="@字:个数"/></xsl:attribute> 5740 </xsl:if> 5741 </xsl:element> 5742 </xsl:template> 5743 <xsl:template name="create-page-header-footer-text-p"> 5744 <xsl:param name="paragragh-set"/> 5745 <xsl:choose> 5746 <xsl:when test="$paragragh-set"> 5747 <xsl:element name="text:p"> 5748 <xsl:for-each select="$paragragh-set[1]/字:句"> 5749 <xsl:choose> 5750 <xsl:when test="not(字:句属性)"> 5751 <xsl:apply-templates select="字:文本串 | 字:空格符 | 字:换行符"/> 5752 </xsl:when> 5753 <xsl:when test="字:句属性"> 5754 <xsl:element name="text:span"> 5755 <xsl:attribute name="text:style-name"><xsl:value-of select="//uof:句式样[@字:标识符=current()/字:句属性/@字:式样引用]/@字:名称"/></xsl:attribute> 5756 <xsl:apply-templates select="字:空格符 | 字:文本串 | 字:换行符 | 字:制表符"/> 5757 </xsl:element> 5758 </xsl:when> 5759 </xsl:choose> 5760 </xsl:for-each> 5761 </xsl:element> 5762 <xsl:call-template name="create-page-header-footer-text-p"> 5763 <xsl:with-param name="paragragh-set" select="$paragragh-set[position()!=1]"/> 5764 </xsl:call-template> 5765 </xsl:when> 5766 <xsl:otherwise/> 5767 </xsl:choose> 5768 </xsl:template> 5769 <!--Redoffice comment lilliang SC0016 06.02.16 --> 5770 <!--新增内容--> 5771 <xsl:template match="字:段落"> 5772 <xsl:element name="text:p"> 5773 <xsl:choose> 5774 <xsl:when test="字:段落属性"> 5775 <xsl:attribute name="text:style-name">P<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/></xsl:attribute> 5776 </xsl:when> 5777 <xsl:when test="generate-id(ancestor::字:主体/descendant::字:段落[1]) = generate-id(.)"> 5778 <!-- create the leading paragraph style name in one section for master page style application, glu --> 5779 <xsl:variable name="paragraph-number"> 5780 <xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/> 5781 </xsl:variable> 5782 <xsl:attribute name="text:style-name">P<xsl:value-of select="number($paragraph-number)"/>_1</xsl:attribute> 5783 </xsl:when> 5784 <xsl:when test="not(字:段落属性) and (descendant::字:分栏符 or ancestor::字:分节/descendant::字:节属性[字:分栏/@字:栏数 > 1])"> 5785 <xsl:attribute name="text:style-name">ColumnBreakPara</xsl:attribute> 5786 </xsl:when> 5787 <xsl:when test="字:句"> 5788 <xsl:apply-templates select="字:句/字:文本串"/> 5789 </xsl:when> 5790 </xsl:choose> 5791 </xsl:element> 5792 </xsl:template> 5793 <!--Redoffice comment liliang end 06.02.16--> 5794 <xsl:template name="create-master-styles"> 5795 <xsl:param name="worksheetoptions"/> 5796 <xsl:for-each select="$worksheetoptions"> 5797 <xsl:element name="style:master-page"> 5798 <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> 5799 <!--xsl:attribute name="style:page-layout-name"--> 5800 <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> 5801 <xsl:attribute name="style:display-name"><xsl:value-of select="concat( 'PageStyle_', ../@表:名称)"/></xsl:attribute> 5802 <style:header> 5803 <xsl:for-each select="表:页面设置/表:页眉页脚"> 5804 <xsl:variable name="temp" select="@表:位置"/> 5805 <xsl:choose> 5806 <xsl:when test="contains($temp,'header')"> 5807 <xsl:if test="字:段落"> 5808 <xsl:choose> 5809 <xsl:when test="@表:位置='headerleft'"> 5810 <xsl:element name="style:region-left"> 5811 <xsl:call-template name="create-page-header-footer-text-p"> 5812 <xsl:with-param name="paragragh-set" select="字:段落"/> 5813 </xsl:call-template> 5814 </xsl:element> 5815 </xsl:when> 5816 <xsl:when test="@表:位置='headercenter'"> 5817 <xsl:element name="style:region-center"> 5818 <xsl:call-template name="create-page-header-footer-text-p"> 5819 <xsl:with-param name="paragragh-set" select="字:段落"/> 5820 </xsl:call-template> 5821 </xsl:element> 5822 </xsl:when> 5823 <xsl:when test="@表:位置='headerright'"> 5824 <xsl:element name="style:region-right"> 5825 <xsl:call-template name="create-page-header-footer-text-p"> 5826 <xsl:with-param name="paragragh-set" select="字:段落"/> 5827 </xsl:call-template> 5828 </xsl:element> 5829 </xsl:when> 5830 <xsl:otherwise/> 5831 </xsl:choose> 5832 </xsl:if> 5833 </xsl:when> 5834 <xsl:otherwise/> 5835 </xsl:choose> 5836 </xsl:for-each> 5837 </style:header> 5838 <style:footer> 5839 <xsl:for-each select="表:页面设置/表:页眉页脚"> 5840 <xsl:variable name="temp" select="@表:位置"/> 5841 <xsl:choose> 5842 <xsl:when test="contains($temp,'footer')"> 5843 <xsl:if test="字:段落"> 5844 <xsl:choose> 5845 <xsl:when test="@表:位置='footerleft'"> 5846 <xsl:element name="style:region-left"> 5847 <xsl:call-template name="create-page-header-footer-text-p"> 5848 <xsl:with-param name="paragragh-set" select="字:段落"/> 5849 </xsl:call-template> 5850 </xsl:element> 5851 </xsl:when> 5852 <xsl:when test="@表:位置='footercenter'"> 5853 <xsl:element name="style:region-center"> 5854 <xsl:call-template name="create-page-header-footer-text-p"> 5855 <xsl:with-param name="paragragh-set" select="字:段落"/> 5856 </xsl:call-template> 5857 </xsl:element> 5858 </xsl:when> 5859 <xsl:when test="@表:位置='footerright'"> 5860 <xsl:element name="style:region-right"> 5861 <xsl:call-template name="create-page-header-footer-text-p"> 5862 <xsl:with-param name="paragragh-set" select="字:段落"/> 5863 </xsl:call-template> 5864 </xsl:element> 5865 </xsl:when> 5866 <xsl:otherwise/> 5867 </xsl:choose> 5868 </xsl:if> 5869 </xsl:when> 5870 <xsl:otherwise/> 5871 </xsl:choose> 5872 </xsl:for-each> 5873 </style:footer> 5874 </xsl:element> 5875 </xsl:for-each> 5876 </xsl:template> 5877 <!--xsl:template name="create-page-master"> 5878 </xsl:template> 5879 <xsl:template match="表:页面设置"> 5880 </xsl:template> 5881 5882 <xsl:template name="create-master-styles"> 5883 </xsl:template> 5884 <xsl:template name="表:工作表属性"> 5885 </xsl:template--> 5886 <!--00000000000--> 5887 <xsl:template match="uof:元数据"> 5888 <office:meta> 5889 <xsl:if test="uof:创建应用程序"> 5890 <meta:generator> 5891 <xsl:value-of select="uof:创建应用程序"/> 5892 </meta:generator> 5893 </xsl:if> 5894 <xsl:if test="uof:标题"> 5895 <dc:title> 5896 <xsl:value-of select="uof:标题"/> 5897 </dc:title> 5898 </xsl:if> 5899 <xsl:if test="uof:摘要"> 5900 <dc:description> 5901 <xsl:value-of select="uof:摘要"/> 5902 </dc:description> 5903 </xsl:if> 5904 <xsl:if test="uof:主题"> 5905 <dc:subject> 5906 <xsl:value-of select="uof:主题"/> 5907 </dc:subject> 5908 </xsl:if> 5909 <xsl:if test="uof:作者"> 5910 <meta:initial-creator> 5911 <xsl:value-of select="uof:作者"/> 5912 </meta:initial-creator> 5913 </xsl:if> 5914 <xsl:if test="uof:创建日期"> 5915 <meta:creation-date> 5916 <xsl:value-of select="uof:创建日期"/> 5917 </meta:creation-date> 5918 </xsl:if> 5919 <xsl:if test="uof:最后作者"> 5920 <dc:creator> 5921 <xsl:value-of select="uof:最后作者"/> 5922 </dc:creator> 5923 </xsl:if> 5924 <xsl:if test="uof:编辑时间"> 5925 <meta:editing-duration> 5926 <xsl:value-of select="uof:编辑时间"/> 5927 </meta:editing-duration> 5928 </xsl:if> 5929 <dc:language/> 5930 <meta:keyword> 5931 <xsl:value-of select="uof:关键字集/uof:关键字"/> 5932 </meta:keyword> 5933 <xsl:if test="uof:编辑次数"> 5934 <meta:editing-cycles> 5935 <xsl:value-of select="uof:编辑次数"/> 5936 </meta:editing-cycles> 5937 </xsl:if> 5938 <xsl:if test="uof:分类"> 5939 <meta:user-defined meta:name="Category"> 5940 <xsl:value-of select="uof:分类"/> 5941 </meta:user-defined> 5942 </xsl:if> 5943 <xsl:if test="uof:经理名称"> 5944 <meta:user-defined meta:name="Manager"> 5945 <xsl:value-of select="uof:经理名称"/> 5946 </meta:user-defined> 5947 </xsl:if> 5948 <xsl:if test="uof:公司名称"> 5949 <meta:user-defined meta:name="Company"> 5950 <xsl:value-of select="uof:公司名称"/> 5951 </meta:user-defined> 5952 </xsl:if> 5953 <xsl:apply-templates select="uof:用户自定义元数据集"/> 5954 </office:meta> 5955 </xsl:template> 5956 <xsl:template match="uof:用户自定义元数据集"> 5957 <xsl:for-each select="uof:用户自定义元数据"> 5958 <meta:user-defined meta:name="{@uof:名称}"> 5959 <xsl:value-of select="."/> 5960 </meta:user-defined> 5961 </xsl:for-each> 5962 </xsl:template> 5963 <xsl:template name="parse-range"> 5964 <xsl:param name="range-value"/> 5965 <xsl:param name="last"/> 5966 <xsl:variable name="first-pit"> 5967 <xsl:choose> 5968 <xsl:when test="contains($range-value,',')"> 5969 <xsl:value-of select="substring-before($range-value,',')"/> 5970 </xsl:when> 5971 <xsl:otherwise> 5972 <xsl:value-of select="$range-value"/> 5973 </xsl:otherwise> 5974 </xsl:choose> 5975 </xsl:variable> 5976 <xsl:variable name="current"> 5977 <xsl:choose> 5978 <xsl:when test="contains($first-pit,':')"> 5979 <xsl:variable name="R-start" select="substring-before(substring-after($first-pit,'R'),'C')"/> 5980 <xsl:variable name="C-start" select="substring-before(substring-after($first-pit,'C'),':')"/> 5981 <xsl:variable name="second-pit" select="substring-after($first-pit,':')"/> 5982 <xsl:variable name="R-end" select="substring-before(substring-after($second-pit,'R'),'C')"/> 5983 <xsl:variable name="C-end" select="substring-after($second-pit,'C')"/> 5984 <xsl:variable name="the-str"> 5985 <xsl:call-template name="condition-rc-str"> 5986 <xsl:with-param name="r-start" select="$R-start"/> 5987 <xsl:with-param name="r-end" select="$R-end"/> 5988 <xsl:with-param name="c-start" select="$C-start"/> 5989 <xsl:with-param name="c-end" select="$C-end"/> 5990 <xsl:with-param name="last" select="''"/> 5991 </xsl:call-template> 5992 </xsl:variable> 5993 <xsl:value-of select="$the-str"/> 5994 </xsl:when> 5995 <xsl:otherwise> 5996 <xsl:value-of select="concat($first-pit,',')"/> 5997 </xsl:otherwise> 5998 </xsl:choose> 5999 </xsl:variable> 6000 <xsl:choose> 6001 <xsl:when test="contains($range-value,',')"> 6002 <xsl:call-template name="parse-range"> 6003 <xsl:with-param name="range-value" select="substring-after($range-value,',')"/> 6004 <xsl:with-param name="last" select="concat($last,$current)"/> 6005 </xsl:call-template> 6006 </xsl:when> 6007 <xsl:otherwise> 6008 <xsl:value-of select="concat($last,$current)"/> 6009 </xsl:otherwise> 6010 </xsl:choose> 6011 </xsl:template> 6012 <xsl:template name="condition-rc-str"> 6013 <!-- dealing the range of row\column --> 6014 <xsl:param name="r-start"/> 6015 <xsl:param name="r-end"/> 6016 <xsl:param name="c-start"/> 6017 <xsl:param name="c-end"/> 6018 <xsl:param name="last"/> 6019 <xsl:variable name="current"> 6020 <xsl:call-template name="condition-c-str"> 6021 <xsl:with-param name="rc-str" select="concat('R',$r-start)"/> 6022 <xsl:with-param name="start" select="$c-start"/> 6023 <xsl:with-param name="end" select="$c-end"/> 6024 <xsl:with-param name="last" select="''"/> 6025 </xsl:call-template> 6026 </xsl:variable> 6027 <xsl:if test="$r-start < $r-end"> 6028 <xsl:call-template name="condition-rc-str"> 6029 <xsl:with-param name="r-start" select="$r-start + 1"/> 6030 <xsl:with-param name="r-end" select="$r-end"/> 6031 <xsl:with-param name="c-start" select="$c-start"/> 6032 <xsl:with-param name="c-end" select="$c-end"/> 6033 <xsl:with-param name="last" select="concat($last,$current)"/> 6034 </xsl:call-template> 6035 </xsl:if> 6036 <xsl:if test="$r-start = $r-end"> 6037 <xsl:value-of select="concat($last,$current)"/> 6038 </xsl:if> 6039 </xsl:template> 6040 <xsl:template name="condition-c-str"> 6041 <!-- return value for the template condition-rc-str --> 6042 <xsl:param name="rc-str"/> 6043 <xsl:param name="start"/> 6044 <xsl:param name="end"/> 6045 <xsl:param name="last"/> 6046 <xsl:variable name="current" select="concat($rc-str,'C',$start,',')"/> 6047 <xsl:if test="$start < $end"> 6048 <xsl:call-template name="condition-c-str"> 6049 <xsl:with-param name="rc-str" select="$rc-str"/> 6050 <xsl:with-param name="start" select="$start + 1"/> 6051 <xsl:with-param name="end" select="$end"/> 6052 <xsl:with-param name="last" select="concat($last,$current)"/> 6053 </xsl:call-template> 6054 </xsl:if> 6055 <xsl:if test="$start = $end"> 6056 <xsl:value-of select="concat($last,$current)"/> 6057 </xsl:if> 6058 </xsl:template> 6059 <xsl:template name="condition-str"> 6060 <xsl:param name="param-str"/> 6061 <xsl:choose> 6062 <xsl:when test="contains($param-str,'(')"> 6063 <xsl:call-template name="condition-str"> 6064 <xsl:with-param name="param-str" select="substring-after($param-str,'(')"/> 6065 </xsl:call-template> 6066 </xsl:when> 6067 <xsl:otherwise> 6068 <xsl:value-of select="substring-before($param-str,':')"/> 6069 </xsl:otherwise> 6070 </xsl:choose> 6071 </xsl:template> 6072 <xsl:template name="encode-as-cell-range-address"> 6073 <xsl:param name="string"/> 6074 <xsl:value-of select="$string"/> 6075 </xsl:template> 6076 <xsl:template name="encode-as-cell-address"> 6077 <xsl:param name="string"/> 6078 <xsl:value-of select="$string"/> 6079 </xsl:template> 6080 <!--chengxiuzhi 111111111111111111111111111111111111111111111111111111111111111--> 6081 <!-- measure_conversion.xsl Begin--> 6082 <xsl:param name="dpi" select="111"/> 6083 <xsl:param name="centimeter-in-mm" select="10"/> 6084 <xsl:param name="inch-in-mm" select="25.4"/> 6085 <xsl:param name="didot-point-in-mm" select="0.376065"/> 6086 <xsl:param name="pica-in-mm" select="4.2333333"/> 6087 <xsl:param name="point-in-mm" select="0.3527778"/> 6088 <xsl:param name="twip-in-mm" select="0.017636684"/> 6089 <xsl:param name="pixel-in-mm" select="$inch-in-mm div $dpi"/> 6090 <!-- ***** MEASUREMENT CONVERSIONS ***** 6091 PARAM 'value' 6092 The measure to be converted. 6093 The current measure is judged by a substring (e.g. 'mm', 'cm', 'in', 'pica'...) 6094 directly added to the number. 6095 6096 PARAM 'rounding-factor' 6097 Is used for the rounding of decimal places. 6098 The parameter number is the product of 1 and some '10', where 6099 every zero represents a decimal place. 6100 6101 For example, providing as parameter: 6102 <xsl:param name="rounding-factor" select="10000" /> 6103 Gives by default four decimal places. 6104 6105 To round two decimal places, basically the following is done: 6106 <xsl:value-of select="round(100 * value) div 100"/> 6107 6108 RETURN The converted number, by default rounded to four decimal places. 6109 In case the input measure could not be matched the same value is 6110 returned and a warning message is written out. 6111 6112 6113 6114 MEASURE LIST: 6115 * 1 milimeter (mm), the basic measure 6116 6117 * 1 centimeter (cm) = 10 mm 6118 6119 * 1 inch (in) = 25.4 mm 6120 While the English have already seen the light (read: the metric system), the US 6121 remains loyal to this medieval system. 6122 6123 * 1 point (pt) = 0.35277777.. mm 6124 Sometimes called PostScript point (ppt), as when Adobe created PostScript, they added their own system of points. 6125 There are exactly 72 PostScript points in 1 inch. 6126 6127 * 1 twip = twentieth of a (PostScript) point 6128 A twip (twentieth of a point) is a 1/20th of a PostScript point, a traditional measure in printing. 6129 6130 * 1 didot point (dpt) = 0.376065 mm 6131 Didot point after the French typographer Firmin Didot (1764-1836). 6132 6133 More details under 6134 http://www.unc.edu/~rowlett/units/dictP.html: 6135 "A unit of length used by typographers and printers. When printing was done 6136 from hand-set metal type, one point represented the smallest element of type 6137 that could be handled, roughly 1/64 inch. Eventually, the point was standardized 6138 in Britain and America as exactly 1/72.27 = 0.013 837 inch, which is 6139 about 0.35 mm (351.46 micrometers). In continental Europe, typographers 6140 traditionally used a slightly larger point of 0.014 83 inch (about 6141 1/72 pouce, 0.377 mm, or roughly 1/67 English inch), called a Didot point 6142 after the French typographer Firmin Didot (1764-1836). In the U.S., 6143 Adobe software defines the point to be exactly 1/72 inch (0.013 888 9 inch 6144 or 0.352 777 8 millimeters) and TeX software uses a slightly smaller point 6145 of 0.351 459 8035 mm. The German standards agency DIN has proposed that 6146 all these units be replaced by multiples of 0.25 millimeters (1/101.6 inch). 6147 6148 * 1 pica = 4.233333 mm 6149 1/6 inch or 12 points 6150 6151 * 1 pixel (px) = 0.26458333.. mm (relative to 'DPI', here: 96 dpi) 6152 Most pictures have the 96 dpi resolution, but the dpi variable may vary by stylesheet parameter 6153 6154 6155 --> 6156 <!-- changing measure to mm --> 6157 <xsl:template name="convert2mm"> 6158 <xsl:param name="value"/> 6159 <xsl:param name="rounding-factor" select="10000"/> 6160 <xsl:choose> 6161 <xsl:when test="contains($value, 'mm')"> 6162 <xsl:value-of select="substring-before($value, 'mm')"/> 6163 </xsl:when> 6164 <xsl:when test="contains($value, 'cm')"> 6165 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm' ) * $centimeter-in-mm)) div $rounding-factor"/> 6166 </xsl:when> 6167 <xsl:when test="contains($value, 'in')"> 6168 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in' ) * $inch-in-mm)) div $rounding-factor"/> 6169 </xsl:when> 6170 <xsl:when test="contains($value, 'pt')"> 6171 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') * $point-in-mm)) div $rounding-factor"/> 6172 </xsl:when> 6173 <xsl:when test="contains($value, 'twip')"> 6174 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') * $twip-in-mm)) div $rounding-factor"/> 6175 </xsl:when> 6176 <xsl:when test="contains($value, 'dpt')"> 6177 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') * $didot-point-in-mm)) div $rounding-factor"/> 6178 </xsl:when> 6179 <xsl:when test="contains($value, 'pica')"> 6180 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') * $pica-in-mm)) div $rounding-factor"/> 6181 </xsl:when> 6182 <xsl:when test="contains($value, 'px')"> 6183 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') * $pixel-in-mm)) div $rounding-factor"/> 6184 </xsl:when> 6185 <xsl:otherwise> 6186 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'mm'!</xsl:message> 6187 <xsl:value-of select="$value"/> 6188 </xsl:otherwise> 6189 </xsl:choose> 6190 </xsl:template> 6191 <!-- changing measure to cm --> 6192 <xsl:template name="convert2cm"> 6193 <xsl:param name="value"/> 6194 <xsl:param name="rounding-factor" select="10000"/> 6195 <xsl:choose> 6196 <xsl:when test="contains($value, 'mm')"> 6197 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $centimeter-in-mm)) div $rounding-factor"/> 6198 </xsl:when> 6199 <xsl:when test="contains($value, 'cm')"> 6200 <xsl:value-of select="substring-before($value, 'cm')"/> 6201 </xsl:when> 6202 <xsl:when test="contains($value, 'in')"> 6203 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $centimeter-in-mm * $inch-in-mm)) div $rounding-factor"/> 6204 </xsl:when> 6205 <xsl:when test="contains($value, 'pt')"> 6206 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $centimeter-in-mm * $point-in-mm)) div $rounding-factor"/> 6207 </xsl:when> 6208 <xsl:when test="contains($value, 'dpt')"> 6209 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $centimeter-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6210 </xsl:when> 6211 <xsl:when test="contains($value, 'pica')"> 6212 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $centimeter-in-mm * $pica-in-mm)) div $rounding-factor"/> 6213 </xsl:when> 6214 <xsl:when test="contains($value, 'twip')"> 6215 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $centimeter-in-mm * $twip-in-mm)) div $rounding-factor"/> 6216 </xsl:when> 6217 <xsl:when test="contains($value, 'px')"> 6218 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $centimeter-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6219 </xsl:when> 6220 <xsl:otherwise> 6221 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'cm'!</xsl:message> 6222 <xsl:value-of select="$value"/> 6223 </xsl:otherwise> 6224 </xsl:choose> 6225 </xsl:template> 6226 <!-- changing measure to inch (cp. section comment) --> 6227 <xsl:template name="convert2in"> 6228 <xsl:param name="value"/> 6229 <xsl:param name="rounding-factor" select="10000"/> 6230 <xsl:choose> 6231 <xsl:when test="contains($value, 'mm')"> 6232 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $inch-in-mm)) div $rounding-factor"/> 6233 </xsl:when> 6234 <xsl:when test="contains($value, 'cm')"> 6235 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $inch-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6236 </xsl:when> 6237 <xsl:when test="contains($value, 'in')"> 6238 <xsl:value-of select="substring-before($value, 'in')"/> 6239 </xsl:when> 6240 <xsl:when test="contains($value, 'pt')"> 6241 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $inch-in-mm * $point-in-mm)) div $rounding-factor"/> 6242 </xsl:when> 6243 <xsl:when test="contains($value, 'dpt')"> 6244 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $inch-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6245 </xsl:when> 6246 <xsl:when test="contains($value, 'pica')"> 6247 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $inch-in-mm * $pica-in-mm)) div $rounding-factor"/> 6248 </xsl:when> 6249 <xsl:when test="contains($value, 'twip')"> 6250 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $inch-in-mm * $twip-in-mm)) div $rounding-factor"/> 6251 </xsl:when> 6252 <xsl:when test="contains($value, 'px')"> 6253 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $inch-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6254 </xsl:when> 6255 <xsl:otherwise> 6256 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'in'!</xsl:message> 6257 <xsl:value-of select="$value"/> 6258 </xsl:otherwise> 6259 </xsl:choose> 6260 </xsl:template> 6261 <!-- changing measure to dpt (cp. section comment) --> 6262 <xsl:template name="convert2dpt"> 6263 <xsl:param name="value"/> 6264 <xsl:param name="rounding-factor" select="10000"/> 6265 <xsl:choose> 6266 <xsl:when test="contains($value, 'mm')"> 6267 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $didot-point-in-mm)) div $rounding-factor"/> 6268 </xsl:when> 6269 <xsl:when test="contains($value, 'cm')"> 6270 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $didot-point-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6271 </xsl:when> 6272 <xsl:when test="contains($value, 'in')"> 6273 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $didot-point-in-mm * $inch-in-mm)) div $rounding-factor"/> 6274 </xsl:when> 6275 <xsl:when test="contains($value, 'pt')"> 6276 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $didot-point-in-mm * $point-in-mm)) div $rounding-factor"/> 6277 </xsl:when> 6278 <xsl:when test="contains($value, 'dpt')"> 6279 <xsl:value-of select="substring-before($value, 'dpt')"/> 6280 </xsl:when> 6281 <xsl:when test="contains($value, 'pica')"> 6282 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $didot-point-in-mm * $pica-in-mm)) div $rounding-factor"/> 6283 </xsl:when> 6284 <xsl:when test="contains($value, 'twip')"> 6285 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $didot-point-in-mm * $twip-in-mm)) div $rounding-factor"/> 6286 </xsl:when> 6287 <xsl:when test="contains($value, 'px')"> 6288 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $didot-point-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6289 </xsl:when> 6290 <xsl:otherwise> 6291 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'dpt'!</xsl:message> 6292 <xsl:value-of select="$value"/> 6293 </xsl:otherwise> 6294 </xsl:choose> 6295 </xsl:template> 6296 <!-- changing measure to pica (cp. section comment) --> 6297 <xsl:template name="convert2pica"> 6298 <xsl:param name="value"/> 6299 <xsl:param name="rounding-factor" select="10000"/> 6300 <xsl:choose> 6301 <xsl:when test="contains($value, 'mm')"> 6302 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $pica-in-mm)) div $rounding-factor"/> 6303 </xsl:when> 6304 <xsl:when test="contains($value, 'cm')"> 6305 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $pica-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6306 </xsl:when> 6307 <xsl:when test="contains($value, 'in')"> 6308 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $pica-in-mm * $inch-in-mm)) div $rounding-factor"/> 6309 </xsl:when> 6310 <xsl:when test="contains($value, 'pt')"> 6311 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $pica-in-mm * $point-in-mm)) div $rounding-factor"/> 6312 </xsl:when> 6313 <xsl:when test="contains($value, 'dpt')"> 6314 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $pica-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6315 </xsl:when> 6316 <xsl:when test="contains($value, 'pica')"> 6317 <xsl:value-of select="substring-before($value, 'pica')"/> 6318 </xsl:when> 6319 <xsl:when test="contains($value, 'twip')"> 6320 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $pica-in-mm * $twip-in-mm)) div $rounding-factor"/> 6321 </xsl:when> 6322 <xsl:when test="contains($value, 'px')"> 6323 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $pica-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6324 </xsl:when> 6325 <xsl:otherwise> 6326 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pica'!</xsl:message> 6327 <xsl:value-of select="$value"/> 6328 </xsl:otherwise> 6329 </xsl:choose> 6330 </xsl:template> 6331 <!-- changing measure to pt (cp. section comment) --> 6332 <xsl:template name="convert2pt"> 6333 <xsl:param name="value"/> 6334 <xsl:param name="rounding-factor" select="10000"/> 6335 <xsl:choose> 6336 <xsl:when test="contains($value, 'mm')"> 6337 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $point-in-mm)) div $rounding-factor"/> 6338 </xsl:when> 6339 <xsl:when test="contains($value, 'cm')"> 6340 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $point-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6341 </xsl:when> 6342 <xsl:when test="contains($value, 'in')"> 6343 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $point-in-mm * $inch-in-mm)) div $rounding-factor"/> 6344 </xsl:when> 6345 <xsl:when test="contains($value, 'pt')"> 6346 <xsl:value-of select="substring-before($value, 'pt')"/> 6347 </xsl:when> 6348 <xsl:when test="contains($value, 'dpt')"> 6349 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $point-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6350 </xsl:when> 6351 <xsl:when test="contains($value, 'pica')"> 6352 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $point-in-mm * $pica-in-mm)) div $rounding-factor"/> 6353 </xsl:when> 6354 <xsl:when test="contains($value, 'twip')"> 6355 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $point-in-mm * $twip-in-mm)) div $rounding-factor"/> 6356 </xsl:when> 6357 <xsl:when test="contains($value, 'px')"> 6358 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $point-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6359 </xsl:when> 6360 <xsl:otherwise> 6361 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pt'!</xsl:message> 6362 <xsl:value-of select="$value"/> 6363 </xsl:otherwise> 6364 </xsl:choose> 6365 </xsl:template> 6366 <!-- changing measure to pt (cp. section comment) --> 6367 <xsl:template name="convert2twip"> 6368 <xsl:param name="value"/> 6369 <xsl:param name="rounding-factor" select="10000"/> 6370 <xsl:choose> 6371 <xsl:when test="contains($value, 'mm')"> 6372 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $twip-in-mm)) div $rounding-factor"/> 6373 </xsl:when> 6374 <xsl:when test="contains($value, 'cm')"> 6375 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $twip-in-mm * $centimeter-in-mm)) div $rounding-factor"/> 6376 </xsl:when> 6377 <xsl:when test="contains($value, 'in')"> 6378 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $twip-in-mm * $inch-in-mm)) div $rounding-factor"/> 6379 </xsl:when> 6380 <xsl:when test="contains($value, 'pt')"> 6381 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $twip-in-mm * $point-in-mm)) div $rounding-factor"/> 6382 </xsl:when> 6383 <xsl:when test="contains($value, 'dpt')"> 6384 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $twip-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 6385 </xsl:when> 6386 <xsl:when test="contains($value, 'pica')"> 6387 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $twip-in-mm * $pica-in-mm)) div $rounding-factor"/> 6388 </xsl:when> 6389 <xsl:when test="contains($value, 'twip')"> 6390 <xsl:value-of select="substring-before($value, 'twip')"/> 6391 </xsl:when> 6392 <xsl:when test="contains($value, 'px')"> 6393 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $twip-in-mm * $pixel-in-mm)) div $rounding-factor"/> 6394 </xsl:when> 6395 <xsl:otherwise> 6396 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'twip'!</xsl:message> 6397 <xsl:value-of select="$value"/> 6398 </xsl:otherwise> 6399 </xsl:choose> 6400 </xsl:template> 6401 <!-- changing measure to pixel by via parameter provided dpi (dots per inch) standard factor (cp. section comment) --> 6402 <xsl:template name="convert2px"> 6403 <xsl:param name="value"/> 6404 <xsl:choose> 6405 <xsl:when test="contains($value, 'mm')"> 6406 <xsl:value-of select="round(number(substring-before($value, 'mm')) div $pixel-in-mm)"/> 6407 </xsl:when> 6408 <xsl:when test="contains($value, 'cm')"> 6409 <xsl:value-of select="round(number(substring-before($value, 'cm')) div $pixel-in-mm * $centimeter-in-mm)"/> 6410 </xsl:when> 6411 <xsl:when test="contains($value, 'in')"> 6412 <xsl:value-of select="round(number(substring-before($value, 'in')) div $pixel-in-mm * $inch-in-mm)"/> 6413 </xsl:when> 6414 <xsl:when test="contains($value, 'pt')"> 6415 <xsl:value-of select="round(number(substring-before($value, 'pt')) div $pixel-in-mm * $point-in-mm)"/> 6416 </xsl:when> 6417 <xsl:when test="contains($value, 'dpt')"> 6418 <xsl:value-of select="round(number(substring-before($value, 'dpt')) div $pixel-in-mm * $didot-point-in-mm)"/> 6419 </xsl:when> 6420 <xsl:when test="contains($value, 'pica')"> 6421 <xsl:value-of select="round(number(substring-before($value, 'pica')) div $pixel-in-mm * $pica-in-mm)"/> 6422 </xsl:when> 6423 <xsl:when test="contains($value, 'twip')"> 6424 <xsl:value-of select="round(number(substring-before($value, 'twip')) div $pixel-in-mm * $twip-in-mm)"/> 6425 </xsl:when> 6426 <xsl:when test="contains($value, 'px')"> 6427 <xsl:value-of select="$value"/> 6428 </xsl:when> 6429 <xsl:otherwise> 6430 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'px'!</xsl:message> 6431 <xsl:value-of select="$value"/> 6432 </xsl:otherwise> 6433 </xsl:choose> 6434 </xsl:template> 6435 <!-- chenjh zhangying--> 6436 <xsl:template name="create-content-validations"> 6437 <xsl:param name="validation-set"/> 6438 <xsl:if test="$validation-set"> 6439 <xsl:variable name="first-validation" select="$validation-set[1]"/> 6440 <xsl:variable name="condition-text"> 6441 <xsl:choose> 6442 <xsl:when test="$first-validation/表:校验类型/text()='whole number'"> 6443 <xsl:choose> 6444 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6445 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6446 </xsl:when> 6447 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6448 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6449 </xsl:when> 6450 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6451 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6452 </xsl:when> 6453 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6454 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6455 </xsl:when> 6456 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6457 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6458 </xsl:when> 6459 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6460 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6461 </xsl:when> 6462 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6463 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6464 </xsl:when> 6465 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6466 <xsl:value-of select="concat('oooc:cell-content-is-whole-number() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6467 </xsl:when> 6468 </xsl:choose> 6469 </xsl:when> 6470 <xsl:when test="$first-validation/表:校验类型/text()='decimal'"> 6471 <xsl:choose> 6472 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6473 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6474 </xsl:when> 6475 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6476 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6477 </xsl:when> 6478 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6479 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6480 </xsl:when> 6481 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6482 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6483 </xsl:when> 6484 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6485 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6486 </xsl:when> 6487 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6488 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6489 </xsl:when> 6490 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6491 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6492 </xsl:when> 6493 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6494 <xsl:value-of select="concat('oooc:cell-content-is-decimal-number() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6495 </xsl:when> 6496 </xsl:choose> 6497 </xsl:when> 6498 <xsl:when test="$first-validation/表:校验类型/text()='date'"> 6499 <xsl:choose> 6500 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6501 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6502 </xsl:when> 6503 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6504 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6505 </xsl:when> 6506 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6507 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6508 </xsl:when> 6509 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6510 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6511 </xsl:when> 6512 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6513 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6514 </xsl:when> 6515 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6516 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6517 </xsl:when> 6518 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6519 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6520 </xsl:when> 6521 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6522 <xsl:value-of select="concat('oooc:cell-content-is-date() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6523 </xsl:when> 6524 </xsl:choose> 6525 </xsl:when> 6526 <xsl:when test="$first-validation/表:校验类型/text()='time'"> 6527 <xsl:choose> 6528 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6529 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6530 </xsl:when> 6531 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6532 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6533 </xsl:when> 6534 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6535 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()=',$first-validation/表:第一操作数/text())"/> 6536 </xsl:when> 6537 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6538 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()!=',$first-validation/表:第一操作数/text())"/> 6539 </xsl:when> 6540 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6541 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()>',$first-validation/表:第一操作数/text())"/> 6542 </xsl:when> 6543 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6544 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()<',$first-validation/表:第一操作数/text())"/> 6545 </xsl:when> 6546 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6547 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()>=',$first-validation/表:第一操作数/text())"/> 6548 </xsl:when> 6549 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6550 <xsl:value-of select="concat('oooc:cell-content-is-time() and cell-content()<=',$first-validation/表:第一操作数/text())"/> 6551 </xsl:when> 6552 </xsl:choose> 6553 </xsl:when> 6554 <!-- add 20060317 --> 6555 <xsl:when test="$first-validation/表:校验类型/text()='cell range'"> 6556 <xsl:value-of select="concat('oooc:cell-content-is-in-list',$first-validation/表:第一操作数/text())"/> 6557 </xsl:when> 6558 <xsl:when test="$first-validation/表:校验类型/text()='list'"> 6559 <xsl:value-of select="concat('oooc:cell-content-is-in-list',$first-validation/表:第一操作数/text())"/> 6560 </xsl:when> 6561 <!-- add 20060317 end --> 6562 <xsl:when test="$first-validation/表:校验类型/text()='text length'"> 6563 <xsl:choose> 6564 <xsl:when test="$first-validation/表:操作码/text()='between' "> 6565 <xsl:value-of select="concat('oooc:cell-content-text-length-is-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6566 </xsl:when> 6567 <xsl:when test="$first-validation/表:操作码/text()='not between'"> 6568 <xsl:value-of select="concat('oooc:cell-content-text-length-is-not-between','(',$first-validation/表:第一操作数/text(),',',$first-validation/表:第二操作数/text(),')')"/> 6569 </xsl:when> 6570 <xsl:when test="$first-validation/表:操作码/text()='equal to'"> 6571 <xsl:value-of select="concat('oooc:cell-content-text-length()=',$first-validation/表:第一操作数/text())"/> 6572 </xsl:when> 6573 <xsl:when test="$first-validation/表:操作码/text()='not equal to'"> 6574 <xsl:value-of select="concat('oooc:cell-content-text-length()!=',$first-validation/表:第一操作数/text())"/> 6575 </xsl:when> 6576 <xsl:when test="$first-validation/表:操作码/text()='greater than'"> 6577 <xsl:value-of select="concat('oooc:cell-content-text-length()>',$first-validation/表:第一操作数/text())"/> 6578 </xsl:when> 6579 <xsl:when test="$first-validation/表:操作码/text()='less than'"> 6580 <xsl:value-of select="concat('oooc:cell-content-text-length()<',$first-validation/表:第一操作数/text())"/> 6581 </xsl:when> 6582 <xsl:when test="$first-validation/表:操作码/text()='greater than or equal to'"> 6583 <xsl:value-of select="concat('oooc:cell-content-text-length()>=',$first-validation/表:第一操作数/text())"/> 6584 </xsl:when> 6585 <xsl:when test="$first-validation/表:操作码/text()='less than or equal to'"> 6586 <xsl:value-of select="concat('oooc:cell-content-text-length()<=',$first-validation/表:第一操作数/text())"/> 6587 </xsl:when> 6588 </xsl:choose> 6589 </xsl:when> 6590 </xsl:choose> 6591 </xsl:variable> 6592 <xsl:element name="table:content-validation"> 6593 <xsl:attribute name="table:name"><xsl:value-of select="concat('val',count($first-validation/preceding-sibling::表:数据有效性)+1)"/></xsl:attribute> 6594 <xsl:attribute name="table:condition"><xsl:value-of select="$condition-text"/></xsl:attribute> 6595 <xsl:attribute name="table:allow-empty-cell"><xsl:value-of select="$first-validation/表:忽略空格/@表:值"/></xsl:attribute> 6596 <xsl:attribute name="table:base-cell-address"><xsl:value-of select="translate(substring-after($first-validation/表:区域/text(),':'),'$','')"/></xsl:attribute> 6597 <xsl:if test="$first-validation/表:输入提示"> 6598 <xsl:element name="table:help-message"> 6599 <xsl:attribute name="table:title"><xsl:value-of select="$first-validation/表:输入提示/@表:标题"/></xsl:attribute> 6600 <xsl:attribute name="table:display"><xsl:value-of select="$first-validation/表:输入提示/@表:显示"/></xsl:attribute> 6601 <xsl:element name="text:p"> 6602 <xsl:value-of select="$first-validation/表:输入提示/@表:内容"/> 6603 </xsl:element> 6604 </xsl:element> 6605 </xsl:if> 6606 <xsl:if test="$first-validation/表:错误提示"> 6607 <xsl:element name="table:error-message"> 6608 <xsl:attribute name="table:title"><xsl:value-of select="$first-validation/表:错误提示/@表:标题"/></xsl:attribute> 6609 <xsl:attribute name="table:display"><xsl:value-of select="$first-validation/表:错误提示/@表:显示"/></xsl:attribute> 6610 <xsl:attribute name="table:message-type"><xsl:value-of select="$first-validation/表:错误提示/@表:类型"/></xsl:attribute> 6611 <xsl:element name="text:p"> 6612 <xsl:value-of select="$first-validation/表:错误提示/@表:内容"/> 6613 </xsl:element> 6614 </xsl:element> 6615 </xsl:if> 6616 </xsl:element> 6617 <xsl:call-template name="create-content-validations"> 6618 <xsl:with-param name="validation-set" select="$validation-set[position()!=1]"/> 6619 </xsl:call-template> 6620 </xsl:if> 6621 </xsl:template> 6622 <!--RedOffice Comment from Zengjh:UOF0020 2006-04-26 charts--> 6623 <xsl:template match="表:图表"> 6624 <xsl:param name="table-name"/> 6625 <xsl:element name="draw:frame"> 6626 <xsl:attribute name="draw:z-index"><xsl:value-of select="'0'"/></xsl:attribute> 6627 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@表:宽度,$uofUnit)"/></xsl:attribute> 6628 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@表:高度,$uofUnit)"/></xsl:attribute> 6629 <xsl:attribute name="svg:x"><xsl:value-of select="concat(@表:x坐标,$uofUnit)"/></xsl:attribute> 6630 <xsl:attribute name="svg:y"><xsl:value-of select="concat(@表:y坐标,$uofUnit)"/></xsl:attribute> 6631 <xsl:variable name="chart-current"> 6632 <xsl:number level="any" count="表:图表" format="1"/> 6633 </xsl:variable> 6634 <xsl:attribute name="draw:style-name"><xsl:value-of select="concat('chart', $chart-current)"/></xsl:attribute> 6635 <xsl:variable name="series-value-start"> 6636 <xsl:for-each select="表:数据源/表:系列[position()='1']"> 6637 <xsl:value-of select="@表:系列值"/> 6638 </xsl:for-each> 6639 </xsl:variable> 6640 <xsl:variable name="series-value-end"> 6641 <xsl:for-each select="表:数据源/表:系列[position()=last()]"> 6642 <xsl:value-of select="@表:系列值"/> 6643 </xsl:for-each> 6644 </xsl:variable> 6645 <xsl:variable name="series-generate-type"> 6646 <xsl:choose> 6647 <xsl:when test="表:数据源/@表序号产生"> 6648 <xsl:value-of select="表:数据源/@表序号产生"/> 6649 </xsl:when> 6650 <xsl:when test="substring(substring-after($series-value-start,'!'),2,1)=substring(substring-after($series-value-start,':'),2,1)">row</xsl:when> 6651 <xsl:otherwise>col</xsl:otherwise> 6652 </xsl:choose> 6653 </xsl:variable> 6654 <xsl:element name="draw:object"> 6655 <xsl:attribute name="draw:notify-on-update-of-ranges"><xsl:value-of select="表:数据源/@表:数据区域"/></xsl:attribute> 6656 <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"> 6657 <xsl:call-template name="表:元数据"> 6658 <xsl:with-param name="table-name" select="$table-name"/> 6659 <xsl:with-param name="table-type" select="@表:类型"/> 6660 <xsl:with-param name="table-subtype" select="@表:子类型"/> 6661 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6662 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6663 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6664 </xsl:call-template> 6665 <xsl:call-template name="表:式样集"> 6666 <xsl:with-param name="table-name" select="$table-name"/> 6667 <xsl:with-param name="table-type" select="@表:类型"/> 6668 <xsl:with-param name="table-subtype" select="@表:子类型"/> 6669 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6670 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6671 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6672 </xsl:call-template> 6673 <xsl:call-template name="表:主体"> 6674 <xsl:with-param name="table-name" select="$table-name"/> 6675 <xsl:with-param name="table-type" select="@表:类型"/> 6676 <xsl:with-param name="table-subtype" select="@表:子类型"/> 6677 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6678 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6679 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6680 </xsl:call-template> 6681 </office:document> 6682 </xsl:element> 6683 <xsl:element name="draw:image"> 6684 <office:binary-data> 6685 <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象/uof:数据"/> 6686 </office:binary-data> 6687 </xsl:element> 6688 </xsl:element> 6689 </xsl:template> 6690 <xsl:template name="表:元数据"> 6691 <xsl:param name="table-name"/> 6692 <xsl:param name="table-type"/> 6693 <xsl:param name="table-subtype"/> 6694 <xsl:param name="series-value-start"/> 6695 <xsl:param name="series-value-end"/> 6696 <xsl:param name="series-generate-type"/> 6697 <xsl:for-each select="/uof:UOF/uof:元数据"> 6698 <office:meta> 6699 <meta:generator>OpenOffice.org 1.1.3 (Win32)</meta:generator> 6700 <xsl:if test="uof:标题"> 6701 <dc:title> 6702 <xsl:value-of select="uof:标题"/> 6703 </dc:title> 6704 </xsl:if> 6705 <xsl:if test="uof:摘要"> 6706 <dc:description> 6707 <xsl:value-of select="uof:摘要"/> 6708 </dc:description> 6709 </xsl:if> 6710 <xsl:if test="uof:主题"> 6711 <dc:subject> 6712 <xsl:value-of select="uof:主题"/> 6713 </dc:subject> 6714 </xsl:if> 6715 <xsl:if test="uof:作者"> 6716 <meta:initial-creator> 6717 <xsl:value-of select="uof:作者"/> 6718 </meta:initial-creator> 6719 </xsl:if> 6720 <xsl:if test="uof:创建日期"> 6721 <meta:creation-date> 6722 <xsl:value-of select="uof:创建日期"/> 6723 </meta:creation-date> 6724 </xsl:if> 6725 <xsl:if test="uof:最后作者"> 6726 <dc:creator> 6727 <xsl:value-of select="uof:最后作者"/> 6728 </dc:creator> 6729 </xsl:if> 6730 <xsl:if test="uof:编辑时间"> 6731 <meta:editing-duration> 6732 <xsl:value-of select="uof:编辑时间"/> 6733 </meta:editing-duration> 6734 </xsl:if> 6735 <dc:language/> 6736 <meta:keywords> 6737 <meta:keyword> 6738 <xsl:value-of select="uof:关键字集/uof:关键字"/> 6739 </meta:keyword> 6740 </meta:keywords> 6741 <xsl:if test="uof:编辑次数"> 6742 <meta:editing-cycles> 6743 <xsl:value-of select="uof:编辑次数"/> 6744 </meta:editing-cycles> 6745 </xsl:if> 6746 <xsl:if test="uof:分类"> 6747 <meta:user-defined meta:name="Category"> 6748 <xsl:value-of select="uof:分类"/> 6749 </meta:user-defined> 6750 </xsl:if> 6751 <xsl:if test="uof:经理名称"> 6752 <meta:user-defined meta:name="Manager"> 6753 <xsl:value-of select="uof:经理名称"/> 6754 </meta:user-defined> 6755 </xsl:if> 6756 <xsl:if test="uof:公司名称"> 6757 <meta:user-defined meta:name="Company"> 6758 <xsl:value-of select="uof:公司名称"/> 6759 </meta:user-defined> 6760 </xsl:if> 6761 <xsl:if test="uof:创建应用程序"> 6762 <meta:user-defined meta:name="Version"> 6763 <xsl:value-of select="uof:创建应用程序"/> 6764 </meta:user-defined> 6765 </xsl:if> 6766 </office:meta> 6767 </xsl:for-each> 6768 </xsl:template> 6769 <xsl:template name="表:式样集"> 6770 <xsl:param name="table-name"/> 6771 <xsl:param name="table-type"/> 6772 <xsl:param name="table-subtype"/> 6773 <xsl:param name="series-value-start"/> 6774 <xsl:param name="series-value-end"/> 6775 <xsl:param name="series-generate-type"/> 6776 <office:styles> 6777 <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"/> 6778 <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"/> 6779 <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"/> 6780 <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%"/> 6781 <draw:stroke-dash draw:name="Fine_20_Dotted" draw:display-name="Fine Dotted" draw:style="rect" draw:dots1="1" draw:distance="0.457cm"/> 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="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"/> 6785 <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%"/> 6786 <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%"/> 6787 <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"/> 6788 <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%"/> 6789 <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"/> 6790 <xsl:for-each select="//图:图片"> 6791 <xsl:variable name="chart-image-name" select="@图:名称"/> 6792 <draw:fill-image> 6793 <xsl:attribute name="draw:name"><xsl:value-of select="@图:名称"/></xsl:attribute> 6794 <office:binary-data> 6795 <xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$chart-image-name]"> 6796 <xsl:value-of select="uof:数据"/> 6797 </xsl:for-each> 6798 </office:binary-data> 6799 </draw:fill-image> 6800 </xsl:for-each> 6801 <xsl:for-each select="//图:图案"> 6802 <xsl:variable name="chart-hatch-name" select="@图:图形引用"/> 6803 <draw:hatch> 6804 <xsl:if test="@图:图形引用"> 6805 <xsl:attribute name="draw:name"><xsl:value-of select="$chart-hatch-name"/></xsl:attribute> 6806 </xsl:if> 6807 <xsl:if test="@图:类型"> 6808 <xsl:attribute name="draw:style"><xsl:value-of select="@图:类型"/></xsl:attribute> 6809 </xsl:if> 6810 <xsl:if test="@图:前景色"> 6811 <xsl:attribute name="draw:color"><xsl:value-of select="@图:前景色"/></xsl:attribute> 6812 </xsl:if> 6813 <xsl:if test="@图:距离"> 6814 <xsl:attribute name="draw:distance"><xsl:value-of select="@图:距离"/></xsl:attribute> 6815 </xsl:if> 6816 <xsl:if test="@图:旋转度"> 6817 <xsl:attribute name="draw:rotation"><xsl:value-of select="@图:旋转度"/></xsl:attribute> 6818 </xsl:if> 6819 </draw:hatch> 6820 </xsl:for-each> 6821 <xsl:for-each select="//图:渐变"> 6822 <draw:gradient> 6823 <xsl:if test="@图:图形引用"> 6824 <xsl:attribute name="draw:name"><xsl:value-of select="@图:图形引用"/></xsl:attribute> 6825 </xsl:if> 6826 <xsl:if test="@图:起始色"> 6827 <xsl:attribute name="draw:start-color"><xsl:value-of select="@图:起始色"/></xsl:attribute> 6828 </xsl:if> 6829 <xsl:if test="@图:终止色"> 6830 <xsl:attribute name="draw:end-color"><xsl:value-of select="@图:终止色"/></xsl:attribute> 6831 </xsl:if> 6832 <xsl:if test="@图:种子类型"> 6833 <xsl:attribute name="draw:style"><xsl:value-of select="@图:种子类型"/></xsl:attribute> 6834 </xsl:if> 6835 <xsl:if test="@图:起始浓度"> 6836 <xsl:attribute name="draw:start-intensity"><xsl:value-of select="@图:起始浓度"/></xsl:attribute> 6837 </xsl:if> 6838 <xsl:if test="@图:终止浓度"> 6839 <xsl:attribute name="draw:end-intensity"><xsl:value-of select="@图:终止浓度"/></xsl:attribute> 6840 </xsl:if> 6841 <xsl:if test="@图:渐变方向"> 6842 <xsl:attribute name="draw:angle"><xsl:value-of select="@图:渐变方向"/></xsl:attribute> 6843 </xsl:if> 6844 <xsl:if test="@图:边界"> 6845 <xsl:attribute name="draw:border"><xsl:value-of select="@图:边界"/></xsl:attribute> 6846 </xsl:if> 6847 <xsl:if test="@图:种子X位置"> 6848 <xsl:attribute name="draw:cx"><xsl:value-of select="@图:种子X位置"/></xsl:attribute> 6849 </xsl:if> 6850 <xsl:if test="@图:种子Y位置"> 6851 <xsl:attribute name="draw:cy"><xsl:value-of select="@图:种子Y位置"/></xsl:attribute> 6852 </xsl:if> 6853 </draw:gradient> 6854 </xsl:for-each> 6855 </office:styles> 6856 <office:automatic-styles> 6857 <xsl:for-each select="node( )"> 6858 <xsl:choose> 6859 <xsl:when test="name(.)='表:图表区'"> 6860 <xsl:call-template name="表:图表区式样"> 6861 <xsl:with-param name="table-name" select="$table-name"/> 6862 <xsl:with-param name="table-type" select="$table-type"/> 6863 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6864 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6865 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6866 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6867 </xsl:call-template> 6868 </xsl:when> 6869 <xsl:when test="name(.)='表:绘图区'"> 6870 <xsl:call-template name="表:绘图区式样"> 6871 <xsl:with-param name="table-name" select="$table-name"/> 6872 <xsl:with-param name="table-type" select="$table-type"/> 6873 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6874 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6875 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6876 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6877 </xsl:call-template> 6878 <xsl:call-template name="表:图表背景墙式样"> 6879 <xsl:with-param name="table-name" select="$table-name"/> 6880 <xsl:with-param name="table-type" select="$table-type"/> 6881 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6882 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6883 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6884 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6885 </xsl:call-template> 6886 </xsl:when> 6887 <xsl:when test="name(.)='表:分类轴'"> 6888 <xsl:call-template name="表:分类轴式样"> 6889 <xsl:with-param name="table-name" select="$table-name"/> 6890 <xsl:with-param name="table-type" select="$table-type"/> 6891 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6892 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6893 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6894 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6895 </xsl:call-template> 6896 </xsl:when> 6897 <xsl:when test="name(.)='表:数值轴'"> 6898 <xsl:call-template name="表:数值轴式样"> 6899 <xsl:with-param name="table-name" select="$table-name"/> 6900 <xsl:with-param name="table-type" select="$table-type"/> 6901 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6902 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6903 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6904 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6905 </xsl:call-template> 6906 </xsl:when> 6907 <xsl:when test="name(.)='表:图例'"> 6908 <xsl:call-template name="表:图例式样"> 6909 <xsl:with-param name="table-name" select="$table-name"/> 6910 <xsl:with-param name="table-type" select="$table-type"/> 6911 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6912 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6913 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6914 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6915 </xsl:call-template> 6916 </xsl:when> 6917 <xsl:when test="name(.)='表:数据表'"> 6918 <xsl:call-template name="表:数据表式样"> 6919 <xsl:with-param name="table-name" select="$table-name"/> 6920 <xsl:with-param name="table-type" select="$table-type"/> 6921 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6922 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6923 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6924 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6925 </xsl:call-template> 6926 </xsl:when> 6927 <xsl:when test="name(.)='表:数据系列集'"> 6928 <xsl:call-template name="表:数据系列集式样"> 6929 <xsl:with-param name="table-name" select="$table-name"/> 6930 <xsl:with-param name="table-type" select="$table-type"/> 6931 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6932 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6933 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6934 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6935 </xsl:call-template> 6936 </xsl:when> 6937 <xsl:when test="name(.)='表:数据点集'"> 6938 <xsl:call-template name="表:数据点集式样"> 6939 <xsl:with-param name="table-name" select="$table-name"/> 6940 <xsl:with-param name="table-type" select="$table-type"/> 6941 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6942 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6943 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6944 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6945 </xsl:call-template> 6946 </xsl:when> 6947 <xsl:when test="name(.)='表:网格线集'"> 6948 <xsl:call-template name="表:网格线集式样"> 6949 <xsl:with-param name="table-name" select="$table-name"/> 6950 <xsl:with-param name="table-type" select="$table-type"/> 6951 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6952 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6953 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6954 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6955 </xsl:call-template> 6956 </xsl:when> 6957 <xsl:when test="name(.)='表:数据源'"> 6958 <xsl:call-template name="表:数据源式样"> 6959 <xsl:with-param name="table-name" select="$table-name"/> 6960 <xsl:with-param name="table-type" select="$table-type"/> 6961 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6962 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6963 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6964 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6965 </xsl:call-template> 6966 </xsl:when> 6967 <xsl:when test="name(.)='表:标题集'"> 6968 <xsl:call-template name="表:标题集式样"> 6969 <xsl:with-param name="table-name" select="$table-name"/> 6970 <xsl:with-param name="table-type" select="$table-type"/> 6971 <xsl:with-param name="table-subtype" select="$table-subtype"/> 6972 <xsl:with-param name="series-value-start" select="$series-value-start"/> 6973 <xsl:with-param name="series-value-end" select="$series-value-end"/> 6974 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 6975 </xsl:call-template> 6976 </xsl:when> 6977 <xsl:otherwise/> 6978 </xsl:choose> 6979 </xsl:for-each> 6980 </office:automatic-styles> 6981 </xsl:template> 6982 <xsl:template name="表:主体"> 6983 <xsl:param name="table-name"/> 6984 <xsl:param name="table-type"/> 6985 <xsl:param name="table-subtype"/> 6986 <xsl:param name="series-value-start"/> 6987 <xsl:param name="series-value-end"/> 6988 <xsl:param name="series-generate-type"/> 6989 <office:body> 6990 <office:chart> 6991 <chart:chart> 6992 <xsl:attribute name="svg:width"><xsl:value-of select="concat(@表:宽度,$uofUnit)"/></xsl:attribute> 6993 <xsl:attribute name="svg:height"><xsl:value-of select="concat(@表:高度,$uofUnit)"/></xsl:attribute> 6994 <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> 6995 <xsl:attribute name="chart:style-name">chart-area</xsl:attribute> 6996 <xsl:for-each select="表:标题集/表:标题[@表:位置='chart']"> 6997 <chart:title chart:style-name="chart-title"> 6998 <text:p> 6999 <xsl:value-of select="@表:名称"/> 7000 </text:p> 7001 </chart:title> 7002 </xsl:for-each> 7003 <xsl:call-template name="表:图例区域"> 7004 <xsl:with-param name="table-name" select="$table-name"/> 7005 <xsl:with-param name="table-type" select="$table-type"/> 7006 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7007 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7008 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7009 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7010 </xsl:call-template> 7011 <xsl:call-template name="表:绘图区域"> 7012 <xsl:with-param name="table-name" select="$table-name"/> 7013 <xsl:with-param name="table-type" select="$table-type"/> 7014 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7015 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7016 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7017 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7018 </xsl:call-template> 7019 <xsl:call-template name="表:本地表"> 7020 <xsl:with-param name="table-name" select="$table-name"/> 7021 <xsl:with-param name="table-type" select="$table-type"/> 7022 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7023 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7024 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7025 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7026 </xsl:call-template> 7027 </chart:chart> 7028 </office:chart> 7029 </office:body> 7030 </xsl:template> 7031 <xsl:template name="表:图例区域"> 7032 <xsl:param name="table-name"/> 7033 <xsl:param name="table-type"/> 7034 <xsl:param name="table-subtype"/> 7035 <xsl:param name="series-value-start"/> 7036 <xsl:param name="series-value-end"/> 7037 <xsl:param name="series-generate-type"/> 7038 <chart:legend> 7039 <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> 7040 <xsl:attribute name="svg:x"><xsl:value-of select="concat(表:图例/@表:x坐标,$uofUnit)"/></xsl:attribute> 7041 <xsl:attribute name="svg:y"><xsl:value-of select="concat(表:图例/@表:y坐标,$uofUnit)"/></xsl:attribute> 7042 <xsl:attribute name="chart:style-name">legend</xsl:attribute> 7043 </chart:legend> 7044 </xsl:template> 7045 <xsl:template name="表:绘图区域"> 7046 <xsl:param name="table-name"/> 7047 <xsl:param name="table-type"/> 7048 <xsl:param name="table-subtype"/> 7049 <xsl:param name="series-value-start"/> 7050 <xsl:param name="series-value-end"/> 7051 <xsl:param name="series-generate-type"/> 7052 <chart:plot-area> 7053 <xsl:variable name="start-range"> 7054 <xsl:value-of select="concat('.$',substring(substring-after($series-value-start,'!'),1,1),'$',substring-before(substring(substring-after($series-value-start,'!'),2),':'))"/> 7055 </xsl:variable> 7056 <xsl:variable name="end-range"> 7057 <xsl:value-of select="concat(':.$',substring(substring-after($series-value-end,':'),1,1),'$',substring(substring-after($series-value-end,':'),2))"/> 7058 </xsl:variable> 7059 <xsl:attribute name="chart:style-name">plot-area</xsl:attribute> 7060 <xsl:attribute name="table:cell-range-address"><xsl:value-of select="concat($table-name,$start-range,$end-range)"/></xsl:attribute> 7061 <!--xsl:value-of select="表:数据源/@表:数据区域"/--> 7062 <xsl:attribute name="chart:table-number-list">0</xsl:attribute> 7063 <xsl:attribute name="svg:width"><xsl:value-of select="concat(表:绘图区/@表:宽度,$uofUnit)"/></xsl:attribute> 7064 <xsl:attribute name="svg:height"><xsl:value-of select="concat(表:绘图区/@表:高度,$uofUnit)"/></xsl:attribute> 7065 <xsl:attribute name="svg:x"><xsl:value-of select="concat(表:绘图区/@表:x坐标,$uofUnit)"/></xsl:attribute> 7066 <xsl:attribute name="svg:y"><xsl:value-of select="concat(表:绘图区/@表:y坐标,$uofUnit)"/></xsl:attribute> 7067 <xsl:if test="表:分类轴"> 7068 <chart:axis chart:dimension="x" chart:name="primary-x" chart:style-name="category-axis"> 7069 <xsl:for-each select="表:标题集/表:标题[@表:位置='category axis']"> 7070 <chart:title chart:style-name="category-axis-title"> 7071 <text:p> 7072 <xsl:value-of select="@表:名称"/> 7073 </text:p> 7074 </chart:title> 7075 </xsl:for-each> 7076 <chart:categories/> 7077 <xsl:if test="表:网格线集/表:网格线[@表:位置='category axis']"> 7078 <chart:grid chart:style-name="category-axis-grid" chart:class="major"/> 7079 </xsl:if> 7080 </chart:axis> 7081 </xsl:if> 7082 <xsl:if test="表:数值轴"> 7083 <chart:axis chart:dimension="y" chart:name="primary-y" chart:style-name="value-axis"> 7084 <xsl:for-each select="表:标题集/表:标题[@表:位置='value axis']"> 7085 <chart:title chart:style-name="value-axis-title"> 7086 <text:p> 7087 <xsl:value-of select="@表:名称"/> 7088 </text:p> 7089 </chart:title> 7090 </xsl:for-each> 7091 <chart:grid chart:style-name="value-axis-grid" chart:class="major"/> 7092 </chart:axis> 7093 </xsl:if> 7094 <xsl:call-template name="表:数据组"> 7095 <xsl:with-param name="table-name" select="$table-name"/> 7096 <xsl:with-param name="table-type" select="$table-type"/> 7097 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7098 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7099 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7100 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7101 </xsl:call-template> 7102 <chart:wall> 7103 <xsl:attribute name="chart:style-name">chart-wall</xsl:attribute> 7104 </chart:wall> 7105 <chart:floor> 7106 <xsl:attribute name="chart:style-name">chart-floor</xsl:attribute> 7107 </chart:floor> 7108 </chart:plot-area> 7109 </xsl:template> 7110 <xsl:template name="表:本地表"> 7111 <xsl:param name="table-name"/> 7112 <xsl:param name="table-type"/> 7113 <xsl:param name="table-subtype"/> 7114 <xsl:param name="series-value-start"/> 7115 <xsl:param name="series-value-end"/> 7116 <xsl:param name="series-generate-type"/> 7117 <table:table table:name="local-table"> 7118 <table:table-header-columns> 7119 <xsl:call-template name="表:本地表_表头列"> 7120 <xsl:with-param name="table-name" select="$table-name"/> 7121 <xsl:with-param name="table-type" select="$table-type"/> 7122 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7123 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7124 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7125 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7126 <xsl:with-param name="sum" select="1"/> 7127 </xsl:call-template> 7128 </table:table-header-columns> 7129 <table:table-columns> 7130 <xsl:variable name="column-sum"> 7131 <xsl:value-of select="count(表:数据源/表:系列)"/> 7132 </xsl:variable> 7133 <xsl:call-template name="表:本地表_列"> 7134 <xsl:with-param name="table-name" select="$table-name"/> 7135 <xsl:with-param name="table-type" select="$table-type"/> 7136 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7137 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7138 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7139 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7140 <xsl:with-param name="column-sum" select="$column-sum"/> 7141 </xsl:call-template> 7142 </table:table-columns> 7143 <table:table-header-rows> 7144 <xsl:call-template name="表:本地表_表头行"> 7145 <xsl:with-param name="table-name" select="$table-name"/> 7146 <xsl:with-param name="table-type" select="$table-type"/> 7147 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7148 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7149 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7150 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7151 <xsl:with-param name="row-current" select="1"/> 7152 <xsl:with-param name="fixed-row-sum" select="'1'"/> 7153 </xsl:call-template> 7154 </table:table-header-rows> 7155 <table:table-rows> 7156 <xsl:variable name="row-start"> 7157 <xsl:value-of select="substring-before(substring(substring-after($series-value-start,'!'),2),':')"/> 7158 </xsl:variable> 7159 <xsl:variable name="row-end"> 7160 <xsl:value-of select="substring(substring-after($series-value-end,':'),2)"/> 7161 </xsl:variable> 7162 <xsl:variable name="fixed-row-sum"> 7163 <xsl:value-of select="$row-end -$row-start +1"/> 7164 </xsl:variable> 7165 <xsl:call-template name="表:本地表_行"> 7166 <xsl:with-param name="table-name" select="$table-name"/> 7167 <xsl:with-param name="table-type" select="$table-type"/> 7168 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7169 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7170 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7171 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7172 <xsl:with-param name="row-current" select="'1'"/> 7173 <xsl:with-param name="fixed-row-sum" select="$fixed-row-sum"/> 7174 </xsl:call-template> 7175 </table:table-rows> 7176 </table:table> 7177 </xsl:template> 7178 <xsl:template name="表:本地表_表头列"> 7179 <xsl:param name="table-name"/> 7180 <xsl:param name="table-type"/> 7181 <xsl:param name="table-subtype"/> 7182 <xsl:param name="series-value-start"/> 7183 <xsl:param name="series-value-end"/> 7184 <xsl:param name="series-generate-type"/> 7185 <xsl:param name="sum"/> 7186 <xsl:choose> 7187 <xsl:when test="$sum=0"/> 7188 <xsl:otherwise> 7189 <table:table-column/> 7190 <xsl:call-template name="表:本地表_表头列"> 7191 <xsl:with-param name="sum" select="$sum -1"/> 7192 </xsl:call-template> 7193 </xsl:otherwise> 7194 </xsl:choose> 7195 </xsl:template> 7196 <xsl:template name="表:本地表_列"> 7197 <xsl:param name="table-name"/> 7198 <xsl:param name="table-type"/> 7199 <xsl:param name="table-subtype"/> 7200 <xsl:param name="series-value-start"/> 7201 <xsl:param name="series-value-end"/> 7202 <xsl:param name="series-generate-type"/> 7203 <xsl:param name="column-sum"/> 7204 <xsl:choose> 7205 <xsl:when test="$column-sum=0"/> 7206 <xsl:otherwise> 7207 <table:table-column/> 7208 <xsl:call-template name="表:本地表_列"> 7209 <xsl:with-param name="column-sum" select="$column-sum -1"/> 7210 </xsl:call-template> 7211 </xsl:otherwise> 7212 </xsl:choose> 7213 </xsl:template> 7214 <xsl:template name="表:本地表_表头行"> 7215 <xsl:param name="table-name"/> 7216 <xsl:param name="table-type"/> 7217 <xsl:param name="table-subtype"/> 7218 <xsl:param name="series-value-start"/> 7219 <xsl:param name="series-value-end"/> 7220 <xsl:param name="series-generate-type"/> 7221 <xsl:param name="row-current"/> 7222 <xsl:param name="fixed-row-sum"/> 7223 <xsl:choose> 7224 <xsl:when test="$row-current >$fixed-row-sum"/> 7225 <xsl:otherwise> 7226 <table:table-row> 7227 <xsl:variable name="series-value-current"> 7228 <xsl:for-each select="表:数据源/表:系列[position()=$row-current]"> 7229 <xsl:value-of select="@表:系列值"/> 7230 </xsl:for-each> 7231 </xsl:variable> 7232 <xsl:variable name="cell-start"> 7233 <xsl:call-template name="General-Char-Transition"> 7234 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7235 <xsl:with-param name="output-type" select="'ARABIC'"/> 7236 </xsl:call-template> 7237 </xsl:variable> 7238 <xsl:variable name="cell-end"> 7239 <xsl:choose> 7240 <xsl:when test="$series-generate-type='row'"> 7241 <xsl:call-template name="General-Char-Transition"> 7242 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,':'),1,1)"/> 7243 <xsl:with-param name="output-type" select="'ARABIC'"/> 7244 </xsl:call-template> 7245 </xsl:when> 7246 <xsl:otherwise> 7247 <xsl:call-template name="General-Char-Transition"> 7248 <xsl:with-param name="input-char" select="substring(substring-after($series-value-end,'!'),1,1)"/> 7249 <xsl:with-param name="output-type" select="'ARABIC'"/> 7250 </xsl:call-template> 7251 </xsl:otherwise> 7252 </xsl:choose> 7253 </xsl:variable> 7254 <xsl:variable name="cell-sum"> 7255 <xsl:value-of select="$cell-end -$cell-start +2"/> 7256 </xsl:variable> 7257 <xsl:variable name="fixed-cell-sum" select="$cell-sum"/> 7258 <xsl:call-template name="表:本地表_表头行_单元格"> 7259 <xsl:with-param name="table-name" select="$table-name"/> 7260 <xsl:with-param name="table-type" select="$table-type"/> 7261 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7262 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7263 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7264 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7265 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7266 <xsl:with-param name="row-current" select="$row-current"/> 7267 <xsl:with-param name="cell-sum" select="$cell-sum"/> 7268 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7269 </xsl:call-template> 7270 </table:table-row> 7271 <xsl:call-template name="表:本地表_表头行"> 7272 <xsl:with-param name="table-name" select="$table-name"/> 7273 <xsl:with-param name="table-type" select="$table-type"/> 7274 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7275 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7276 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7277 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7278 <xsl:with-param name="row-current" select="$row-current +1"/> 7279 <xsl:with-param name="fixed-row-sum" select="$fixed-row-sum"/> 7280 </xsl:call-template> 7281 </xsl:otherwise> 7282 </xsl:choose> 7283 </xsl:template> 7284 <xsl:template name="表:本地表_表头行_单元格"> 7285 <xsl:param name="table-name"/> 7286 <xsl:param name="table-type"/> 7287 <xsl:param name="table-subtype"/> 7288 <xsl:param name="series-value-start"/> 7289 <xsl:param name="series-value-end"/> 7290 <xsl:param name="series-generate-type"/> 7291 <xsl:param name="series-value-current"/> 7292 <xsl:param name="row-current"/> 7293 <xsl:param name="cell-sum"/> 7294 <xsl:param name="fixed-cell-sum"/> 7295 <xsl:choose> 7296 <xsl:when test="$cell-sum=0"/> 7297 <xsl:otherwise> 7298 <xsl:choose> 7299 <xsl:when test="$fixed-cell-sum=$cell-sum"> 7300 <table:table-cell> 7301 <text:p/> 7302 </table:table-cell> 7303 </xsl:when> 7304 <xsl:otherwise> 7305 <table:table-cell office:value-type="string"> 7306 <xsl:variable name="cell-no"> 7307 <xsl:value-of select="$fixed-cell-sum -$cell-sum +1"/> 7308 </xsl:variable> 7309 <xsl:variable name="cell-start"> 7310 <xsl:call-template name="General-Char-Transition"> 7311 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7312 <xsl:with-param name="output-type" select="'ARABIC'"/> 7313 </xsl:call-template> 7314 </xsl:variable> 7315 <xsl:variable name="char"> 7316 <xsl:call-template name="General-Char-Transition"> 7317 <xsl:with-param name="input-char" select="$cell-start +$cell-no -2"/> 7318 <xsl:with-param name="output-type" select="'CHARS_UPPER_LETTER'"/> 7319 </xsl:call-template> 7320 </xsl:variable> 7321 <text:p> 7322 <xsl:value-of select="concat('列 ',$char)"/> 7323 </text:p> 7324 </table:table-cell> 7325 </xsl:otherwise> 7326 </xsl:choose> 7327 <xsl:call-template name="表:本地表_表头行_单元格"> 7328 <xsl:with-param name="table-name" select="$table-name"/> 7329 <xsl:with-param name="table-type" select="$table-type"/> 7330 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7331 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7332 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7333 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7334 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7335 <xsl:with-param name="row-current" select="$row-current"/> 7336 <xsl:with-param name="cell-sum" select="$cell-sum -1"/> 7337 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7338 </xsl:call-template> 7339 </xsl:otherwise> 7340 </xsl:choose> 7341 </xsl:template> 7342 <xsl:template name="表:本地表_行"> 7343 <xsl:param name="table-name"/> 7344 <xsl:param name="table-type"/> 7345 <xsl:param name="table-subtype"/> 7346 <xsl:param name="series-value-start"/> 7347 <xsl:param name="series-value-end"/> 7348 <xsl:param name="series-generate-type"/> 7349 <xsl:param name="row-current"/> 7350 <xsl:param name="fixed-row-sum"/> 7351 <xsl:choose> 7352 <xsl:when test="$row-current >$fixed-row-sum"/> 7353 <xsl:otherwise> 7354 <xsl:variable name="series-value-current"> 7355 <xsl:for-each select="表:数据源/表:系列[position()=$row-current]"> 7356 <xsl:value-of select="@表:系列值"/> 7357 </xsl:for-each> 7358 </xsl:variable> 7359 <table:table-row> 7360 <xsl:variable name="cell-start"> 7361 <xsl:call-template name="General-Char-Transition"> 7362 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7363 <xsl:with-param name="output-type" select="'ARABIC'"/> 7364 </xsl:call-template> 7365 </xsl:variable> 7366 <xsl:variable name="cell-end"> 7367 <xsl:choose> 7368 <xsl:when test="$series-generate-type='row'"> 7369 <xsl:call-template name="General-Char-Transition"> 7370 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,':'),1,1)"/> 7371 <xsl:with-param name="output-type" select="'ARABIC'"/> 7372 </xsl:call-template> 7373 </xsl:when> 7374 <xsl:otherwise> 7375 <xsl:call-template name="General-Char-Transition"> 7376 <xsl:with-param name="input-char" select="substring(substring-after($series-value-end,'!'),1,1)"/> 7377 <xsl:with-param name="output-type" select="'ARABIC'"/> 7378 </xsl:call-template> 7379 </xsl:otherwise> 7380 </xsl:choose> 7381 </xsl:variable> 7382 <xsl:variable name="cell-sum"> 7383 <xsl:value-of select="$cell-end -$cell-start +2"/> 7384 </xsl:variable> 7385 <xsl:variable name="fixed-cell-sum" select="$cell-sum"/> 7386 <xsl:call-template name="表:本地表_行_单元格"> 7387 <xsl:with-param name="table-name" select="$table-name"/> 7388 <xsl:with-param name="table-type" select="$table-type"/> 7389 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7390 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7391 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7392 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7393 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7394 <xsl:with-param name="row-current" select="$row-current"/> 7395 <xsl:with-param name="cell-sum" select="$cell-sum"/> 7396 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7397 </xsl:call-template> 7398 </table:table-row> 7399 <xsl:call-template name="表:本地表_行"> 7400 <xsl:with-param name="table-name" select="$table-name"/> 7401 <xsl:with-param name="table-type" select="$table-type"/> 7402 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7403 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7404 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7405 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7406 <xsl:with-param name="row-current" select="$row-current +1"/> 7407 <xsl:with-param name="fixed-row-sum" select="$fixed-row-sum"/> 7408 </xsl:call-template> 7409 </xsl:otherwise> 7410 </xsl:choose> 7411 </xsl:template> 7412 <xsl:template name="表:本地表_行_单元格"> 7413 <xsl:param name="table-name"/> 7414 <xsl:param name="table-type"/> 7415 <xsl:param name="table-subtype"/> 7416 <xsl:param name="series-value-start"/> 7417 <xsl:param name="series-value-end"/> 7418 <xsl:param name="series-generate-type"/> 7419 <xsl:param name="series-value-current"/> 7420 <xsl:param name="row-current"/> 7421 <xsl:param name="cell-sum"/> 7422 <xsl:param name="fixed-cell-sum"/> 7423 <xsl:choose> 7424 <xsl:when test="$cell-sum=0"/> 7425 <xsl:otherwise> 7426 <xsl:variable name="cell-start"> 7427 <xsl:call-template name="General-Char-Transition"> 7428 <xsl:with-param name="input-char" select="substring(substring-after($series-value-start,'!'),1,1)"/> 7429 <xsl:with-param name="output-type" select="'ARABIC'"/> 7430 </xsl:call-template> 7431 </xsl:variable> 7432 <xsl:variable name="cell-no"> 7433 <xsl:value-of select="$cell-start +$fixed-cell-sum -$cell-sum -1"/> 7434 </xsl:variable> 7435 <xsl:variable name="row-start"> 7436 <xsl:value-of select="substring(substring-after($series-value-start,'!'),2,1)"/> 7437 </xsl:variable> 7438 <xsl:variable name="row-no"> 7439 <xsl:value-of select="$row-start +$row-current -1"/> 7440 </xsl:variable> 7441 <xsl:choose> 7442 <xsl:when test="$fixed-cell-sum=$cell-sum"> 7443 <table:table-cell office:value-type="string"> 7444 <text:p> 7445 <xsl:value-of select="concat('行 ',$row-no)"/> 7446 </text:p> 7447 </table:table-cell> 7448 </xsl:when> 7449 <xsl:otherwise> 7450 <table:table-cell office:value-type="float"> 7451 <xsl:variable name="cell-content"> 7452 <xsl:choose> 7453 <xsl:when test="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行/@表:行号"> 7454 <xsl:for-each select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行[@表:行号=$row-no]"> 7455 <xsl:for-each select="表:单元格[@表:列号=$cell-no]"> 7456 <xsl:value-of select="表:数据/字:句/字:文本串"/> 7457 </xsl:for-each> 7458 </xsl:for-each> 7459 </xsl:when> 7460 <xsl:otherwise> 7461 <xsl:for-each select="/uof:UOF/uof:电子表格/表:主体/表:工作表/表:工作表内容/表:行[position()=$row-no]"> 7462 <xsl:for-each select="表:单元格[position()=$cell-no]"> 7463 <xsl:value-of select="表:数据/字:句/字:文本串"/> 7464 </xsl:for-each> 7465 </xsl:for-each> 7466 </xsl:otherwise> 7467 </xsl:choose> 7468 </xsl:variable> 7469 <xsl:attribute name="office:value"><xsl:value-of select="$cell-content"/></xsl:attribute> 7470 <text:p> 7471 <xsl:value-of select="$cell-content"/> 7472 </text:p> 7473 </table:table-cell> 7474 </xsl:otherwise> 7475 </xsl:choose> 7476 <xsl:call-template name="表:本地表_行_单元格"> 7477 <xsl:with-param name="table-name" select="$table-name"/> 7478 <xsl:with-param name="table-type" select="$table-type"/> 7479 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7480 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7481 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7482 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7483 <xsl:with-param name="series-value-current" select="$series-value-current"/> 7484 <xsl:with-param name="row-current" select="$row-current"/> 7485 <xsl:with-param name="cell-sum" select="$cell-sum -1"/> 7486 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7487 </xsl:call-template> 7488 </xsl:otherwise> 7489 </xsl:choose> 7490 </xsl:template> 7491 <xsl:template name="表:数据组"> 7492 <xsl:param name="table-name"/> 7493 <xsl:param name="table-type"/> 7494 <xsl:param name="table-subtype"/> 7495 <xsl:param name="series-value-start"/> 7496 <xsl:param name="series-value-end"/> 7497 <xsl:param name="series-generate-type"/> 7498 <xsl:variable name="input-char-start"> 7499 <xsl:choose> 7500 <xsl:when test="$series-generate-type='row'"> 7501 <xsl:value-of select="substring(substring-after($series-value-start,'!'),1,1)"/> 7502 </xsl:when> 7503 <xsl:otherwise> 7504 <xsl:value-of select="substring-before(substring(substring-after($series-value-start,'!'),2),':')"/> 7505 </xsl:otherwise> 7506 </xsl:choose> 7507 </xsl:variable> 7508 <xsl:variable name="input-char-end"> 7509 <xsl:choose> 7510 <xsl:when test="$series-generate-type='row'"> 7511 <xsl:value-of select="substring(substring-after($series-value-start,':'),1,1)"/> 7512 </xsl:when> 7513 <xsl:otherwise> 7514 <xsl:value-of select="substring(substring-after($series-value-start,':'),2)"/> 7515 </xsl:otherwise> 7516 </xsl:choose> 7517 </xsl:variable> 7518 <xsl:variable name="cell-start"> 7519 <xsl:call-template name="General-Char-Transition"> 7520 <xsl:with-param name="input-char" select="$input-char-start"/> 7521 <xsl:with-param name="output-type" select="'ARABIC'"/> 7522 </xsl:call-template> 7523 </xsl:variable> 7524 <xsl:variable name="cell-end"> 7525 <xsl:call-template name="General-Char-Transition"> 7526 <xsl:with-param name="input-char" select="$input-char-end"/> 7527 <xsl:with-param name="output-type" select="'ARABIC'"/> 7528 </xsl:call-template> 7529 </xsl:variable> 7530 <xsl:variable name="fixed-cell-sum"> 7531 <xsl:value-of select="$cell-end -$cell-start +1"/> 7532 </xsl:variable> 7533 <xsl:for-each select="表:数据系列集/表:数据系列"> 7534 <chart:series> 7535 <xsl:attribute name="chart:style-name"><xsl:value-of select="concat('data-series',position())"/></xsl:attribute> 7536 <xsl:call-template name="表:数据点"> 7537 <xsl:with-param name="table-name" select="$table-name"/> 7538 <xsl:with-param name="table-type" select="$table-type"/> 7539 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7540 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7541 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7542 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7543 <xsl:with-param name="data-series-current" select="position()"/> 7544 <xsl:with-param name="cell-current" select="'1'"/> 7545 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7546 </xsl:call-template> 7547 </chart:series> 7548 </xsl:for-each> 7549 </xsl:template> 7550 <xsl:template name="表:数据点"> 7551 <xsl:param name="table-name"/> 7552 <xsl:param name="table-type"/> 7553 <xsl:param name="table-subtype"/> 7554 <xsl:param name="series-value-start"/> 7555 <xsl:param name="series-value-end"/> 7556 <xsl:param name="series-generate-type"/> 7557 <xsl:param name="data-series-current"/> 7558 <xsl:param name="cell-current"/> 7559 <xsl:param name="fixed-cell-sum"/> 7560 <xsl:choose> 7561 <xsl:when test="$cell-current>$fixed-cell-sum"/> 7562 <xsl:otherwise> 7563 <chart:data-point> 7564 <xsl:attribute name="chart:style-name"><xsl:value-of select="concat('data-point',$data-series-current,$cell-current)"/></xsl:attribute> 7565 </chart:data-point> 7566 <xsl:call-template name="表:数据点"> 7567 <xsl:with-param name="table-name" select="$table-name"/> 7568 <xsl:with-param name="table-type" select="$table-type"/> 7569 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7570 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7571 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7572 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7573 <xsl:with-param name="data-series-current" select="$data-series-current"/> 7574 <xsl:with-param name="cell-current" select="$cell-current +1"/> 7575 <xsl:with-param name="fixed-cell-sum" select="$fixed-cell-sum"/> 7576 </xsl:call-template> 7577 </xsl:otherwise> 7578 </xsl:choose> 7579 </xsl:template> 7580 <xsl:template name="表:图表区式样"> 7581 <xsl:param name="table-name"/> 7582 <xsl:param name="table-type"/> 7583 <xsl:param name="table-subtype"/> 7584 <xsl:param name="series-value-start"/> 7585 <xsl:param name="series-value-end"/> 7586 <xsl:param name="series-generate-type"/> 7587 <style:style style:name="chart-area" style:family="chart"> 7588 <xsl:for-each select="node()"> 7589 <xsl:choose> 7590 <xsl:when test="name(.)='表:边框'"> 7591 <style:graphic-properties> 7592 <xsl:call-template name="uof:边框"/> 7593 </style:graphic-properties> 7594 </xsl:when> 7595 <xsl:when test="name(.)='表:填充'"> 7596 <style:graphic-properties> 7597 <xsl:call-template name="图:填充类型"/> 7598 </style:graphic-properties> 7599 </xsl:when> 7600 <xsl:when test="name(.)='表:字体'"> 7601 <style:text-properties> 7602 <xsl:call-template name="字:句属性类型"/> 7603 </style:text-properties> 7604 </xsl:when> 7605 </xsl:choose> 7606 </xsl:for-each> 7607 </style:style> 7608 </xsl:template> 7609 <xsl:template name="表:绘图区式样"> 7610 <xsl:param name="table-name"/> 7611 <xsl:param name="table-type"/> 7612 <xsl:param name="table-subtype"/> 7613 <xsl:param name="series-value-start"/> 7614 <xsl:param name="series-value-end"/> 7615 <xsl:param name="series-generate-type"/> 7616 <style:style style:name="plot-area" style:family="chart"> 7617 <style:chart-properties> 7618 <xsl:choose> 7619 <xsl:when test="$table-subtype='bar_stacked' or $table-subtype='column_stacked' or $table-subtype='line_stacked'"> 7620 <xsl:attribute name="chart:stacked">true</xsl:attribute> 7621 </xsl:when> 7622 <xsl:when test="$table-subtype='bar_percent' or $table-subtype='column_percent' or $table-subtype='line_percent'"> 7623 <xsl:attribute name="chart:percentage">true</xsl:attribute> 7624 </xsl:when> 7625 </xsl:choose> 7626 <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> 7627 <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> 7628 </style:chart-properties> 7629 </style:style> 7630 </xsl:template> 7631 <xsl:template name="表:图表背景墙式样"> 7632 <xsl:param name="table-name"/> 7633 <xsl:param name="table-type"/> 7634 <xsl:param name="table-subtype"/> 7635 <xsl:param name="series-value-start"/> 7636 <xsl:param name="series-value-end"/> 7637 <xsl:param name="series-generate-type"/> 7638 <style:style style:name="chart-wall" style:family="chart"> 7639 <style:graphic-properties> 7640 <xsl:for-each select="node()"> 7641 <xsl:choose> 7642 <xsl:when test="name(.)='表:边框'"> 7643 <xsl:call-template name="uof:边框"/> 7644 </xsl:when> 7645 <xsl:when test="name(.)='表:填充'"> 7646 <xsl:call-template name="图:填充类型"/> 7647 </xsl:when> 7648 </xsl:choose> 7649 </xsl:for-each> 7650 </style:graphic-properties> 7651 </style:style> 7652 </xsl:template> 7653 <xsl:template name="表:分类轴式样"> 7654 <xsl:param name="table-name"/> 7655 <xsl:param name="table-type"/> 7656 <xsl:param name="table-subtype"/> 7657 <xsl:param name="series-value-start"/> 7658 <xsl:param name="series-value-end"/> 7659 <xsl:param name="series-generate-type"/> 7660 <style:style style:name="category-axis" style:family="chart"> 7661 <xsl:call-template name="表:坐标轴类型"> 7662 <xsl:with-param name="table-name" select="$table-name"/> 7663 <xsl:with-param name="table-type" select="$table-type"/> 7664 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7665 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7666 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7667 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7668 <xsl:with-param name="axis-type" select="'category axis'"/> 7669 </xsl:call-template> 7670 </style:style> 7671 </xsl:template> 7672 <xsl:template name="表:数值轴式样"> 7673 <xsl:param name="table-name"/> 7674 <xsl:param name="table-type"/> 7675 <xsl:param name="table-subtype"/> 7676 <xsl:param name="series-value-start"/> 7677 <xsl:param name="series-value-end"/> 7678 <xsl:param name="series-generate-type"/> 7679 <style:style style:name="value-axis" style:family="chart"> 7680 <xsl:call-template name="表:坐标轴类型"> 7681 <xsl:with-param name="table-name" select="$table-name"/> 7682 <xsl:with-param name="table-type" select="$table-type"/> 7683 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7684 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7685 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7686 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7687 <xsl:with-param name="axis-type" select="'value axis'"/> 7688 </xsl:call-template> 7689 </style:style> 7690 </xsl:template> 7691 <xsl:template name="表:图例式样"> 7692 <xsl:param name="table-name"/> 7693 <xsl:param name="table-type"/> 7694 <xsl:param name="table-subtype"/> 7695 <xsl:param name="series-value-start"/> 7696 <xsl:param name="series-value-end"/> 7697 <xsl:param name="series-generate-type"/> 7698 <style:style style:name="legend" style:family="chart"> 7699 <xsl:for-each select="node()"> 7700 <xsl:choose> 7701 <xsl:when test="name(.)='表:边框'"> 7702 <style:graphic-properties> 7703 <xsl:call-template name="uof:边框"/> 7704 </style:graphic-properties> 7705 </xsl:when> 7706 <xsl:when test="name(.)='表:填充'"> 7707 <style:graphic-properties> 7708 <xsl:call-template name="图:填充类型"/> 7709 </style:graphic-properties> 7710 </xsl:when> 7711 <xsl:when test="name(.)='表:字体'"> 7712 <style:text-properties> 7713 <xsl:call-template name="字:句属性类型"/> 7714 </style:text-properties> 7715 </xsl:when> 7716 </xsl:choose> 7717 </xsl:for-each> 7718 </style:style> 7719 </xsl:template> 7720 <xsl:template name="表:数据表式样"> 7721 <xsl:param name="table-name"/> 7722 <xsl:param name="table-type"/> 7723 <xsl:param name="table-subtype"/> 7724 <xsl:param name="series-value-start"/> 7725 <xsl:param name="series-value-end"/> 7726 <xsl:param name="series-generate-type"/> 7727 <style:style style:name="data-table" style:family="chart"> 7728 <xsl:for-each select="node()"> 7729 <xsl:choose> 7730 <xsl:when test="name(.)='表:边框'"> 7731 <style:graphic-properties> 7732 <xsl:call-template name="uof:边框"/> 7733 </style:graphic-properties> 7734 </xsl:when> 7735 <xsl:when test="name(.)='表:填充'"> 7736 <style:graphic-properties> 7737 <xsl:call-template name="图:填充类型"/> 7738 </style:graphic-properties> 7739 </xsl:when> 7740 <xsl:when test="name(.)='表:字体'"> 7741 <style:text-properties> 7742 <xsl:call-template name="字:句属性类型"/> 7743 </style:text-properties> 7744 </xsl:when> 7745 </xsl:choose> 7746 </xsl:for-each> 7747 </style:style> 7748 </xsl:template> 7749 <xsl:template name="表:数据系列集式样"> 7750 <xsl:param name="table-name"/> 7751 <xsl:param name="table-type"/> 7752 <xsl:param name="table-subtype"/> 7753 <xsl:param name="series-value-start"/> 7754 <xsl:param name="series-value-end"/> 7755 <xsl:param name="series-generate-type"/> 7756 <xsl:for-each select="表:数据系列"> 7757 <style:style style:family="chart"> 7758 <xsl:variable name="current-positon" select="position()"/> 7759 <xsl:attribute name="style:name"><xsl:value-of select="concat('data-series',$current-positon)"/></xsl:attribute> 7760 <xsl:call-template name="表:数据点类型"> 7761 <xsl:with-param name="table-name" select="$table-name"/> 7762 <xsl:with-param name="table-type" select="$table-type"/> 7763 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7764 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7765 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7766 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7767 <xsl:with-param name="recall-type" select="'data-series'"/> 7768 </xsl:call-template> 7769 </style:style> 7770 </xsl:for-each> 7771 </xsl:template> 7772 <xsl:template name="表:数据点集式样"> 7773 <xsl:param name="table-name"/> 7774 <xsl:param name="table-type"/> 7775 <xsl:param name="table-subtype"/> 7776 <xsl:param name="series-value-start"/> 7777 <xsl:param name="series-value-end"/> 7778 <xsl:param name="series-generate-type"/> 7779 <xsl:for-each select="表:数据点"> 7780 <style:style style:family="chart"> 7781 <xsl:attribute name="style:name"><xsl:value-of select="concat('data-point',@表:系列,@表:点)"/></xsl:attribute> 7782 <xsl:call-template name="表:数据点类型"> 7783 <xsl:with-param name="table-name" select="$table-name"/> 7784 <xsl:with-param name="table-type" select="$table-type"/> 7785 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7786 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7787 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7788 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7789 <xsl:with-param name="recall-type" select="'data-point'"/> 7790 </xsl:call-template> 7791 </style:style> 7792 </xsl:for-each> 7793 </xsl:template> 7794 <xsl:template name="表:网格线集式样"> 7795 <xsl:param name="table-name"/> 7796 <xsl:param name="table-type"/> 7797 <xsl:param name="table-subtype"/> 7798 <xsl:param name="series-value-start"/> 7799 <xsl:param name="series-value-end"/> 7800 <xsl:param name="series-generate-type"/> 7801 <xsl:for-each select="表:网格线"> 7802 <xsl:choose> 7803 <xsl:when test="@表:位置='category axis'"> 7804 <style:style style:name="category-axis-grid" style:family="chart"> 7805 <style:graphic-properties> 7806 <xsl:call-template name="uof:边框"/> 7807 </style:graphic-properties> 7808 </style:style> 7809 </xsl:when> 7810 <xsl:when test="@表:位置='value axis'"> 7811 <style:style style:name="value-axis-grid" style:family="chart"> 7812 <style:graphic-properties> 7813 <xsl:call-template name="uof:边框"/> 7814 </style:graphic-properties> 7815 </style:style> 7816 </xsl:when> 7817 <xsl:otherwise/> 7818 </xsl:choose> 7819 </xsl:for-each> 7820 </xsl:template> 7821 <xsl:template name="表:数据源式样"> 7822 <xsl:param name="table-name"/> 7823 <xsl:param name="table-type"/> 7824 <xsl:param name="table-subtype"/> 7825 <xsl:param name="series-value-start"/> 7826 <xsl:param name="series-value-end"/> 7827 <xsl:param name="series-generate-type"/> 7828 <xsl:for-each select="表:系列"> 7829 <style:style style:family="chart"> 7830 <xsl:variable name="current-positon" select="position()"/> 7831 <xsl:attribute name="style:name"><xsl:value-of select="concat('data-source',$current-positon)"/></xsl:attribute> 7832 </style:style> 7833 </xsl:for-each> 7834 </xsl:template> 7835 <xsl:template name="表:标题集式样"> 7836 <xsl:param name="table-name"/> 7837 <xsl:param name="table-type"/> 7838 <xsl:param name="table-subtype"/> 7839 <xsl:param name="series-value-start"/> 7840 <xsl:param name="series-value-end"/> 7841 <xsl:param name="series-generate-type"/> 7842 <xsl:for-each select="表:标题"> 7843 <xsl:choose> 7844 <xsl:when test="@表:位置='chart'"> 7845 <style:style style:name="chart-title" style:family="chart"> 7846 <xsl:call-template name="表:标题类型"> 7847 <xsl:with-param name="table-name" select="$table-name"/> 7848 <xsl:with-param name="table-type" select="$table-type"/> 7849 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7850 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7851 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7852 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7853 </xsl:call-template> 7854 </style:style> 7855 </xsl:when> 7856 <xsl:when test="@表:位置='category axis'"> 7857 <style:style style:name="category-axis-title" style:family="chart"> 7858 <xsl:call-template name="表:标题类型"> 7859 <xsl:with-param name="table-name" select="$table-name"/> 7860 <xsl:with-param name="table-type" select="$table-type"/> 7861 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7862 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7863 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7864 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7865 </xsl:call-template> 7866 </style:style> 7867 </xsl:when> 7868 <xsl:when test="@表:位置='value axis'"> 7869 <style:style style:name="value-axis-title" style:family="chart"> 7870 <xsl:call-template name="表:标题类型"> 7871 <xsl:with-param name="table-name" select="$table-name"/> 7872 <xsl:with-param name="table-type" select="$table-type"/> 7873 <xsl:with-param name="table-subtype" select="$table-subtype"/> 7874 <xsl:with-param name="series-value-start" select="$series-value-start"/> 7875 <xsl:with-param name="series-value-end" select="$series-value-end"/> 7876 <xsl:with-param name="series-generate-type" select="$series-generate-type"/> 7877 </xsl:call-template> 7878 </style:style> 7879 </xsl:when> 7880 <xsl:otherwise/> 7881 </xsl:choose> 7882 </xsl:for-each> 7883 </xsl:template> 7884 <xsl:template name="表:坐标轴类型"> 7885 <xsl:param name="table-name"/> 7886 <xsl:param name="table-type"/> 7887 <xsl:param name="table-subtype"/> 7888 <xsl:param name="series-value-start"/> 7889 <xsl:param name="series-value-end"/> 7890 <xsl:param name="series-generate-type"/> 7891 <xsl:param name="axis-type"/> 7892 <style:chart-properties> 7893 <xsl:choose> 7894 <xsl:when test="@表:主刻度类型='cross'"> 7895 <xsl:attribute name="chart:tick-marks-major-inner">true</xsl:attribute> 7896 <xsl:attribute name="chart:tick-marks-major-outer">true</xsl:attribute> 7897 </xsl:when> 7898 <xsl:when test="@表:主刻度类型='inside'"> 7899 <xsl:attribute name="chart:tick-marks-major-inner">true</xsl:attribute> 7900 <xsl:attribute name="chart:tick-marks-major-outer">false</xsl:attribute> 7901 </xsl:when> 7902 <xsl:when test="@表:主刻度类型='outside'"> 7903 <xsl:attribute name="chart:tick-marks-major-inner">false</xsl:attribute> 7904 <xsl:attribute name="chart:tick-marks-major-outer">true</xsl:attribute> 7905 </xsl:when> 7906 <xsl:otherwise/> 7907 </xsl:choose> 7908 <xsl:choose> 7909 <xsl:when test="@表:次刻度类型='cross'"> 7910 <xsl:attribute name="chart:tick-marks-minor-inner">true</xsl:attribute> 7911 <xsl:attribute name="chart:tick-marks-minor-outer">true</xsl:attribute> 7912 </xsl:when> 7913 <xsl:when test="@表:次刻度类型='inside'"> 7914 <xsl:attribute name="chart:tick-marks-minor-inner">true</xsl:attribute> 7915 <xsl:attribute name="chart:tick-marks-minor-outer">false</xsl:attribute> 7916 </xsl:when> 7917 <xsl:when test="@表:次刻度类型='outside'"> 7918 <xsl:attribute name="chart:tick-marks-minor-inner">false</xsl:attribute> 7919 <xsl:attribute name="chart:tick-marks-minor-outer">true</xsl:attribute> 7920 </xsl:when> 7921 <xsl:otherwise/> 7922 </xsl:choose> 7923 <xsl:if test="@表:刻度线标志='next to axis'"> 7924 <xsl:attribute name="chart:display-label">true</xsl:attribute> 7925 </xsl:if> 7926 <xsl:for-each select="node()"> 7927 <xsl:choose> 7928 <xsl:when test="name(.)='表:线型'"> 7929 <xsl:call-template name="uof:线型"/> 7930 </xsl:when> 7931 <xsl:when test="name(.)='表:数值'"> 7932 <xsl:attribute name="chart:link-data-style-to-source"><xsl:value-of select="@表:链接到源"/></xsl:attribute> 7933 </xsl:when> 7934 <xsl:when test="name(.)='表:刻度'"> 7935 <xsl:call-template name="表:刻度类型"/> 7936 </xsl:when> 7937 <xsl:when test="name(.)='表:对齐'"> 7938 <xsl:if test="表:文字方向"> 7939 <xsl:attribute name="fo:direction"><xsl:value-of select="表:文字方向"/></xsl:attribute> 7940 </xsl:if> 7941 <xsl:if test="表:旋转角度"> 7942 <xsl:attribute name="text:rotation-angle"><xsl:value-of select="表:旋转角度"/></xsl:attribute> 7943 </xsl:if> 7944 </xsl:when> 7945 </xsl:choose> 7946 </xsl:for-each> 7947 </style:chart-properties> 7948 <xsl:if test="表:字体"> 7949 <xsl:for-each select="表:字体"> 7950 <xsl:element name="style:text-properties"> 7951 <xsl:call-template name="字:句属性类型"/> 7952 </xsl:element> 7953 </xsl:for-each> 7954 </xsl:if> 7955 </xsl:template> 7956 <xsl:template name="表:数据点类型"> 7957 <xsl:param name="table-name"/> 7958 <xsl:param name="table-type"/> 7959 <xsl:param name="table-subtype"/> 7960 <xsl:param name="series-value-start"/> 7961 <xsl:param name="series-value-end"/> 7962 <xsl:param name="series-generate-type"/> 7963 <xsl:param name="recall-type"/> 7964 <xsl:if test="name(.)='表:数据点'"> 7965 <style:chart-properties> 7966 <xsl:if test="$table-type='pie' and $table-subtype='pie_offset1' and @表:点='1'"> 7967 <xsl:attribute name="chart:pie-offset">10</xsl:attribute> 7968 </xsl:if> 7969 <xsl:if test="$table-type='pie' and $table-subtype='pie_offset2'"> 7970 <xsl:attribute name="chart:pie-offset">10</xsl:attribute> 7971 </xsl:if> 7972 </style:chart-properties> 7973 </xsl:if> 7974 <xsl:for-each select="node()"> 7975 <xsl:choose> 7976 <xsl:when test="name(.)='表:边框'"> 7977 <style:graphic-properties> 7978 <xsl:call-template name="uof:边框"/> 7979 </style:graphic-properties> 7980 </xsl:when> 7981 <xsl:when test="name(.)='表:填充'"> 7982 <style:graphic-properties> 7983 <xsl:call-template name="图:填充类型"/> 7984 </style:graphic-properties> 7985 </xsl:when> 7986 <xsl:when test="name(.)='表:字体'"> 7987 <style:text-properties> 7988 <xsl:call-template name="字:句属性类型"/> 7989 </style:text-properties> 7990 </xsl:when> 7991 <xsl:when test="name(.)='表:显示标志'"> 7992 <style:chart-properties> 7993 <xsl:if test="@表:类别名"> 7994 <xsl:attribute name="chart:data-label-text"><xsl:value-of select="@表:类别名"/></xsl:attribute> 7995 </xsl:if> 7996 <xsl:if test="@表:数值"> 7997 <xsl:attribute name="chart:data-label-number">value</xsl:attribute> 7998 </xsl:if> 7999 <xsl:if test="@表:百分数"> 8000 <xsl:attribute name="chart:data-label-number">percentage</xsl:attribute> 8001 </xsl:if> 8002 <xsl:if test="@表:图例标志"> 8003 <xsl:attribute name="chart:data-label-symbol"><xsl:value-of select="@表:图例标志"/></xsl:attribute> 8004 </xsl:if> 8005 </style:chart-properties> 8006 </xsl:when> 8007 </xsl:choose> 8008 </xsl:for-each> 8009 </xsl:template> 8010 <xsl:template name="表:标题类型"> 8011 <xsl:param name="table-name"/> 8012 <xsl:param name="table-type"/> 8013 <xsl:param name="table-subtype"/> 8014 <xsl:param name="series-value-start"/> 8015 <xsl:param name="series-value-end"/> 8016 <xsl:param name="series-generate-type"/> 8017 <xsl:for-each select="node()"> 8018 <xsl:choose> 8019 <xsl:when test="name(.)='表:边框'"> 8020 <style:graphic-properties> 8021 <xsl:call-template name="uof:边框"/> 8022 </style:graphic-properties> 8023 </xsl:when> 8024 <xsl:when test="name(.)='表:填充'"> 8025 <style:graphic-properties> 8026 <xsl:call-template name="图:填充类型"/> 8027 </style:graphic-properties> 8028 </xsl:when> 8029 <xsl:when test="name(.)='表:对齐'"> 8030 <style:chart-properties> 8031 <xsl:call-template name="表:对齐格式类型"/> 8032 </style:chart-properties> 8033 </xsl:when> 8034 <xsl:when test="name(.)='表:字体'"> 8035 <style:text-properties> 8036 <xsl:call-template name="字:句属性类型"/> 8037 </style:text-properties> 8038 </xsl:when> 8039 </xsl:choose> 8040 </xsl:for-each> 8041 </xsl:template> 8042 <xsl:template name="uof:边框"> 8043 <xsl:if test="@uof:类型"> 8044 <xsl:variable name="type" select="@uof:类型"/> 8045 <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> 8046 <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> 8047 </xsl:if> 8048 <xsl:if test="@uof:宽度"> 8049 <xsl:attribute name="svg:stroke-width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute> 8050 </xsl:if> 8051 <xsl:if test="@uof:颜色"> 8052 <xsl:attribute name="svg:stroke-color"><xsl:value-of select="@uof:颜色"/></xsl:attribute> 8053 </xsl:if> 8054 </xsl:template> 8055 <xsl:template name="图:填充类型"> 8056 <xsl:if test="图:颜色"> 8057 <xsl:attribute name="draw:fill">solid</xsl:attribute> 8058 <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:颜色"/></xsl:attribute> 8059 </xsl:if> 8060 <xsl:if test="图:图片"> 8061 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 8062 <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:图片/@图:名称"/></xsl:attribute> 8063 <xsl:if test="not(图:图片/@图:位置='tile')"> 8064 <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> 8065 </xsl:if> 8066 </xsl:if> 8067 <xsl:if test="图:图案"> 8068 <xsl:attribute name="draw:fill">bitmap</xsl:attribute> 8069 <xsl:attribute name="draw:fill-hatch-name"><xsl:value-of select="图:图案/@图:图形引用"/></xsl:attribute> 8070 </xsl:if> 8071 <xsl:if test="图:渐变"> 8072 <xsl:attribute name="draw:fill">gradient</xsl:attribute> 8073 <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="图:渐变/@图:图形引用"/></xsl:attribute> 8074 </xsl:if> 8075 </xsl:template> 8076 <xsl:template name="uof:线型"> 8077 <xsl:call-template name="uof:边框"/> 8078 </xsl:template> 8079 <xsl:template name="字:句属性类型"> 8080 <xsl:apply-templates select="./*"/> 8081 </xsl:template> 8082 <xsl:template name="表:刻度类型"> 8083 <xsl:if test="表:最小值"> 8084 <xsl:attribute name="chart:minimum"><xsl:value-of select="表:最小值"/></xsl:attribute> 8085 </xsl:if> 8086 <xsl:if test="表:最大值"> 8087 <xsl:attribute name="chart:maximum"><xsl:value-of select="表:最大值"/></xsl:attribute> 8088 </xsl:if> 8089 <xsl:if test="表:主单位"> 8090 <xsl:attribute name="chart:interval-major"><xsl:value-of select="表:主单位"/></xsl:attribute> 8091 </xsl:if> 8092 <xsl:if test="表:次单位"> 8093 <xsl:attribute name="chart:interval-minor"><xsl:value-of select="表:次单位"/></xsl:attribute> 8094 </xsl:if> 8095 <xsl:if test="表:分类交叉点"> 8096 <xsl:attribute name="chart:origin"><xsl:value-of select="表:分类交叉点"/></xsl:attribute> 8097 </xsl:if> 8098 </xsl:template> 8099 <xsl:template name="表:对齐格式类型"> 8100 <xsl:if test="表:文字方向"> 8101 <xsl:attribute name="style:direction"><xsl:value-of select="表:文字方向"/></xsl:attribute> 8102 </xsl:if> 8103 <xsl:if test="表:文字旋转角度"> 8104 <xsl:attribute name="style:rotation-angle"><xsl:value-of select="表:文字旋转角度"/></xsl:attribute> 8105 </xsl:if> 8106 </xsl:template> 8107 <xsl:template match="字:字体"> 8108 <xsl:if test="@字:字号"> 8109 <xsl:attribute name="fo:font-size"><xsl:value-of select="@字:字号"/>pt</xsl:attribute> 8110 <xsl:attribute name="style:font-size-asian"><xsl:value-of select="@字:字号"/>pt</xsl:attribute> 8111 <xsl:attribute name="style:font-size-complex"><xsl:value-of select="@字:字号"/>pt</xsl:attribute> 8112 </xsl:if> 8113 <xsl:if test="@字:相对字号 and self::node( )[not(parent::字:句属性)]"> 8114 <xsl:variable name="stylename" select="parent::node()/@字:基式样引用"/> 8115 <xsl:variable name="zihao"> 8116 <xsl:for-each select="/uof:UOF/uof:式样集//uof:段落式样[@字:标识符=$stylename]"> 8117 <xsl:value-of select="字:字体/@字:字号"/> 8118 </xsl:for-each> 8119 </xsl:variable> 8120 <xsl:variable name="font-size" select="@字:相对字号"/> 8121 <xsl:attribute name="fo:font-size"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute> 8122 <xsl:attribute name="style:font-size-asian"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute> 8123 <xsl:attribute name="style:font-size-complex"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute> 8124 </xsl:if> 8125 <xsl:if test="@字:颜色"> 8126 <xsl:attribute name="fo:color"><xsl:value-of select="string(@字:颜色)"/></xsl:attribute> 8127 </xsl:if> 8128 <xsl:if test="@字:中文字体引用"> 8129 <xsl:attribute name="style:font-family-asian"><xsl:value-of select="@字:中文字体引用"/></xsl:attribute> 8130 </xsl:if> 8131 <xsl:if test="@字:西文字体引用"> 8132 <xsl:attribute name="fo:font-family"><xsl:value-of select="@字:西文字体引用"/></xsl:attribute> 8133 </xsl:if> 8134 </xsl:template> 8135 <xsl:template match="字:斜体"> 8136 <xsl:if test="@字:值='true'"> 8137 <xsl:attribute name="fo:font-style">italic</xsl:attribute> 8138 <xsl:attribute name="fo:font-style-asian">italic</xsl:attribute> 8139 <xsl:attribute name="style:font-style-asian">italic</xsl:attribute> 8140 <xsl:attribute name="style:font-style-complex">italic</xsl:attribute> 8141 </xsl:if> 8142 </xsl:template> 8143 <xsl:template match="字:粗体"> 8144 <xsl:if test="@字:值='true'"> 8145 <xsl:attribute name="fo:font-weight">bold</xsl:attribute> 8146 <xsl:attribute name="style:font-weight-asian">bold</xsl:attribute> 8147 <xsl:attribute name="style:font-weight-complex">bold</xsl:attribute> 8148 </xsl:if> 8149 </xsl:template> 8150 <xsl:template match="字:下划线"> 8151 <xsl:choose> 8152 <xsl:when test="@字:类型 = 'single'"> 8153 <xsl:attribute name="style:text-underline-style">solid</xsl:attribute> 8154 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8155 </xsl:when> 8156 <xsl:when test="@字:类型 = 'double'"> 8157 <xsl:attribute name="style:text-underline-style">solid</xsl:attribute> 8158 <xsl:attribute name="style:text-underline-type">double</xsl:attribute> 8159 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8160 </xsl:when> 8161 <xsl:when test="@字:类型 = 'thick'"> 8162 <xsl:attribute name="style:text-underline-style">solid</xsl:attribute> 8163 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8164 </xsl:when> 8165 <xsl:when test="@字:类型 = 'dotted'"> 8166 <xsl:attribute name="style:text-underline-style">dotted</xsl:attribute> 8167 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8168 </xsl:when> 8169 <xsl:when test="@字:类型 = 'dotted-heavy'"> 8170 <xsl:attribute name="style:text-underline-style">dotted</xsl:attribute> 8171 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8172 </xsl:when> 8173 <xsl:when test="@字:类型 = 'dash'"> 8174 <xsl:attribute name="style:text-underline-style">dash</xsl:attribute> 8175 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8176 </xsl:when> 8177 <xsl:when test="@字:类型 = 'dashed-heavy'"> 8178 <xsl:attribute name="style:text-underline-style">dash</xsl:attribute> 8179 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8180 </xsl:when> 8181 <xsl:when test="@字:类型 = 'dash-long'"> 8182 <xsl:attribute name="style:text-underline-style">long-dash</xsl:attribute> 8183 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8184 </xsl:when> 8185 <xsl:when test="@字:类型 = 'dash-long-heavy'"> 8186 <xsl:attribute name="style:text-underline-style">long-dash</xsl:attribute> 8187 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8188 </xsl:when> 8189 <xsl:when test="@字:类型 = 'dot-dash'"> 8190 <xsl:attribute name="style:text-underline-style">dot-dash</xsl:attribute> 8191 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8192 </xsl:when> 8193 <xsl:when test="@字:类型 = 'dash-dot-heavy'"> 8194 <xsl:attribute name="style:text-underline-style">dot-dash</xsl:attribute> 8195 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8196 </xsl:when> 8197 <xsl:when test="@字:类型 = 'dot-dot-dash'"> 8198 <xsl:attribute name="style:text-underline-style">dot-dot-dash</xsl:attribute> 8199 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8200 </xsl:when> 8201 <xsl:when test="@字:类型 = 'dash-dot-dot-heavy'"> 8202 <xsl:attribute name="style:text-underline-style">dot-dot-dash</xsl:attribute> 8203 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8204 </xsl:when> 8205 <xsl:when test="@字:类型 = 'wave'"> 8206 <xsl:attribute name="style:text-underline-style">wave</xsl:attribute> 8207 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8208 </xsl:when> 8209 <xsl:when test="@字:类型 = 'wavy-heavy'"> 8210 <xsl:attribute name="style:text-underline-style">wave</xsl:attribute> 8211 <xsl:attribute name="style:text-underline-width">bold</xsl:attribute> 8212 </xsl:when> 8213 <xsl:when test="@字:类型 = 'wavy-double'"> 8214 <xsl:attribute name="style:text-underline-style">wave</xsl:attribute> 8215 <xsl:attribute name="style:text-underline-type">double</xsl:attribute> 8216 <xsl:attribute name="style:text-underline-width">auto</xsl:attribute> 8217 </xsl:when> 8218 <xsl:otherwise/> 8219 </xsl:choose> 8220 <xsl:choose> 8221 <xsl:when test="@字:颜色"> 8222 <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> 8223 </xsl:when> 8224 <xsl:otherwise> 8225 <xsl:attribute name="style:text-underline-color">font-color</xsl:attribute> 8226 </xsl:otherwise> 8227 </xsl:choose> 8228 </xsl:template> 8229 <xsl:template match="字:着重号"> 8230 <xsl:if test="not(@字:类型='none')"> 8231 <xsl:choose> 8232 <xsl:when test="@字:类型='accent above' "> 8233 <xsl:attribute name="style:text-emphasize">accent above</xsl:attribute> 8234 </xsl:when> 8235 <xsl:when test="@字:类型='dot above' "> 8236 <xsl:attribute name="style:text-emphasize">dot above</xsl:attribute> 8237 </xsl:when> 8238 <xsl:when test="@字:类型='disc above' "> 8239 <xsl:attribute name="style:text-emphasize">disc above</xsl:attribute> 8240 </xsl:when> 8241 <xsl:when test="@字:类型='circle above' "> 8242 <xsl:attribute name="style:text-emphasize">circle above</xsl:attribute> 8243 </xsl:when> 8244 <xsl:when test="@字:类型='accent below' "> 8245 <xsl:attribute name="style:text-emphasize">accent below</xsl:attribute> 8246 </xsl:when> 8247 <xsl:when test="@字:类型='dot below' "> 8248 <xsl:attribute name="style:text-emphasize">dot below</xsl:attribute> 8249 </xsl:when> 8250 <xsl:when test="@字:类型='disc below' "> 8251 <xsl:attribute name="style:text-emphasize">disc below</xsl:attribute> 8252 </xsl:when> 8253 <xsl:when test="@字:类型='circle below' "> 8254 <xsl:attribute name="style:text-emphasize">circle below</xsl:attribute> 8255 </xsl:when> 8256 </xsl:choose> 8257 </xsl:if> 8258 <xsl:if test="字:颜色"> 8259 <xsl:attribute name="fo:color"><xsl:value-of select="@字:颜色"/></xsl:attribute> 8260 </xsl:if> 8261 </xsl:template> 8262 <xsl:template match="字:隐藏文字"> 8263 <xsl:attribute name="text:display"><xsl:value-of select="@字:值"/></xsl:attribute> 8264 </xsl:template> 8265 <xsl:template match="字:空心"> 8266 <xsl:attribute name="style:text-outline"><xsl:value-of select="@字:值"/></xsl:attribute> 8267 </xsl:template> 8268 <xsl:template match="字:阴影"> 8269 <xsl:if test="not(@字:值='false')"> 8270 <xsl:attribute name="fo:text-shadow">1pt 1pt</xsl:attribute> 8271 </xsl:if> 8272 </xsl:template> 8273 <xsl:template match="字:删除线"> 8274 <xsl:attribute name="style:text-line-through-style">solid</xsl:attribute> 8275 <xsl:choose> 8276 <xsl:when test="@字:类型='double'"> 8277 <xsl:attribute name="style:text-line-through-type">double</xsl:attribute> 8278 </xsl:when> 8279 <xsl:when test="@字:类型='single'"> 8280 <xsl:attribute name="style:text-underline-mode">continuous</xsl:attribute> 8281 <xsl:attribute name="style:text-line-through-mode">continuous</xsl:attribute> 8282 </xsl:when> 8283 <xsl:when test="@字:类型='bold'"> 8284 <xsl:attribute name="style:text-line-through-width">bold</xsl:attribute> 8285 </xsl:when> 8286 <xsl:when test="@字:类型='带/'"> 8287 <xsl:attribute name="style:text-line-through-text">/</xsl:attribute> 8288 </xsl:when> 8289 <xsl:when test="@字:类型='带X'"> 8290 <xsl:attribute name="style:text-line-through-text">X</xsl:attribute> 8291 </xsl:when> 8292 <xsl:otherwise/> 8293 </xsl:choose> 8294 </xsl:template> 8295 <xsl:template match="@字:颜色[not(.='auto')]"> 8296 <xsl:attribute name="fo:color">#<xsl:value-of select="."/></xsl:attribute> 8297 </xsl:template> 8298 <xsl:template match="字:浮雕"> 8299 <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> 8300 </xsl:template> 8301 <xsl:template match="字:醒目字体"> 8302 <xsl:choose> 8303 <xsl:when test="@字:类型='small-caps'"> 8304 <xsl:attribute name="fo:font-variant">small-caps</xsl:attribute> 8305 </xsl:when> 8306 <xsl:when test="@字:类型='none'"> 8307 <xsl:attribute name="fo:font-variant">normal</xsl:attribute> 8308 <xsl:attribute name="fo:text-transform">none</xsl:attribute> 8309 </xsl:when> 8310 <xsl:otherwise> 8311 <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> 8312 </xsl:otherwise> 8313 </xsl:choose> 8314 </xsl:template> 8315 <xsl:template match="字:位置"> 8316 <xsl:attribute name="style:text-position"><xsl:value-of select="."/></xsl:attribute> 8317 </xsl:template> 8318 <xsl:template match="字:缩放"> 8319 <xsl:attribute name="style:text-scale"><xsl:value-of select="."/></xsl:attribute> 8320 </xsl:template> 8321 <xsl:template match="字:字符间距"> 8322 <xsl:attribute name="fo:letter-spacing"><xsl:value-of select="."/></xsl:attribute> 8323 </xsl:template> 8324 <xsl:template match="字:调整字间距"> 8325 <xsl:attribute name="style:letter-kerning"><xsl:value-of select="."/></xsl:attribute> 8326 </xsl:template> 8327 <xsl:template match="字:外框"> 8328 <xsl:attribute name="style:text-outline">true</xsl:attribute> 8329 </xsl:template> 8330 <xsl:template match="字:缩放"> 8331 <xsl:attribute name="style:text-scale"><xsl:value-of select="."/></xsl:attribute> 8332 </xsl:template> 8333 <xsl:template match="字:字符间距[parent::字:句属性]"> 8334 <xsl:attribute name="fo:letter-spacing"><xsl:value-of select="concat( number(.)* $other-to-cm-conversion-factor, $uofUnit)"/></xsl:attribute> 8335 </xsl:template> 8336 <xsl:template name="General-Char-Transition"> 8337 <xsl:param name="input-char"/> 8338 <xsl:param name="output-type"/> 8339 <xsl:choose> 8340 <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='子'"> 8341 <xsl:choose> 8342 <xsl:when test="$output-type='ARABIC'">1</xsl:when> 8343 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">a</xsl:when> 8344 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">A</xsl:when> 8345 <xsl:when test="$output-type='ROMAN_UPPER'">I</xsl:when> 8346 <xsl:when test="$output-type='ROMAN_LOWER'">i</xsl:when> 8347 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">1</xsl:when> 8348 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">一</xsl:when> 8349 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">1</xsl:when> 8350 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">壹</xsl:when> 8351 <xsl:when test="$output-type='CIRCLE_NUMBER'">1</xsl:when> 8352 <xsl:when test="$output-type='TIAN_GAN_ZH'">甲</xsl:when> 8353 <xsl:when test="$output-type='DI_ZI_ZH'">子</xsl:when> 8354 <xsl:otherwise>1</xsl:otherwise> 8355 </xsl:choose> 8356 </xsl:when> 8357 <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='丑'"> 8358 <xsl:choose> 8359 <xsl:when test="$output-type='ARABIC'">2</xsl:when> 8360 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">b</xsl:when> 8361 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">B</xsl:when> 8362 <xsl:when test="$output-type='ROMAN_UPPER'">II</xsl:when> 8363 <xsl:when test="$output-type='ROMAN_LOWER'">ii</xsl:when> 8364 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">2</xsl:when> 8365 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二</xsl:when> 8366 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">2</xsl:when> 8367 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰</xsl:when> 8368 <xsl:when test="$output-type='CIRCLE_NUMBER'">2</xsl:when> 8369 <xsl:when test="$output-type='TIAN_GAN_ZH'">乙</xsl:when> 8370 <xsl:when test="$output-type='DI_ZI_ZH'">丑</xsl:when> 8371 <xsl:otherwise>2</xsl:otherwise> 8372 </xsl:choose> 8373 </xsl:when> 8374 <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='寅'"> 8375 <xsl:choose> 8376 <xsl:when test="$output-type='ARABIC'">3</xsl:when> 8377 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">c</xsl:when> 8378 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">C</xsl:when> 8379 <xsl:when test="$output-type='ROMAN_UPPER'">III</xsl:when> 8380 <xsl:when test="$output-type='ROMAN_LOWER'">iii</xsl:when> 8381 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">3</xsl:when> 8382 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">三</xsl:when> 8383 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">3</xsl:when> 8384 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">叁</xsl:when> 8385 <xsl:when test="$output-type='CIRCLE_NUMBER'">3</xsl:when> 8386 <xsl:when test="$output-type='TIAN_GAN_ZH'">丙</xsl:when> 8387 <xsl:when test="$output-type='DI_ZI_ZH'">寅</xsl:when> 8388 <xsl:otherwise>3</xsl:otherwise> 8389 </xsl:choose> 8390 </xsl:when> 8391 <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='卯'"> 8392 <xsl:choose> 8393 <xsl:when test="$output-type='ARABIC'">4</xsl:when> 8394 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">d</xsl:when> 8395 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">D</xsl:when> 8396 <xsl:when test="$output-type='ROMAN_UPPER'">IV</xsl:when> 8397 <xsl:when test="$output-type='ROMAN_LOWER'">iv</xsl:when> 8398 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">4</xsl:when> 8399 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">四</xsl:when> 8400 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">4</xsl:when> 8401 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">肆</xsl:when> 8402 <xsl:when test="$output-type='CIRCLE_NUMBER'">4</xsl:when> 8403 <xsl:when test="$output-type='TIAN_GAN_ZH'">丁</xsl:when> 8404 <xsl:when test="$output-type='DI_ZI_ZH'">卯</xsl:when> 8405 <xsl:otherwise>4</xsl:otherwise> 8406 </xsl:choose> 8407 </xsl:when> 8408 <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='辰'"> 8409 <xsl:choose> 8410 <xsl:when test="$output-type='ARABIC'">5</xsl:when> 8411 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">e</xsl:when> 8412 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">E</xsl:when> 8413 <xsl:when test="$output-type='ROMAN_UPPER'">V</xsl:when> 8414 <xsl:when test="$output-type='ROMAN_LOWER'">v</xsl:when> 8415 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">5</xsl:when> 8416 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">五</xsl:when> 8417 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">5</xsl:when> 8418 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">伍</xsl:when> 8419 <xsl:when test="$output-type='CIRCLE_NUMBER'">5</xsl:when> 8420 <xsl:when test="$output-type='TIAN_GAN_ZH'">戊</xsl:when> 8421 <xsl:when test="$output-type='DI_ZI_ZH'">辰</xsl:when> 8422 <xsl:otherwise>5</xsl:otherwise> 8423 </xsl:choose> 8424 </xsl:when> 8425 <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='巳'"> 8426 <xsl:choose> 8427 <xsl:when test="$output-type='ARABIC'">6</xsl:when> 8428 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">f</xsl:when> 8429 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">F</xsl:when> 8430 <xsl:when test="$output-type='ROMAN_UPPER'">VI</xsl:when> 8431 <xsl:when test="$output-type='ROMAN_LOWER'">vi</xsl:when> 8432 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">6</xsl:when> 8433 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">六</xsl:when> 8434 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">6</xsl:when> 8435 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">陆</xsl:when> 8436 <xsl:when test="$output-type='CIRCLE_NUMBER'">6</xsl:when> 8437 <xsl:when test="$output-type='TIAN_GAN_ZH'">己</xsl:when> 8438 <xsl:when test="$output-type='DI_ZI_ZH'">巳</xsl:when> 8439 <xsl:otherwise>6</xsl:otherwise> 8440 </xsl:choose> 8441 </xsl:when> 8442 <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='午'"> 8443 <xsl:choose> 8444 <xsl:when test="$output-type='ARABIC'">7</xsl:when> 8445 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">g</xsl:when> 8446 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">G</xsl:when> 8447 <xsl:when test="$output-type='ROMAN_UPPER'">VII</xsl:when> 8448 <xsl:when test="$output-type='ROMAN_LOWER'">vii</xsl:when> 8449 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">7</xsl:when> 8450 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">七</xsl:when> 8451 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">7</xsl:when> 8452 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">柒</xsl:when> 8453 <xsl:when test="$output-type='CIRCLE_NUMBER'">7</xsl:when> 8454 <xsl:when test="$output-type='TIAN_GAN_ZH'">庚</xsl:when> 8455 <xsl:when test="$output-type='DI_ZI_ZH'">午</xsl:when> 8456 <xsl:otherwise>7</xsl:otherwise> 8457 </xsl:choose> 8458 </xsl:when> 8459 <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='未'"> 8460 <xsl:choose> 8461 <xsl:when test="$output-type='ARABIC'">8</xsl:when> 8462 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">h</xsl:when> 8463 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">H</xsl:when> 8464 <xsl:when test="$output-type='ROMAN_UPPER'">VIII</xsl:when> 8465 <xsl:when test="$output-type='ROMAN_LOWER'">viii</xsl:when> 8466 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">8</xsl:when> 8467 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">八</xsl:when> 8468 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">8</xsl:when> 8469 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">捌</xsl:when> 8470 <xsl:when test="$output-type='CIRCLE_NUMBER'">8</xsl:when> 8471 <xsl:when test="$output-type='TIAN_GAN_ZH'">辛</xsl:when> 8472 <xsl:when test="$output-type='DI_ZI_ZH'">未</xsl:when> 8473 <xsl:otherwise>8</xsl:otherwise> 8474 </xsl:choose> 8475 </xsl:when> 8476 <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='申'"> 8477 <xsl:choose> 8478 <xsl:when test="$output-type='ARABIC'">9</xsl:when> 8479 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">i</xsl:when> 8480 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">I</xsl:when> 8481 <xsl:when test="$output-type='ROMAN_UPPER'">IX</xsl:when> 8482 <xsl:when test="$output-type='ROMAN_LOWER'">ix</xsl:when> 8483 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">9</xsl:when> 8484 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">九</xsl:when> 8485 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">9</xsl:when> 8486 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">玖</xsl:when> 8487 <xsl:when test="$output-type='CIRCLE_NUMBER'">9</xsl:when> 8488 <xsl:when test="$output-type='TIAN_GAN_ZH'">壬</xsl:when> 8489 <xsl:when test="$output-type='DI_ZI_ZH'">申</xsl:when> 8490 <xsl:otherwise>9</xsl:otherwise> 8491 </xsl:choose> 8492 </xsl:when> 8493 <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='酉'"> 8494 <xsl:choose> 8495 <xsl:when test="$output-type='ARABIC'">10</xsl:when> 8496 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">j</xsl:when> 8497 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">J</xsl:when> 8498 <xsl:when test="$output-type='ROMAN_UPPER'">X</xsl:when> 8499 <xsl:when test="$output-type='ROMAN_LOWER'">x</xsl:when> 8500 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">10</xsl:when> 8501 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十</xsl:when> 8502 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">10</xsl:when> 8503 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾</xsl:when> 8504 <xsl:when test="$output-type='CIRCLE_NUMBER'">10</xsl:when> 8505 <xsl:when test="$output-type='TIAN_GAN_ZH'">癸</xsl:when> 8506 <xsl:when test="$output-type='DI_ZI_ZH'">酉</xsl:when> 8507 <xsl:otherwise>10</xsl:otherwise> 8508 </xsl:choose> 8509 </xsl:when> 8510 <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='戌'"> 8511 <xsl:choose> 8512 <xsl:when test="$output-type='ARABIC'">11</xsl:when> 8513 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">k</xsl:when> 8514 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">K</xsl:when> 8515 <xsl:when test="$output-type='ROMAN_UPPER'">XI</xsl:when> 8516 <xsl:when test="$output-type='ROMAN_LOWER'">xi</xsl:when> 8517 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">11</xsl:when> 8518 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十一</xsl:when> 8519 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">11</xsl:when> 8520 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾壹</xsl:when> 8521 <xsl:when test="$output-type='CIRCLE_NUMBER'">11</xsl:when> 8522 <xsl:when test="$output-type='DI_ZI_ZH'">戌</xsl:when> 8523 <xsl:otherwise>11</xsl:otherwise> 8524 </xsl:choose> 8525 </xsl:when> 8526 <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='亥'"> 8527 <xsl:choose> 8528 <xsl:when test="$output-type='ARABIC'">12</xsl:when> 8529 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">l</xsl:when> 8530 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">L</xsl:when> 8531 <xsl:when test="$output-type='ROMAN_UPPER'">XII</xsl:when> 8532 <xsl:when test="$output-type='ROMAN_LOWER'">xii</xsl:when> 8533 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">12</xsl:when> 8534 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十二</xsl:when> 8535 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">12</xsl:when> 8536 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾贰</xsl:when> 8537 <xsl:when test="$output-type='CIRCLE_NUMBER'">12</xsl:when> 8538 <xsl:when test="$output-type='DI_ZI_ZH'">亥</xsl:when> 8539 <xsl:otherwise>12</xsl:otherwise> 8540 </xsl:choose> 8541 </xsl:when> 8542 <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='拾叁'"> 8543 <xsl:choose> 8544 <xsl:when test="$output-type='ARABIC'">13</xsl:when> 8545 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">m</xsl:when> 8546 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">M</xsl:when> 8547 <xsl:when test="$output-type='ROMAN_UPPER'">XIII</xsl:when> 8548 <xsl:when test="$output-type='ROMAN_LOWER'">xiii</xsl:when> 8549 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">13</xsl:when> 8550 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十三</xsl:when> 8551 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">13</xsl:when> 8552 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾叁</xsl:when> 8553 <xsl:when test="$output-type='CIRCLE_NUMBER'">13</xsl:when> 8554 <xsl:otherwise>13</xsl:otherwise> 8555 </xsl:choose> 8556 </xsl:when> 8557 <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='拾肆'"> 8558 <xsl:choose> 8559 <xsl:when test="$output-type='ARABIC'">14</xsl:when> 8560 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">n</xsl:when> 8561 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">N</xsl:when> 8562 <xsl:when test="$output-type='ROMAN_UPPER'">XIV</xsl:when> 8563 <xsl:when test="$output-type='ROMAN_LOWER'">xiv</xsl:when> 8564 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">14</xsl:when> 8565 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十四</xsl:when> 8566 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">14</xsl:when> 8567 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾肆</xsl:when> 8568 <xsl:when test="$output-type='CIRCLE_NUMBER'">14</xsl:when> 8569 <xsl:otherwise>14</xsl:otherwise> 8570 </xsl:choose> 8571 </xsl:when> 8572 <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='拾伍'"> 8573 <xsl:choose> 8574 <xsl:when test="$output-type='ARABIC'">15</xsl:when> 8575 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">o</xsl:when> 8576 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">O</xsl:when> 8577 <xsl:when test="$output-type='ROMAN_UPPER'">XV</xsl:when> 8578 <xsl:when test="$output-type='ROMAN_LOWER'">xv</xsl:when> 8579 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">15</xsl:when> 8580 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十五</xsl:when> 8581 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">15</xsl:when> 8582 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾伍</xsl:when> 8583 <xsl:when test="$output-type='CIRCLE_NUMBER'">15</xsl:when> 8584 <xsl:otherwise>15</xsl:otherwise> 8585 </xsl:choose> 8586 </xsl:when> 8587 <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='拾陆'"> 8588 <xsl:choose> 8589 <xsl:when test="$output-type='ARABIC'">16</xsl:when> 8590 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">p</xsl:when> 8591 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">P</xsl:when> 8592 <xsl:when test="$output-type='ROMAN_UPPER'">XVI</xsl:when> 8593 <xsl:when test="$output-type='ROMAN_LOWER'">xvi</xsl:when> 8594 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">16</xsl:when> 8595 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十六</xsl:when> 8596 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">16</xsl:when> 8597 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾陆</xsl:when> 8598 <xsl:when test="$output-type='CIRCLE_NUMBER'">16</xsl:when> 8599 <xsl:otherwise>16</xsl:otherwise> 8600 </xsl:choose> 8601 </xsl:when> 8602 <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='拾柒'"> 8603 <xsl:choose> 8604 <xsl:when test="$output-type='ARABIC'">17</xsl:when> 8605 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">q</xsl:when> 8606 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">Q</xsl:when> 8607 <xsl:when test="$output-type='ROMAN_UPPER'">XVII</xsl:when> 8608 <xsl:when test="$output-type='ROMAN_LOWER'">xvii</xsl:when> 8609 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">17</xsl:when> 8610 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十七</xsl:when> 8611 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">17</xsl:when> 8612 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾柒</xsl:when> 8613 <xsl:when test="$output-type='CIRCLE_NUMBER'">17</xsl:when> 8614 <xsl:otherwise>17</xsl:otherwise> 8615 </xsl:choose> 8616 </xsl:when> 8617 <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='拾捌'"> 8618 <xsl:choose> 8619 <xsl:when test="$output-type='ARABIC'">18</xsl:when> 8620 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">r</xsl:when> 8621 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">R</xsl:when> 8622 <xsl:when test="$output-type='ROMAN_UPPER'">XVIII</xsl:when> 8623 <xsl:when test="$output-type='ROMAN_LOWER'">xviii</xsl:when> 8624 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">18</xsl:when> 8625 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十八</xsl:when> 8626 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">18</xsl:when> 8627 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾捌</xsl:when> 8628 <xsl:when test="$output-type='CIRCLE_NUMBER'">18</xsl:when> 8629 <xsl:otherwise>18</xsl:otherwise> 8630 </xsl:choose> 8631 </xsl:when> 8632 <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='拾玖'"> 8633 <xsl:choose> 8634 <xsl:when test="$output-type='ARABIC'">19</xsl:when> 8635 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">s</xsl:when> 8636 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">S</xsl:when> 8637 <xsl:when test="$output-type='ROMAN_UPPER'">XIX</xsl:when> 8638 <xsl:when test="$output-type='ROMAN_LOWER'">xix</xsl:when> 8639 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">19</xsl:when> 8640 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">十九</xsl:when> 8641 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">19</xsl:when> 8642 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">拾玖</xsl:when> 8643 <xsl:when test="$output-type='CIRCLE_NUMBER'">19</xsl:when> 8644 <xsl:otherwise>19</xsl:otherwise> 8645 </xsl:choose> 8646 </xsl:when> 8647 <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='贰拾'"> 8648 <xsl:choose> 8649 <xsl:when test="$output-type='ARABIC'">20</xsl:when> 8650 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">t</xsl:when> 8651 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">T</xsl:when> 8652 <xsl:when test="$output-type='ROMAN_UPPER'">XX</xsl:when> 8653 <xsl:when test="$output-type='ROMAN_LOWER'">xx</xsl:when> 8654 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">20</xsl:when> 8655 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十</xsl:when> 8656 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">20</xsl:when> 8657 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾</xsl:when> 8658 <xsl:when test="$output-type='CIRCLE_NUMBER'">20</xsl:when> 8659 <xsl:otherwise>20</xsl:otherwise> 8660 </xsl:choose> 8661 </xsl:when> 8662 <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='贰拾壹'"> 8663 <xsl:choose> 8664 <xsl:when test="$output-type='ARABIC'">21</xsl:when> 8665 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">u</xsl:when> 8666 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">U</xsl:when> 8667 <xsl:when test="$output-type='ROMAN_UPPER'">XXI</xsl:when> 8668 <xsl:when test="$output-type='ROMAN_LOWER'">xxi</xsl:when> 8669 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">21</xsl:when> 8670 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十一</xsl:when> 8671 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">21</xsl:when> 8672 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾壹</xsl:when> 8673 <xsl:when test="$output-type='CIRCLE_NUMBER'">21</xsl:when> 8674 <xsl:otherwise>21</xsl:otherwise> 8675 </xsl:choose> 8676 </xsl:when> 8677 <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='贰拾贰'"> 8678 <xsl:choose> 8679 <xsl:when test="$output-type='ARABIC'">22</xsl:when> 8680 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">v</xsl:when> 8681 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">V</xsl:when> 8682 <xsl:when test="$output-type='ROMAN_UPPER'">XXII</xsl:when> 8683 <xsl:when test="$output-type='ROMAN_LOWER'">xxii</xsl:when> 8684 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">22</xsl:when> 8685 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十二</xsl:when> 8686 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">22</xsl:when> 8687 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾贰</xsl:when> 8688 <xsl:when test="$output-type='CIRCLE_NUMBER'">22</xsl:when> 8689 <xsl:otherwise>22</xsl:otherwise> 8690 </xsl:choose> 8691 </xsl:when> 8692 <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='贰拾叁'"> 8693 <xsl:choose> 8694 <xsl:when test="$output-type='ARABIC'">23</xsl:when> 8695 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">w</xsl:when> 8696 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">W</xsl:when> 8697 <xsl:when test="$output-type='ROMAN_UPPER'">XXIII</xsl:when> 8698 <xsl:when test="$output-type='ROMAN_LOWER'">xxiii</xsl:when> 8699 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">23</xsl:when> 8700 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十三</xsl:when> 8701 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">23</xsl:when> 8702 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾叁</xsl:when> 8703 <xsl:when test="$output-type='CIRCLE_NUMBER'">23</xsl:when> 8704 <xsl:otherwise>23</xsl:otherwise> 8705 </xsl:choose> 8706 </xsl:when> 8707 <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='贰拾肆'"> 8708 <xsl:choose> 8709 <xsl:when test="$output-type='ARABIC'">24</xsl:when> 8710 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">x</xsl:when> 8711 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">X</xsl:when> 8712 <xsl:when test="$output-type='ROMAN_UPPER'">XXIV</xsl:when> 8713 <xsl:when test="$output-type='ROMAN_LOWER'">xxiv</xsl:when> 8714 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">24</xsl:when> 8715 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十四</xsl:when> 8716 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">24</xsl:when> 8717 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾肆</xsl:when> 8718 <xsl:when test="$output-type='CIRCLE_NUMBER'">24</xsl:when> 8719 <xsl:otherwise>24</xsl:otherwise> 8720 </xsl:choose> 8721 </xsl:when> 8722 <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='贰拾伍'"> 8723 <xsl:choose> 8724 <xsl:when test="$output-type='ARABIC'">25</xsl:when> 8725 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">y</xsl:when> 8726 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">Y</xsl:when> 8727 <xsl:when test="$output-type='ROMAN_UPPER'">XXV</xsl:when> 8728 <xsl:when test="$output-type='ROMAN_LOWER'">xxv</xsl:when> 8729 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">25</xsl:when> 8730 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十五</xsl:when> 8731 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">25</xsl:when> 8732 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾伍</xsl:when> 8733 <xsl:when test="$output-type='CIRCLE_NUMBER'">25</xsl:when> 8734 <xsl:otherwise>25</xsl:otherwise> 8735 </xsl:choose> 8736 </xsl:when> 8737 <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='贰拾陆'"> 8738 <xsl:choose> 8739 <xsl:when test="$output-type='ARABIC'">26</xsl:when> 8740 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">z</xsl:when> 8741 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">Z</xsl:when> 8742 <xsl:when test="$output-type='ROMAN_UPPER'">XXVI</xsl:when> 8743 <xsl:when test="$output-type='ROMAN_LOWER'">xxvi</xsl:when> 8744 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">26</xsl:when> 8745 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">二十六</xsl:when> 8746 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">26</xsl:when> 8747 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">贰拾陆</xsl:when> 8748 <xsl:when test="$output-type='CIRCLE_NUMBER'">26</xsl:when> 8749 <xsl:otherwise>26</xsl:otherwise> 8750 </xsl:choose> 8751 </xsl:when> 8752 <xsl:otherwise> 8753 <xsl:choose> 8754 <xsl:when test="$output-type='ARABIC'">1</xsl:when> 8755 <xsl:when test="$output-type='CHARS_LOWER_LETTER'">a</xsl:when> 8756 <xsl:when test="$output-type='CHARS_UPPER_LETTER'">A</xsl:when> 8757 <xsl:when test="$output-type='ROMAN_UPPER'">I</xsl:when> 8758 <xsl:when test="$output-type='ROMAN_LOWER'">i</xsl:when> 8759 <xsl:when test="$output-type='FULLWIDTH_ARABIC'">1</xsl:when> 8760 <xsl:when test="$output-type='NUMBER_LOWER_ZH'">一</xsl:when> 8761 <xsl:when test="$output-type='NUMBER_UPPER_ZH_TW'">1</xsl:when> 8762 <xsl:when test="$output-type='NUMBER_UPPER_ZH'">壹</xsl:when> 8763 <xsl:when test="$output-type='CIRCLE_NUMBER'">1</xsl:when> 8764 <xsl:otherwise>1</xsl:otherwise> 8765 </xsl:choose> 8766 </xsl:otherwise> 8767 </xsl:choose> 8768 </xsl:template> 8769 <!--RedOffice comment (Zengjh) end charts--> 8770 <!-- 以下模板的作用是将网格线颜色由16进制转换为十进制 --> 8771 <xsl:template name="transform-hex-to-decimal"> 8772 <xsl:param name="number"/> 8773 <xsl:variable name="R-color-number"> 8774 <xsl:call-template name="color-hex-to-decimal"> 8775 <xsl:with-param name="chars" select="substring($number,2,2)"/> 8776 </xsl:call-template> 8777 </xsl:variable> 8778 <xsl:variable name="G-color-number"> 8779 <xsl:call-template name="color-hex-to-decimal"> 8780 <xsl:with-param name="chars" select="substring($number,4,2)"/> 8781 </xsl:call-template> 8782 </xsl:variable> 8783 <xsl:variable name="B-color-number"> 8784 <xsl:call-template name="color-hex-to-decimal"> 8785 <xsl:with-param name="chars" select="substring($number,6,2)"/> 8786 </xsl:call-template> 8787 </xsl:variable> 8788 <xsl:value-of select="$R-color-number * 65536 + $G-color-number * 256 + $B-color-number"/> 8789 </xsl:template> 8790 <!-- 以下模板的作用是为R或G或B颜色转换为十进制形式--> 8791 <xsl:template name="color-hex-to-decimal"> 8792 <xsl:param name="chars"/> 8793 <xsl:variable name="first-num"> 8794 <xsl:call-template name="hex-to-decimal"> 8795 <xsl:with-param name="char" select="substring($chars,1,1)"/> 8796 </xsl:call-template> 8797 </xsl:variable> 8798 <xsl:variable name="second-num"> 8799 <xsl:call-template name="hex-to-decimal"> 8800 <xsl:with-param name="char" select="substring($chars,2,1)"/> 8801 </xsl:call-template> 8802 </xsl:variable> 8803 <xsl:value-of select="$first-num *16 + $second-num"/> 8804 </xsl:template> 8805 <xsl:template name="hex-to-decimal"> 8806 <xsl:param name="char"/> 8807 <xsl:choose> 8808 <xsl:when test="$char='0'">0</xsl:when> 8809 <xsl:when test="$char='1'">1</xsl:when> 8810 <xsl:when test="$char='2'">2</xsl:when> 8811 <xsl:when test="$char='3'">3</xsl:when> 8812 <xsl:when test="$char='4'">4</xsl:when> 8813 <xsl:when test="$char='5'">5</xsl:when> 8814 <xsl:when test="$char='6'">6</xsl:when> 8815 <xsl:when test="$char='7'">7</xsl:when> 8816 <xsl:when test="$char='8'">8</xsl:when> 8817 <xsl:when test="$char='9'">9</xsl:when> 8818 <xsl:when test="$char='a'">10</xsl:when> 8819 <xsl:when test="$char='b'">11</xsl:when> 8820 <xsl:when test="$char='c'">12</xsl:when> 8821 <xsl:when test="$char='d'">13</xsl:when> 8822 <xsl:when test="$char='e'">14</xsl:when> 8823 <xsl:when test="$char='f'">15</xsl:when> 8824 </xsl:choose> 8825 </xsl:template> 8826 <!-- end --> 8827 <!--ro000179 chenjh--> 8828 <xsl:template name="search-left-top-in-tables"> 8829 <xsl:param name="cellstylename"/> 8830 <xsl:param name="tableslist"/> 8831 <xsl:param name="return"/> 8832 <xsl:choose> 8833 <xsl:when test="$tableslist and $return=''"> 8834 <xsl:variable name="firsttablerows" select="$tableslist[1]//表:行"/> 8835 <xsl:variable name="first-left-top"> 8836 <xsl:call-template name="search-left-top-inatable"> 8837 <xsl:with-param name="row-num" select="'1'"/> 8838 <xsl:with-param name="firsttablerows" select="$firsttablerows"/> 8839 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8840 <xsl:with-param name="return" select="''"/> 8841 </xsl:call-template> 8842 </xsl:variable> 8843 <xsl:variable name="rest-left-top"> 8844 <xsl:call-template name="search-left-top-in-tables"> 8845 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8846 <xsl:with-param name="tableslist" select="$tableslist[position()!=1]"/> 8847 <xsl:with-param name="return" select="$first-left-top"/> 8848 </xsl:call-template> 8849 </xsl:variable> 8850 <xsl:choose> 8851 <xsl:when test="$first-left-top!=''"> 8852 <xsl:value-of select="$first-left-top"/> 8853 </xsl:when> 8854 <xsl:when test="$rest-left-top!=''"> 8855 <xsl:value-of select="$rest-left-top"/> 8856 </xsl:when> 8857 <xsl:otherwise> 8858 <xsl:value-of select="''"/> 8859 </xsl:otherwise> 8860 </xsl:choose> 8861 </xsl:when> 8862 <xsl:otherwise> 8863 <xsl:value-of select="$return"/> 8864 </xsl:otherwise> 8865 </xsl:choose> 8866 </xsl:template> 8867 <!-- 以下模板的作用为在一个table中寻找左上角--> 8868 <xsl:template name="search-left-top-inatable"> 8869 <xsl:param name="row-num"/> 8870 <xsl:param name="firsttablerows"/> 8871 <xsl:param name="cellstylename"/> 8872 <xsl:param name="return"/> 8873 <xsl:choose> 8874 <xsl:when test="$firsttablerows and $return=''"> 8875 <xsl:variable name="firstcells" select="$firsttablerows[1]/表:单元格"/> 8876 <xsl:variable name="first-left-top"> 8877 <xsl:call-template name="search-left-top-inarow"> 8878 <xsl:with-param name="row-num" select="$row-num"/> 8879 <xsl:with-param name="firstcells" select="$firstcells"/> 8880 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8881 <xsl:with-param name="return" select="''"/> 8882 </xsl:call-template> 8883 </xsl:variable> 8884 <xsl:variable name="row-num-p"> 8885 <xsl:choose> 8886 <xsl:when test="$firsttablerows[1]/@表:跨度"> 8887 <xsl:value-of select="$row-num+ $firsttablerows[1]/@表:跨度"/> 8888 </xsl:when> 8889 <xsl:otherwise> 8890 <xsl:value-of select="$row-num+1"/> 8891 </xsl:otherwise> 8892 </xsl:choose> 8893 </xsl:variable> 8894 <xsl:variable name="rest-left-top"> 8895 <xsl:call-template name="search-left-top-inatable"> 8896 <xsl:with-param name="row-num" select="$row-num-p"/> 8897 <xsl:with-param name="firsttablerows" select="$firsttablerows[position()!=1]"/> 8898 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8899 <xsl:with-param name="return" select="$first-left-top"/> 8900 </xsl:call-template> 8901 </xsl:variable> 8902 <xsl:choose> 8903 <xsl:when test="$first-left-top!=''"> 8904 <xsl:value-of select="$first-left-top"/> 8905 </xsl:when> 8906 <xsl:when test="$rest-left-top !=''"> 8907 <xsl:value-of select="$rest-left-top "/> 8908 </xsl:when> 8909 <xsl:otherwise> 8910 <xsl:value-of select="''"/> 8911 </xsl:otherwise> 8912 </xsl:choose> 8913 </xsl:when> 8914 <xsl:otherwise> 8915 <xsl:value-of select="$return"/> 8916 </xsl:otherwise> 8917 </xsl:choose> 8918 </xsl:template> 8919 <!-- 以下模板的作用为在某一行中寻找左上角--> 8920 <xsl:template name="search-left-top-inarow"> 8921 <xsl:param name="row-num"/> 8922 <xsl:param name="firstcells"/> 8923 <xsl:param name="cellstylename"/> 8924 <xsl:param name="return"/> 8925 <xsl:choose> 8926 <xsl:when test="$firstcells and $return=''"> 8927 <xsl:variable name="firstcell" select="$firstcells[1]"/> 8928 <xsl:variable name="first-left-top"> 8929 <xsl:call-template name="search-left-top-inacell"> 8930 <xsl:with-param name="row-num" select="$row-num"/> 8931 <xsl:with-param name="cell" select="$firstcell"/> 8932 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8933 </xsl:call-template> 8934 </xsl:variable> 8935 <xsl:variable name="rest-left-top"> 8936 <xsl:call-template name="search-left-top-inarow"> 8937 <xsl:with-param name="row-num" select="$row-num"/> 8938 <xsl:with-param name="firstcells" select="$firstcells[position()!=1]"/> 8939 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8940 <xsl:with-param name="return" select="$first-left-top"/> 8941 </xsl:call-template> 8942 </xsl:variable> 8943 <xsl:choose> 8944 <xsl:when test="$first-left-top!=''"> 8945 <xsl:value-of select="$first-left-top"/> 8946 </xsl:when> 8947 <xsl:when test="$rest-left-top !=''"> 8948 <xsl:value-of select="$rest-left-top "/> 8949 </xsl:when> 8950 <xsl:otherwise> 8951 <xsl:value-of select="''"/> 8952 </xsl:otherwise> 8953 </xsl:choose> 8954 </xsl:when> 8955 <xsl:otherwise> 8956 <xsl:value-of select="$return"/> 8957 </xsl:otherwise> 8958 </xsl:choose> 8959 </xsl:template> 8960 <!-- 以下的模板的作用为判断某个cell是否为左上角 --> 8961 <xsl:template name="search-left-top-inacell"> 8962 <xsl:param name="row-num"/> 8963 <xsl:param name="cell"/> 8964 <xsl:param name="cellstylename"/> 8965 <xsl:choose> 8966 <xsl:when test="$cell/@表:式样引用=$cellstylename"> 8967 <xsl:value-of select="concat($cell/ancestor::表:工作表/@表:名称,'.',$cell/@表:列号,' ',$row-num)"/> 8968 </xsl:when> 8969 <xsl:otherwise> 8970 <xsl:value-of select="''"/> 8971 <!-- <xsl:variable name="style-is-default"> 8972 <xsl:call-template name="is-default-or-not-condition-format"> 8973 <xsl:with-param name="column-num" select="$cell/@表:列号"/> 8974 <xsl:with-param name="cell" select="$cell"/> 8975 <xsl:with-param name="preceding-cellstylename" select="''"/> 8976 <xsl:with-param name="temp-num" select="'0'"/> 8977 <xsl:with-param name="cellstylename" select="$cellstylename"/> 8978 <xsl:with-param name="table-collumns" select="$cell/ancestor::表:工作表内容//表:列"/> 8979 </xsl:call-template> 8980 </xsl:variable> 8981 <xsl:choose> 8982 <xsl:when test="$style-is-default='yes' "> 8983 <xsl:value-of select="concat($cell/ancestor::表:工作表/@表:名称,'.',$cell/@表:列号,' ',$row-num)"/> 8984 </xsl:when> 8985 <xsl:otherwise> 8986 <xsl:value-of select="''"/> 8987 </xsl:otherwise> 8988 </xsl:choose> --> 8989 </xsl:otherwise> 8990 </xsl:choose> 8991 </xsl:template> 8992 <xsl:template name="translate-left-top"> 8993 <xsl:param name="left-top"/> 8994 <xsl:if test="$left-top!=''"> 8995 <xsl:variable name="column-number" select="substring-before(substring-after($left-top,'.'),' ')"/> 8996 <xsl:variable name="column-number1"> 8997 <xsl:value-of select="floor( $column-number div 26 )"/> 8998 </xsl:variable> 8999 <xsl:variable name="column-number2"> 9000 <xsl:value-of select="$column-number mod 26"/> 9001 </xsl:variable> 9002 <xsl:variable name="column-character1"> 9003 <xsl:call-template name="number-to-character"> 9004 <xsl:with-param name="number" select="$column-number1"/> 9005 </xsl:call-template> 9006 </xsl:variable> 9007 <xsl:variable name="column-character2"> 9008 <xsl:call-template name="number-to-character"> 9009 <xsl:with-param name="number" select="$column-number2"/> 9010 </xsl:call-template> 9011 </xsl:variable> 9012 <xsl:value-of select="concat(substring-before($left-top,'.'),'.',$column-character1,$column-character2,substring-after($left-top,' '))"/> 9013 </xsl:if> 9014 </xsl:template> 9015 <xsl:template name="create-the-condition-format-map"> 9016 <xsl:param name="condition-format-set"/> 9017 <xsl:param name="current-left-top"/> 9018 <xsl:if test="$condition-format-set"> 9019 <xsl:choose> 9020 <xsl:when test="contains($condition-format-set[1]/表:区域/text(),$current-left-top)"> 9021 <xsl:for-each select="$condition-format-set[1]/表:条件"> 9022 <xsl:variable name="condition-text"> 9023 <xsl:choose> 9024 <xsl:when test="@表:类型='cell value'"> 9025 <xsl:choose> 9026 <xsl:when test="表:操作码/text()='between' "> 9027 <xsl:value-of select="concat('cell-content-is-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 9028 </xsl:when> 9029 <xsl:when test=" 表:操作码/text()='not between'"> 9030 <xsl:value-of select="concat('cell-content-is-not-between','(',表:第一操作数/text(),',',表:第二操作数/text(),')')"/> 9031 </xsl:when> 9032 <xsl:when test="表:操作码/text()='equal to'"> 9033 <xsl:value-of select="concat('cell-content()=',表:第一操作数/text())"/> 9034 </xsl:when> 9035 <xsl:when test="表:操作码/text()='not equal to'"> 9036 <xsl:value-of select="concat('cell-content()!=',表:第一操作数/text())"/> 9037 </xsl:when> 9038 <xsl:when test="表:操作码/text()='greater than'"> 9039 <xsl:value-of select="concat('cell-content()>',表:第一操作数/text())"/> 9040 </xsl:when> 9041 <xsl:when test="表:操作码/text()='less than'"> 9042 <xsl:value-of select="concat('cell-content()<',表:第一操作数/text())"/> 9043 </xsl:when> 9044 <xsl:when test="表:操作码/text()='greater than or equal to'"> 9045 <xsl:value-of select="concat('cell-content()>=',表:第一操作数/text())"/> 9046 </xsl:when> 9047 <xsl:when test="表:操作码/text()='less than or equal to'"> 9048 <xsl:value-of select="concat('cell-content()<=',表:第一操作数/text())"/> 9049 </xsl:when> 9050 </xsl:choose> 9051 </xsl:when> 9052 <xsl:when test="@表:类型='formula'"> 9053 <xsl:value-of select="concat('is-true-formula','(',表:第一操作数/text(),')')"/> 9054 </xsl:when> 9055 </xsl:choose> 9056 </xsl:variable> 9057 <xsl:element name="style:map"> 9058 <xsl:attribute name="style:condition"><xsl:value-of select="$condition-text"/></xsl:attribute> 9059 <xsl:attribute name="style:apply-style-name"><xsl:value-of select="//uof:单元格式样[@表:标识符=current()/表:格式/@表:式样引用]/@表:名称"/></xsl:attribute> 9060 <xsl:attribute name="style:base-cell-address"><xsl:value-of select="substring-after($condition-format-set[1]/表:区域/text(),':')"/></xsl:attribute> 9061 </xsl:element> 9062 </xsl:for-each> 9063 </xsl:when> 9064 <xsl:otherwise> 9065 <xsl:call-template name="create-the-condition-format-map"> 9066 <xsl:with-param name="condition-format-set" select="$condition-format-set[position()!=1]"/> 9067 <xsl:with-param name="current-left-top" select="$current-left-top"/> 9068 </xsl:call-template> 9069 </xsl:otherwise> 9070 </xsl:choose> 9071 </xsl:if> 9072 </xsl:template> 9073 <!--ro000179 end--> 9074</xsl:stylesheet> 9075