1<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 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="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 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" exclude-result-prefixes="office style text table draw fo xlink dc meta number presentation svg chart dr3d math form script config ooo ooow oooc dom xforms smil anim"> 23 <xsl:output method="xml" indent="no" encoding="UTF-8" version="1.0"/> 24 <!--xsl:key name="colWidth" match="/office:automatic/style:style/" use="@style:column-width"/--> 25 <xsl:variable name="swValueWithUnit"> 26 <xsl:value-of select="/office:document/office:automatic-styles/style:page-layout/style:page-layout-properties/@fo:page-width"/> 27 </xsl:variable> 28 <xsl:variable name="uofUnit"> 29 <xsl:choose> 30 <xsl:when test="contains($swValueWithUnit,'in')">inch</xsl:when> 31 <xsl:when test="contains($swValueWithUnit,'cm')">cm</xsl:when> 32 <xsl:when test="contains($swValueWithUnit,'mm')">mm</xsl:when> 33 <xsl:when test="contains($swValueWithUnit,'pt')">pt</xsl:when> 34 <xsl:otherwise>inch</xsl:otherwise> 35 </xsl:choose> 36 </xsl:variable> 37 <xsl:variable name="ooUnit"> 38 <xsl:choose> 39 <xsl:when test="contains($swValueWithUnit,'in')">inch</xsl:when> 40 <xsl:when test="contains($swValueWithUnit,'cm')">cm</xsl:when> 41 <xsl:when test="contains($swValueWithUnit,'mm')">mm</xsl:when> 42 <xsl:when test="contains($swValueWithUnit,'pt')">pt</xsl:when> 43 <xsl:otherwise>inch</xsl:otherwise> 44 </xsl:choose> 45 </xsl:variable> 46 <xsl:template match="/"> 47 <xsl:apply-templates select="office:document"/> 48 </xsl:template> 49 <xsl:template match="office:document"> 50 <uof:UOF 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" uof:language="cn" uof:locID="u0000" uof:version="1.0" uof:mimetype="vnd.uof.text"> 51 <xsl:apply-templates select="office:meta"/> 52 <xsl:if test="/office:document/office:body/office:text/text:p/text:bookmark-start|/office:document/office:body/office:text/text:p/text:bookmark"> 53 <uof:书签集 uof:locID="u0027"> 54 <xsl:for-each select="/office:document/office:body/office:text/text:p/text:bookmark-start|/office:document/office:body/office:text/text:p/text:bookmark"> 55 <uof:书签 uof:locID="u0028" uof:attrList="名称"> 56 <xsl:attribute name="uof:名称"><xsl:value-of select="@text:name"/></xsl:attribute> 57 <uof:文本位置 uof:locID="u0029" uof:attrList="区域引用"> 58 <xsl:attribute name="字:区域引用"><xsl:value-of select="generate-id()"/></xsl:attribute> 59 </uof:文本位置> 60 </uof:书签> 61 </xsl:for-each> 62 </uof:书签集> 63 </xsl:if> 64 <xsl:if test="/office:document/office:body/office:text/text:p/text:a | /office:document/office:body/office:text/text:p/draw:a | /office:document/office:body/office:text/table:table/table:table-row/table:table-cell/text:p/text:a | /office:document/office:body/office:text/text:table-of-content/text:index-body/text:p/text:a"> 65 <uof:链接集 uof:locID="u0031"> 66 <xsl:for-each select="/office:document/office:body/office:text/text:p/text:a | /office:document/office:body/office:text/text:p/draw:a | /office:document/office:body/office:text/table:table/table:table-row/table:table-cell/text:p/text:a | /office:document/office:body/office:text/text:table-of-content/text:index-body/text:p/text:a"> 67 <xsl:variable name="hyperStr" select="@xlink:href"/> 68 <uof:超级链接 uof:locID="u0032" uof:attrList="标识符 目标 书签 式样引用 已访问式样引用 提示 链源"> 69 <xsl:if test="contains($hyperStr,'#')"> 70 <xsl:attribute name="uof:书签"><xsl:value-of select="substring-after($hyperStr,'#')"/></xsl:attribute> 71 </xsl:if> 72 <xsl:variable name="num"> 73 <xsl:number from="/office:document/office:body/office:text" level="any" count="text:a | table:table/table:table-row/table:table-cell/text:a"/> 74 </xsl:variable> 75 <xsl:attribute name="uof:链源"><xsl:value-of select="concat('hlnk',$num)"/></xsl:attribute> 76 <xsl:attribute name="uof:标识符"><xsl:value-of select="concat('hyk_','hlnk',$num)"/></xsl:attribute> 77 <xsl:if test="not(contains($hyperStr,'#'))"> 78 <xsl:attribute name="uof:目标"><xsl:value-of select="$hyperStr"/></xsl:attribute> 79 </xsl:if> 80 <xsl:if test="@office:name"> 81 <xsl:attribute name="uof:提示"><xsl:value-of select="@office:name"/></xsl:attribute> 82 </xsl:if> 83 <xsl:if test="@text:style-name"> 84 <xsl:attribute name="uof:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 85 </xsl:if> 86 <xsl:if test="@text:visited-style-name"> 87 <xsl:attribute name="uof:已访问式样引用"><xsl:value-of select="@text:visited-style-name"/></xsl:attribute> 88 </xsl:if> 89 </uof:超级链接> 90 </xsl:for-each> 91 </uof:链接集> 92 </xsl:if> 93 <uof:式样集 uof:locID="u0039"> 94 <xsl:apply-templates select="office:font-face-decls"/> 95 <xsl:call-template name="自动编号集"/> 96 <xsl:call-template name="shiyang"/> 97 <xsl:apply-templates select="office:automatic-styles/style:style" mode="style"/> 98 </uof:式样集> 99 <uof:对象集 uof:locID="u0033"> 100 <xsl:for-each select="/office:document/office:body/office:text/draw:*"> 101 <xsl:variable name="nodename1"> 102 <xsl:value-of select="name()"/> 103 </xsl:variable> 104 <xsl:call-template name="draw"> 105 <xsl:with-param name="nodename1" select="$nodename1"/> 106 </xsl:call-template> 107 </xsl:for-each> 108 <xsl:apply-templates select="/office:document/office:body/office:text//text:p" mode="styles"/> 109 <xsl:apply-templates select="/office:document/office:master-styles/style:master-page/style:header/text:p" mode="styles"/> 110 <xsl:apply-templates select="/office:document/office:master-styles/style:master-page/style:footer/text:p" mode="styles"/> 111 <xsl:for-each select="(/office:document/office:styles/style:style/style:paragraph-properties/style:background-image) | (/office:document/office:automatic-styles/style:style/style:paragraph-properties/style:background-image) | (/office:document/office:automatic-styles/style:page-layout/style:page-layout-properties/style:background-image) | /office:document/office:automatic-styles/style:style/style:table-cell-properties/style:background-image | /office:document/office:automatic-styles/style:style/style:table-properties/style:background-image | /office:document/office:automatic-styles/style:style/style:graphic-properties/style:background-image"> 112 <uof:其他对象 uof:locID="u0036" uof:attrList="标识符 内嵌 公共类型 私有类型"> 113 <xsl:attribute name="uof:标识符"><xsl:value-of select="concat('background-image_',count(preceding::style:background-image))"/></xsl:attribute> 114 <xsl:attribute name="uof:公共类型">png</xsl:attribute> 115 <xsl:attribute name="uof:内嵌">true</xsl:attribute> 116 <uof:数据 uof:locID="u0037"> 117 <xsl:value-of select="office:binary-data"/> 118 </uof:数据> 119 </uof:其他对象> 120 </xsl:for-each> 121 <xsl:for-each select="(/office:document/office:styles/text:list-style/text:list-level-style-image) | (/office:document/office:automatic-styles/text:list-style/text:list-level-style-image)"> 122 <uof:其他对象 uof:locID="u0036" uof:attrList="标识符 内嵌 公共类型 私有类型"> 123 <xsl:attribute name="uof:标识符"><xsl:value-of select="concat('image_numbering_',count(preceding::text:list-level-style-image))"/></xsl:attribute> 124 <xsl:attribute name="uof:公共类型">png</xsl:attribute> 125 <xsl:attribute name="uof:内嵌">true</xsl:attribute> 126 <uof:数据 uof:locID="u0037"> 127 <xsl:value-of select="office:binary-data"/> 128 </uof:数据> 129 </uof:其他对象> 130 </xsl:for-each> 131 <xsl:for-each select="/office:document/office:styles/draw:fill-image"> 132 <uof:其他对象 uof:locID="u0036" uof:attrList="标识符 内嵌 公共类型 私有类型"> 133 <xsl:attribute name="uof:标识符"><xsl:value-of select="@draw:name"/></xsl:attribute> 134 <xsl:attribute name="uof:公共类型">png</xsl:attribute> 135 <xsl:attribute name="uof:内嵌">true</xsl:attribute> 136 <uof:数据 uof:locID="u0037"> 137 <xsl:value-of select="office:binary-data"/> 138 </uof:数据> 139 </uof:其他对象> 140 </xsl:for-each> 141 <!--xsl:apply-templates select="/office:document/office:automatic-styles/style:style[@style:family = 'graphics']"/> 142 <xsl:apply-templates select="office:styles/style:style[@style:family = 'graphics']"/> 143 <xsl:apply-templates select="office:styles/style:default-style [@style:family = 'graphics']"/--> 144 </uof:对象集> 145 <uof:文字处理 uof:locID="u0047"> 146 <字:公用处理规则 uof:locID="t0000"> 147 <xsl:apply-templates select="office:settings"/> 148 <xsl:call-template name="GetUsers"/> 149 <xsl:call-template name="GetTrackChanges"/> 150 <xsl:call-template name="GetAnnotations"/> 151 </字:公用处理规则> 152 <字:主体 uof:locID="t0016"> 153 <xsl:for-each select="office:automatic-styles/style:page-layout[@style:name='pm1']"> 154 <xsl:call-template name="style:page-layout"/> 155 </xsl:for-each> 156 <!--xsl:call-template name="office:automatic-styles/style:page-layout[@style:name='pm1']"/--> 157 <!--xsl:apply-templates select="office:automatic-styles/style:page-layout[@style:name='pm1']"/--> 158 <xsl:apply-templates select="office:body/office:text"/> 159 <xsl:call-template name="logic-chapter"/> 160 </字:主体> 161 </uof:文字处理> 162 </uof:UOF> 163 </xsl:template> 164 <xsl:template name="logic-chapter"> 165 <xsl:element name="字:逻辑章节"> 166 <xsl:attribute name="uof:locID">t0050</xsl:attribute> 167 </xsl:element> 168 </xsl:template> 169 <xsl:template name="GetAnnotations"> 170 <xsl:if test="/*/office:body/office:text//office:annotation "> 171 <字:批注集 uof:locID="t0014"> 172 <xsl:for-each select="/*/office:body/office:text//office:annotation"> 173 <字:批注 uof:locID="t0015" uof:attrList="区域引用 作者 日期 作者缩写"> 174 <xsl:attribute name="字:作者"><xsl:value-of select="generate-id()"/></xsl:attribute> 175 <xsl:attribute name="字:日期"><xsl:value-of select="dc:date"/></xsl:attribute> 176 <xsl:attribute name="字:区域引用">cmt<xsl:number from="/office:document/office:body/office:text" level="any" count="office:annotation"/></xsl:attribute> 177 <xsl:for-each select="./node()"> 178 <xsl:choose> 179 <xsl:when test="name()='text:p'"> 180 <xsl:call-template name="execParagraph"> 181 <xsl:with-param name="currlistlvl" select="number('0')"/> 182 <xsl:with-param name="liststylename" select="string('00000')"/> 183 </xsl:call-template> 184 </xsl:when> 185 <xsl:when test="name()='table:table'"> 186 <xsl:call-template name="exec_table"/> 187 </xsl:when> 188 <xsl:otherwise/> 189 </xsl:choose> 190 </xsl:for-each> 191 </字:批注> 192 </xsl:for-each> 193 </字:批注集> 194 </xsl:if> 195 </xsl:template> 196 <xsl:template name="GetTrackChanges"> 197 <xsl:if test="/*/office:body/office:text/text:tracked-changes"> 198 <字:修订信息集 uof:locID="t0012"> 199 <xsl:for-each select="/*/office:body/office:text/text:tracked-changes/text:changed-region"> 200 <字:修订信息 字:标识符="{@text:id}" 字:作者="{generate-id()}" 字:日期="{node()//office:change-info/dc:date}" uof:locID="t0013" uof:attrList="标识符 作者 日期"/> 201 </xsl:for-each> 202 </字:修订信息集> 203 </xsl:if> 204 </xsl:template> 205 <xsl:template name="GetUsers"> 206 <xsl:if test="/*/office:body/office:text/text:tracked-changes//office:change-info/dc:creator or //office:annotation/@office:author or //office:annotation/dc:creator"> 207 <字:用户集 uof:locID="t0010"> 208 <xsl:for-each select="/*/office:body/office:text/text:tracked-changes/text:changed-region"> 209 <字:用户 字:标识符="{generate-id()}" 字:姓名="{node()//office:change-info/dc:creator}" uof:locID="t0011" uof:attrList="标识符 姓名"/> 210 </xsl:for-each> 211 <xsl:for-each select="//office:annotation"> 212 <字:用户 字:标识符="{generate-id()}" 字:姓名="{dc:creator}" uof:locID="t0011" uof:attrList="标识符 姓名"/> 213 </xsl:for-each> 214 </字:用户集> 215 </xsl:if> 216 </xsl:template> 217 <xsl:key match="/office:document/office:automatic-styles/style:style | /office:document/office:styles/style:style" name="graphicset" use="@style:name"/> 218 <xsl:template match="text:p" mode="styles"> 219 <xsl:for-each select="child::*"> 220 <xsl:variable name="nodename1"> 221 <xsl:value-of select="name()"/> 222 </xsl:variable> 223 <xsl:if test="(substring-before($nodename1,':') = 'draw')"> 224 <xsl:call-template name="draw"> 225 <xsl:with-param name="nodename1" select="$nodename1"/> 226 </xsl:call-template> 227 </xsl:if> 228 </xsl:for-each> 229 </xsl:template> 230 <xsl:template name="draw"> 231 <xsl:param name="nodename1"/> 232 <xsl:choose> 233 <xsl:when test="substring-after($nodename1,':') = 'a'"> 234 <xsl:for-each select="child::*"> 235 <xsl:call-template name="draw"> 236 <xsl:with-param name="nodename"> 237 <xsl:value-of select="name()"/> 238 </xsl:with-param> 239 </xsl:call-template> 240 </xsl:for-each> 241 </xsl:when> 242 <xsl:when test="substring-after($nodename1,':') = 'g'"> 243 <xsl:call-template name="draw:g"/> 244 </xsl:when> 245 <xsl:otherwise> 246 <xsl:call-template name="creategraphicstyles"/> 247 </xsl:otherwise> 248 </xsl:choose> 249 </xsl:template> 250 <xsl:template name="draw:g"> 251 <xsl:variable name="picnumber1"> 252 <xsl:value-of select="count(preceding::draw:g)"/> 253 </xsl:variable> 254 <图:图形 uof:locID="g0000" uof:attrList="层次 标识符 组合列表 其他对象"> 255 <xsl:attribute name="图:标识符"><xsl:value-of select="concat(@draw:style-name,'_',$picnumber1)"/></xsl:attribute> 256 <xsl:attribute name="图:层次"><xsl:choose><xsl:when test="name(parent::node())='draw:g'"><xsl:value-of select="position()"/></xsl:when><xsl:when test="@draw:z-index"><xsl:value-of select="@draw:z-index"/></xsl:when><xsl:otherwise><xsl:value-of select="position()"/></xsl:otherwise></xsl:choose></xsl:attribute> 257 <xsl:attribute name="图:组合列表"><xsl:for-each select="child::*[1]"><xsl:variable name="node1"><xsl:value-of select="@draw:style-name"/></xsl:variable><xsl:variable name="picnumber2"><xsl:value-of select="count(preceding::*[@draw:style-name=$node1])"/></xsl:variable><xsl:call-template name="zuheliebiao"><xsl:with-param name="allnode"><xsl:value-of select="concat($node1,'_',$picnumber2)"/></xsl:with-param><xsl:with-param name="pos" select="2"/></xsl:call-template></xsl:for-each></xsl:attribute> 258 </图:图形> 259 <xsl:for-each select="child::*"> 260 <xsl:choose> 261 <xsl:when test="name()='draw:g'"> 262 <xsl:call-template name="draw:g"/> 263 </xsl:when> 264 <xsl:otherwise> 265 <xsl:call-template name="creategraphicstyles"/> 266 </xsl:otherwise> 267 </xsl:choose> 268 </xsl:for-each> 269 </xsl:template> 270 <xsl:template name="zuheliebiao"> 271 <xsl:param name="allnode"/> 272 <xsl:param name="pos"/> 273 <xsl:choose> 274 <xsl:when test="../child::*[$pos]"> 275 <xsl:for-each select="../child::*[$pos]"> 276 <xsl:variable name="nodepos"> 277 <xsl:value-of select="@draw:style-name"/> 278 </xsl:variable> 279 <xsl:variable name="picnumber1"> 280 <xsl:value-of select="count(preceding::*[@draw:style-name=$nodepos])"/> 281 </xsl:variable> 282 <xsl:variable name="pic-name1"> 283 <xsl:value-of select="concat($nodepos,'_',$picnumber1)"/> 284 </xsl:variable> 285 <xsl:variable name="allnode1"> 286 <xsl:value-of select="concat($allnode,',',$pic-name1)"/> 287 </xsl:variable> 288 <xsl:call-template name="zuheliebiao"> 289 <xsl:with-param name="allnode" select="$allnode1"/> 290 <xsl:with-param name="pos" select="$pos+1"/> 291 </xsl:call-template> 292 </xsl:for-each> 293 </xsl:when> 294 <xsl:otherwise> 295 <xsl:value-of select="$allnode"/> 296 </xsl:otherwise> 297 </xsl:choose> 298 </xsl:template> 299 <xsl:template name="creategraphicstyles"> 300 <xsl:variable name="nodename"> 301 <xsl:value-of select="name()"/> 302 </xsl:variable> 303 <xsl:variable name="pic-name"> 304 <xsl:value-of select="@draw:style-name"/> 305 </xsl:variable> 306 <xsl:variable name="pic-num"> 307 <xsl:value-of select="count(/descendant::*[@draw:style-name=$pic-name])"/> 308 </xsl:variable> 309 <xsl:variable name="picnumber"> 310 <xsl:value-of select="count(preceding::*[@draw:style-name=$pic-name])"/> 311 </xsl:variable> 312 <xsl:call-template name="pic-process"> 313 <xsl:with-param name="pic-name" select="$pic-name"/> 314 <xsl:with-param name="nodename" select="$nodename"/> 315 <xsl:with-param name="picnumber" select="$picnumber"/> 316 </xsl:call-template> 317 </xsl:template> 318 <!--xsl:key match="/office:document/office:automatic-styles/style:style" name="graphicset" use="@style:name"/> 319 320 <xsl:template match="style:style[@style:family = 'graphics']"> 321 <xsl:variable name="pic-name"> 322 <xsl:value-of select="@style:name"/> 323 </xsl:variable> 324 <xsl:variable name="pic-num"> 325 <xsl:value-of select="count(/descendant::*[@draw:style-name=$pic-name])"/> 326 </xsl:variable> 327 <xsl:call-template name="pic-process"> 328 <xsl:with-param name="pic-name" select="$pic-name"/> 329 <xsl:with-param name="pic-num" select="$pic-num"/> 330 <xsl:with-param name="current-num" select="1"/> 331 </xsl:call-template> 332 </xsl:template--> 333 <xsl:template name="pic-process"> 334 <xsl:param name="pic-name"/> 335 <xsl:param name="nodename"/> 336 <xsl:param name="picnumber"/> 337 <图:图形 uof:locID="g0000" uof:attrList="层次 标识符 组合列表 其他对象"> 338 <xsl:attribute name="图:标识符"><xsl:value-of select="concat($pic-name,'_',$picnumber)"/></xsl:attribute> 339 <xsl:attribute name="图:层次"><xsl:value-of select="@draw:z-index"/></xsl:attribute> 340 <xsl:if test=".//office:binary-data"> 341 <xsl:attribute name="图:其他对象"><xsl:choose><xsl:when test="@draw:name"><xsl:value-of select="@draw:name"/></xsl:when><xsl:otherwise><xsl:value-of select="concat($pic-name,'_b1')"/></xsl:otherwise></xsl:choose></xsl:attribute> 342 </xsl:if> 343 <xsl:variable name="arrow-sign"> 344 <xsl:choose> 345 <xsl:when test="key('graphicset',$pic-name)/style:graphic-properties/@draw:marker-start or key('graphicset',$pic-name)/style:graphic-properties/@draw:marker-end"> 346 <xsl:value-of select="'1'"/> 347 </xsl:when> 348 <xsl:otherwise>0</xsl:otherwise> 349 </xsl:choose> 350 </xsl:variable> 351 <xsl:choose> 352 <xsl:when test="$nodename='draw:line' or $nodename='draw:rect' or $nodename='draw:circle' or $nodename='draw:polygon' or $nodename='draw:polyline' or $nodename='draw:ellipse' or $nodename='draw:path'or $nodename='draw:g' or $nodename='draw:text-box' or child::draw:text-box"> 353 <图:预定义图形 uof:locID="g0005"> 354 <图:类别 uof:locID="g0006"> 355 <xsl:choose> 356 <xsl:when test="$nodename='draw:line' and $arrow-sign='1'">62</xsl:when> 357 <xsl:when test="$nodename='draw:rect'">11</xsl:when> 358 <xsl:when test="$nodename='draw:line'">61</xsl:when> 359 <xsl:when test="$nodename='draw:circle'">19</xsl:when> 360 <xsl:when test="$nodename='draw:polygon'">65</xsl:when> 361 <xsl:when test="$nodename='draw:polyline'">66</xsl:when> 362 <xsl:when test="$nodename='draw:ellipse'">19</xsl:when> 363 <xsl:when test="child::draw:text-box[@fo:min-height]">22</xsl:when> 364 <xsl:when test="child::draw:text-box">23</xsl:when> 365 </xsl:choose> 366 </图:类别> 367 <图:名称 uof:locID="g0007"> 368 <xsl:choose> 369 <xsl:when test="$nodename='draw:rect'">Rectangle</xsl:when> 370 <xsl:when test="$nodename='draw:line'">Line</xsl:when> 371 <xsl:when test="$nodename='draw:circle'">Oval</xsl:when> 372 <xsl:when test="$nodename='draw:polygon'">Freeform</xsl:when> 373 <xsl:when test="$nodename='draw:polyline'">Scribble</xsl:when> 374 <xsl:when test="$nodename='draw:ellipse'">Oval</xsl:when> 375 <xsl:when test="$nodename='draw:frame' and child::draw:text-box[@fo:min-height]">排版框</xsl:when> 376 <xsl:when test="$nodename='draw:frame' and child::draw:text-box">排版框</xsl:when> 377 </xsl:choose> 378 </图:名称> 379 <图:生成软件 uof:locID="g0008">PNG</图:生成软件> 380 <xsl:if test="./@draw:points or ./@svg:d"> 381 <图:关键点坐标 uof:locID="g0009" uof:attrList="路径"> 382 <xsl:attribute name="图:路径"><xsl:choose><xsl:when test="@svg:d"><xsl:value-of select="@svg:d"/></xsl:when><xsl:when test="@draw:points"><xsl:call-template name="draw:points"><xsl:with-param name="point" select="@draw:points"/><xsl:with-param name="lujing"/></xsl:call-template></xsl:when></xsl:choose></xsl:attribute> 383 </图:关键点坐标> 384 </xsl:if> 385 <图:属性 uof:locID="g0011"> 386 <xsl:for-each select="(/office:document/office:styles/descendant::*[@style:name=$pic-name]) | (/office:document/office:automatic-styles/descendant::*[@style:name=$pic-name]) "> 387 <xsl:if test="style:graphic-properties/@draw:fill-color or style:graphic-properties/@fo:background-color or style:graphic-properties/@draw:fill-image-name or style:graphic-properties/@draw:fill-gradient-name"> 388 <图:填充 uof:locID="g0012"> 389 <xsl:choose> 390 <xsl:when test="style:graphic-properties/@draw:fill='gradient'"> 391 <xsl:variable name="gradient-name"> 392 <xsl:value-of select="style:graphic-properties/@draw:fill-gradient-name"/> 393 </xsl:variable> 394 <xsl:for-each select="/descendant::draw:gradient[@draw:name=$gradient-name]"> 395 <图:渐变 uof:locID="g0037" uof:attrList="起始色 终止色 种子类型 起始浓度 终止浓度 渐变方向 边界 种子X位置 种子Y位置 类型"> 396 <xsl:attribute name="图:起始色"><xsl:value-of select="@draw:start-color"/></xsl:attribute> 397 <xsl:attribute name="图:终止色"><xsl:value-of select="@draw:end-color"/></xsl:attribute> 398 <xsl:attribute name="图:种子类型"><xsl:choose><xsl:when test="@draw:style='linear' or @draw:style='axial'">linear</xsl:when><xsl:when test="@draw:style='radial'">radar</xsl:when><xsl:when test="@draw:style='ellipsoid'">oval</xsl:when><xsl:when test="@draw:style='square'">square</xsl:when><xsl:when test="@draw:style='rectangular'">rectangle</xsl:when></xsl:choose></xsl:attribute> 399 <xsl:attribute name="图:起始浓度"><xsl:value-of select="substring-before(@draw:start-intensity,'%')"/></xsl:attribute> 400 <xsl:attribute name="图:终止浓度"><xsl:value-of select="substring-before(@draw:end-intensity,'%')"/></xsl:attribute> 401 <xsl:variable name="angle"> 402 <xsl:value-of select="@draw:angle div 10"/> 403 </xsl:variable> 404 <xsl:attribute name="图:渐变方向"><xsl:choose><xsl:when test="0<$angle and $angle<25">0</xsl:when><xsl:when test="25<$angle and $angle<70">45</xsl:when><xsl:when test="70<$angle and $angle<115">90</xsl:when><xsl:when test="115<$angle and $angle<160">135</xsl:when><xsl:when test="160<$angle and $angle<205">180</xsl:when><xsl:when test="205<$angle and $angle<250">225</xsl:when><xsl:when test="250<$angle and $angle<295">270</xsl:when><xsl:when test="295<$angle and $angle<340">315</xsl:when><xsl:when test="340<$angle and $angle<360">360</xsl:when></xsl:choose></xsl:attribute> 405 <xsl:attribute name="图:边界"><xsl:value-of select="substring-before(@draw:border,'%')"/></xsl:attribute> 406 <xsl:if test="@draw:cx"> 407 <xsl:attribute name="图:种子X位置"><xsl:value-of select="substring-before(@draw:cx,'%')"/></xsl:attribute> 408 </xsl:if> 409 <xsl:if test="@draw:cy"> 410 <xsl:attribute name="图:种子Y位置"><xsl:value-of select="substring-before(@draw:cy,'%')"/></xsl:attribute> 411 </xsl:if> 412 <xsl:attribute name="图:类型">-2</xsl:attribute> 413 </图:渐变> 414 </xsl:for-each> 415 </xsl:when> 416 <xsl:when test="style:graphic-properties/@draw:fill-image-name or style:graphic-properties/style:background-image/office:binary-data"> 417 <xsl:choose> 418 <xsl:when test="style:graphic-properties/@draw:fill-image-name"> 419 <图:图片 uof:locID="g0035" uof:attrList="位置 图形引用 类型 名称"> 420 <xsl:attribute name="图:位置"><xsl:choose><xsl:when test="not(style:graphic-properties/@style:repeat)">tile</xsl:when><xsl:otherwise><xsl:choose><xsl:when test="style:graphic-properties/@style:repeat = 'stretch'">stretch</xsl:when><xsl:when test="style:graphic-properties/@style:repeat = 'repeat'">tile</xsl:when><xsl:when test="style:graphic-properties/@style:repeat = 'no-repeat'">center</xsl:when></xsl:choose></xsl:otherwise></xsl:choose></xsl:attribute> 421 <xsl:attribute name="图:图形引用"><xsl:value-of select="concat($pic-name,'_b1')"/></xsl:attribute> 422 <xsl:attribute name="图:类型">png</xsl:attribute> 423 <xsl:attribute name="图:名称"><xsl:value-of select="style:graphic-properties/@draw:fill-image-name"/></xsl:attribute> 424 </图:图片> 425 </xsl:when> 426 <xsl:when test="style:graphic-properties/style:background-image/office:binary-data"> 427 <xsl:for-each select="style:graphic-properties"> 428 <xsl:call-template name="图:填充"/> 429 </xsl:for-each> 430 </xsl:when> 431 </xsl:choose> 432 </xsl:when> 433 <xsl:when test="style:graphic-properties/@draw:fill='hatch'"> 434 <图:图案 uof:locID="g0036" uof:attrList="类型 图形引用 前景色 背景色"> 435 <xsl:attribute name="图:类型"><xsl:value-of select="/office:document/office:styles/draw:hatch/@draw:name"/></xsl:attribute> 436 <xsl:attribute name="图:图形引用"/> 437 <xsl:attribute name="图:前景色"><xsl:value-of select="/office:document/office:styles/draw:hatch/@draw:color"/></xsl:attribute> 438 <xsl:attribute name="图:背景色"><xsl:choose><xsl:when test="style:graphic-properties/@draw:fill-color"><xsl:value-of select="style:graphic-properties/@draw:fill-color"/></xsl:when><xsl:otherwise>#ffffff</xsl:otherwise></xsl:choose></xsl:attribute> 439 </图:图案> 440 </xsl:when> 441 <xsl:otherwise> 442 <图:颜色 uof:locID="g0034"> 443 <xsl:choose> 444 <xsl:when test="style:graphic-properties/@draw:fill-color"> 445 <xsl:value-of select="style:graphic-properties/@draw:fill-color"/> 446 </xsl:when> 447 <xsl:when test="style:graphic-properties/@fo:background-color"> 448 <xsl:value-of select="style:graphic-properties/@fo:background-color"/> 449 </xsl:when> 450 <xsl:otherwise>#99ccff</xsl:otherwise> 451 </xsl:choose> 452 </图:颜色> 453 </xsl:otherwise> 454 </xsl:choose> 455 </图:填充> 456 </xsl:if> 457 <xsl:if test="style:graphic-properties/@svg:stroke-color"> 458 <图:线颜色 uof:locID="g0013"> 459 <xsl:value-of select="style:graphic-properties/@svg:stroke-color"/> 460 </图:线颜色> 461 </xsl:if> 462 <图:线型 uof:locID="g0014"> 463 <xsl:variable name="linetype" select="style:graphic-properties/@draw:stroke-dash"/> 464 <xsl:choose> 465 <xsl:when test="style:graphic-properties/@fo:border='none'">none</xsl:when> 466 <xsl:when test="not(style:graphic-properties/@draw:stroke)"> 467 <xsl:choose> 468 <xsl:when test="not(style:graphic-properties/@svg:stroke-width)">single</xsl:when> 469 <xsl:otherwise>thick</xsl:otherwise> 470 </xsl:choose> 471 </xsl:when> 472 <xsl:otherwise> 473 <xsl:choose> 474 <xsl:when test="style:graphic-properties/@draw:stroke = 'none'">none</xsl:when> 475 <xsl:otherwise> 476 <xsl:choose> 477 <xsl:when test="$linetype='Fine_20_Dashed' and style:graphic-properties/@svg:stroke-width">dash-long-heavy</xsl:when> 478 <xsl:when test="$linetype='Fine_20_Dashed'">dash-long</xsl:when> 479 <xsl:when test="$linetype='2 Dots 1 Dash' and style:graphic-properties/@svg:stroke-width">dash-dot-dot-heavy</xsl:when> 480 <xsl:when test="$linetype='2 Dots 1 Dash'">dot-dot-dash</xsl:when> 481 <xsl:when test="$linetype='Ultrafine Dashed' and style:graphic-properties/@svg:stroke-width">dashed-heavy</xsl:when> 482 <xsl:when test="$linetype='Ultrafine Dotted (var)'and style:graphic-properties/@svg:stroke-width">dotted-heavy</xsl:when> 483 <xsl:when test="$linetype='Ultrafine Dotted (var)'">dotted</xsl:when> 484 <xsl:when test="$linetype='Line with Fine Dots'">double</xsl:when> 485 <xsl:when test="$linetype='3 Dashes 3 Dots (var)' and style:graphic-properties/@svg:stroke-width">dash-dot-heavy</xsl:when> 486 <xsl:when test="$linetype='3 Dashes 3 Dots (var)'">dot-dash</xsl:when> 487 <xsl:when test="$linetype='Ultrafine 2 Dots 3 Dashes'and style:graphic-properties/@svg:stroke-width">wavy-heavy</xsl:when> 488 <xsl:when test="$linetype='Ultrafine 2 Dots 3 Dashes'">wave</xsl:when> 489 <xsl:when test="$linetype='Fine Dashed (var)'">wavy-double</xsl:when> 490 <xsl:otherwise>dash</xsl:otherwise> 491 </xsl:choose> 492 </xsl:otherwise> 493 </xsl:choose> 494 </xsl:otherwise> 495 </xsl:choose> 496 </图:线型> 497 <xsl:if test="style:graphic-properties/@svg:stroke-width"> 498 <图:线粗细 uof:locID="g0016"> 499 <xsl:value-of select="substring-before(style:graphic-properties/@svg:stroke-width,$uofUnit)"/> 500 </图:线粗细> 501 </xsl:if> 502 <xsl:if test="style:graphic-properties/@draw:marker-start and string-length(style:graphic-properties/@draw:marker-start)>0"> 503 <图:前端箭头 uof:locID="g0017"> 504 <图:式样 uof:locID="g0018"> 505 <xsl:choose> 506 <xsl:when test="style:graphic-properties/@draw:marker-start='Arrow'">normal</xsl:when> 507 <xsl:when test="style:graphic-properties/@draw:marker-start='Line Arrow'">open</xsl:when> 508 <xsl:when test="style:graphic-properties/@draw:marker-start='Arrow concave'">stealth</xsl:when> 509 <xsl:when test="style:graphic-properties/@draw:marker-start='Circle'">oval</xsl:when> 510 <xsl:when test="style:graphic-properties/@draw:marker-start='Square 45'">diamond</xsl:when> 511 <xsl:otherwise>normal</xsl:otherwise> 512 </xsl:choose> 513 </图:式样> 514 <图:大小 uof:locID="g0019"> 515 <xsl:choose> 516 <xsl:when test="not(style:graphic-properties/@draw:marker-start-width)">4</xsl:when> 517 <xsl:otherwise> 518 <xsl:call-template name="graphsize"> 519 <xsl:with-param name="width" select="substring-before(style:graphic-properties/@draw:marker-start-width,$uofUnit)"/> 520 <xsl:with-param name="Unitofsize" select="$uofUnit"/> 521 </xsl:call-template> 522 </xsl:otherwise> 523 </xsl:choose> 524 </图:大小> 525 </图:前端箭头> 526 </xsl:if> 527 <xsl:if test="style:graphic-properties/@draw:marker-end"> 528 <图:后端箭头 uof:locID="g0017"> 529 <图:式样 uof:locID="g0018"> 530 <xsl:choose> 531 <xsl:when test="style:graphic-properties/@draw:marker-end='Arrow'">normal</xsl:when> 532 <xsl:when test="style:graphic-properties/@draw:marker-end='Line Arrow'">open</xsl:when> 533 <xsl:when test="style:graphic-properties/@draw:marker-end='Arrow concave'">stealth</xsl:when> 534 <xsl:when test="style:graphic-properties/@draw:marker-end='Circle'">oval</xsl:when> 535 <xsl:when test="style:graphic-properties/@draw:marker-end='Square 45'">diamond</xsl:when> 536 <xsl:otherwise>normal</xsl:otherwise> 537 </xsl:choose> 538 </图:式样> 539 <图:大小 uof:locID="g0022"> 540 <xsl:choose> 541 <xsl:when test="not(style:properties/@draw:marker-start-width)">4</xsl:when> 542 <xsl:otherwise> 543 <xsl:variable name="width"> 544 <xsl:value-of select="substring-before(style:graphic-properties/@draw:marker-end-width,$uofUnit)"/> 545 </xsl:variable> 546 <xsl:choose> 547 <xsl:when test="(not($width>0.05) and 0<$width) or $width=0.05">1</xsl:when> 548 <xsl:when test="(not($width>0.10) and 0.05<$width) or $width=0.10">2</xsl:when> 549 <xsl:when test="(not($width>0.15) and 0.10<$width) or $width=0.15">3</xsl:when> 550 <xsl:when test="(not($width>0.20) and 0.15<$width) or $width=0.20">4</xsl:when> 551 <xsl:when test="(not($width>0.25) and 0.20<$width) or $width=0.25">5</xsl:when> 552 <xsl:when test="(not($width>0.30) and 0.25<$width) or $width=0.30">6</xsl:when> 553 <xsl:when test="(not($width>0.35) and 0.30<$width) or $width=0.35">7</xsl:when> 554 <xsl:when test="(not($width>0.40) and 0.35<$width) or $width=0.40">8</xsl:when> 555 <xsl:otherwise>9</xsl:otherwise> 556 </xsl:choose> 557 </xsl:otherwise> 558 </xsl:choose> 559 </图:大小> 560 </图:后端箭头> 561 </xsl:if> 562 <xsl:if test="style:graphic-properties/@draw:opacity or style:graphic-properties/@draw:transparency"> 563 <图:透明度 uof:locID="g0038"> 564 <xsl:choose> 565 <xsl:when test="style:graphic-properties/@draw:transparency"> 566 <xsl:value-of select="substring-before(style:graphic-properties/@draw:transparency,'%')"/> 567 </xsl:when> 568 <xsl:when test="style:graphic-properties/@draw:opacity"> 569 <xsl:value-of select="100 - substring-before(style:graphic-properties/@draw:opacity,'%')"/> 570 </xsl:when> 571 </xsl:choose> 572 </图:透明度> 573 </xsl:if> 574 </xsl:for-each> 575 <xsl:choose> 576 <xsl:when test="@svg:x1"> 577 <图:宽度 uof:locID="g0023"> 578 <xsl:value-of select="substring-before(@svg:x2,$uofUnit) - substring-before(@svg:x1,$uofUnit)"/> 579 </图:宽度> 580 <图:高度 uof:locID="g0024"> 581 <xsl:value-of select="substring-before(@svg:y2,$uofUnit) - substring-before(@svg:y1,$uofUnit)"/> 582 </图:高度> 583 </xsl:when> 584 <xsl:when test="@svg:x"> 585 <图:宽度 uof:locID="g0023"> 586 <xsl:value-of select="substring-before(@svg:width,$uofUnit)"/> 587 </图:宽度> 588 <图:高度 uof:locID="g0024"> 589 <xsl:value-of select="substring-before(@svg:height,$uofUnit)"/> 590 </图:高度> 591 </xsl:when> 592 <xsl:when test="child::draw:text-box/@fo:min-height"> 593 <图:宽度 uof:locID="g0023"> 594 <xsl:value-of select="substring-before(@svg:width,$uofUnit)"/> 595 </图:宽度> 596 <图:高度 uof:locID="g0024"> 597 <xsl:value-of select="substring-before(child::draw:text-box/@fo:min-height,$uofUnit)"/> 598 </图:高度> 599 </xsl:when> 600 <xsl:when test="@svg:width"> 601 <图:宽度 uof:locID="g0023"> 602 <xsl:value-of select="substring-before(@svg:width,$uofUnit)"/> 603 </图:宽度> 604 <图:高度 uof:locID="g0024"> 605 <xsl:value-of select="substring-before(@svg:height,$uofUnit)"/> 606 </图:高度> 607 </xsl:when> 608 </xsl:choose> 609 <图:旋转角度 uof:locID="g0025"> 610 <xsl:choose> 611 <xsl:when test="@draw:transform"> 612 <xsl:variable name="rotate-angle"> 613 <xsl:value-of select="@draw:transform"/> 614 </xsl:variable> 615 <xsl:variable name="rotate-temp"> 616 <xsl:value-of select="substring-before(substring-after($rotate-angle,'rotate ('),')')"/> 617 </xsl:variable> 618 <xsl:value-of select="($rotate-temp * 360) div (2 * 3.14159265)"/> 619 </xsl:when> 620 <xsl:otherwise>0.0</xsl:otherwise> 621 </xsl:choose> 622 </图:旋转角度> 623 <图:X-缩放比例 uof:locID="g0026">1</图:X-缩放比例> 624 <图:Y-缩放比例 uof:locID="g0027">1</图:Y-缩放比例> 625 <图:锁定纵横比 uof:locID="g0028">0</图:锁定纵横比> 626 <图:相对原始比例 uof:locID="g0029">1</图:相对原始比例> 627 <图:打印对象 uof:locID="g0032">true</图:打印对象> 628 <图:Web文字 uof:locID="g0033"/> 629 </图:属性> 630 </图:预定义图形> 631 </xsl:when> 632 <xsl:when test="name()='draw:path'"> 633 <图:svg图形对象 图:version="1.1" 图:xmlns_xlink="http://www.w3.org/1999/xlink"> 634 <xsl:attribute name="图:x"><xsl:value-of select="@svg:x"/></xsl:attribute> 635 <xsl:attribute name="图:y"><xsl:value-of select="@svg:y"/></xsl:attribute> 636 <xsl:attribute name="图:width"><xsl:value-of select="@svg:width"/></xsl:attribute> 637 <xsl:attribute name="图:height"><xsl:value-of select="@svg:height"/></xsl:attribute> 638 <xsl:attribute name="图:viewBox"><xsl:value-of select="@svg:viewBox"/></xsl:attribute> 639 <图:path> 640 <xsl:attribute name="图:d"><xsl:value-of select="@svg:d"/></xsl:attribute> 641 </图:path> 642 </图:svg图形对象> 643 </xsl:when> 644 </xsl:choose> 645 <图:文本内容 uof:locID="g0002" uof:attrList="文本框 左边距 右边距 上边距 下边距 水平对齐 垂直对齐 文字排列方向 自动换行 大小适应文字 前一链接 后一链接"> 646 <xsl:if test="./draw:text-box"> 647 <xsl:attribute name="图:文本框">true</xsl:attribute> 648 <xsl:if test="./@draw:name = /office:document/office:body/office:text//draw:text-box/@draw:chain-next-name"> 649 <xsl:attribute name="图:前一链接"><xsl:variable name="drawname"><xsl:value-of select="./@draw:name"/></xsl:variable><xsl:variable name="befor-link-name"><xsl:value-of select="/office:document/office:body/office:text//draw:text-box[@draw:name=$drawname]/@draw:style-name"/></xsl:variable><xsl:value-of select="concat($befor-link-name,'_',$picnumber)"/></xsl:attribute> 650 </xsl:if> 651 <xsl:if test="./@draw:chain-next-name"> 652 <xsl:attribute name="图:后一链接"><xsl:variable name="next-link"><xsl:value-of select="./@draw:chain-next-name"/></xsl:variable><xsl:variable name="link-name"><xsl:value-of select="/office:document/office:body/office:text//draw:text-box[@draw:name=$next-link]/@draw:style-name"/></xsl:variable><xsl:value-of select="concat($link-name,'_',$picnumber)"/></xsl:attribute> 653 </xsl:if> 654 </xsl:if> 655 <xsl:for-each select="(/office:document/office:styles/descendant::*[@style:name=$pic-name]) | (/office:document/office:automatic-styles/descendant::*[@style:name=$pic-name]) "> 656 <xsl:if test="style:text-properties/@fo:padding-left"> 657 <xsl:attribute name="图:左边距"><xsl:value-of select="style:text-properties/@fo:padding-left"/></xsl:attribute> 658 <xsl:attribute name="图:右边距"><xsl:value-of select="style:text-properties/@fo:padding-right"/></xsl:attribute> 659 <xsl:attribute name="图:上边距"><xsl:value-of select="style:text-properties/@fo:padding-top"/></xsl:attribute> 660 <xsl:attribute name="图:下边距"><xsl:value-of select="style:text-properties/@fo:padding-bottom"/></xsl:attribute> 661 </xsl:if> 662 <xsl:attribute name="图:文字排列方向"><xsl:choose><xsl:when test="style:paragraph-properties/@style:writing-mode"><xsl:choose><xsl:when test="style:paragraph-properties/@style:writing-mode='tb-lr'">vert-l2r</xsl:when><xsl:when test="style:paragraph-properties/@style:writing-mode='tb-rl'">vert-r2l</xsl:when></xsl:choose></xsl:when><xsl:when test="style:graphic-properties/@style:writing-mode='tb-lr'">vert-l2r</xsl:when><xsl:when test="style:graphic-properties/@style:writing-mode='tb-rl'">vert-r2l</xsl:when><xsl:when test="style:paragraph-properties/@draw:textarea-horizontal-align='right'">hori-r2l</xsl:when><xsl:otherwise>hori-l2r</xsl:otherwise></xsl:choose></xsl:attribute> 663 <xsl:if test="style:text-properties/@fo:wrap-option"> 664 <xsl:attribute name="图:自动换行">true</xsl:attribute> 665 </xsl:if> 666 <xsl:if test="style:graphic-properties/@draw:textarea-horizontal-align"> 667 <xsl:attribute name="图:水平对齐"><xsl:value-of select="style:graphic-properties/@draw:textarea-horizontal-align"/></xsl:attribute> 668 </xsl:if> 669 <xsl:if test="style:graphic-properties/@draw:textarea-vertical-align"> 670 <xsl:attribute name="图:垂直对齐"><xsl:value-of select="style:graphic-properties/@draw:textarea-vertical-align"/></xsl:attribute> 671 </xsl:if> 672 <xsl:if test="style:graphic-properties/@draw:auto-grow-width='true' and style:graphic-properties/@draw:auto-grow-height='true'"> 673 <xsl:attribute name="图:大小适应文字"><xsl:choose><xsl:when test="style:graphic-properties/@draw:auto-grow-width='true' and style:graphic-properties/@draw:auto-grow-height='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 674 </xsl:if> 675 </xsl:for-each> 676 <xsl:for-each select="text:p"> 677 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 678 <xsl:if test="style:paragraph-properties"> 679 <字:段落属性 uof:locID="t0052" uof:attrList="式样引用"> 680 <xsl:apply-templates select="style:paragraph-properties"/> 681 </字:段落属性> 682 </xsl:if> 683 <xsl:call-template name="textp"/> 684 </字:段落> 685 </xsl:for-each> 686 <xsl:for-each select="draw:text-box/text:p"> 687 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 688 <xsl:if test="style:paragraph-properties"> 689 <字:段落属性 uof:locID="t0052" uof:attrList="式样引用"> 690 <xsl:apply-templates select="style:paragraph-properties"/> 691 </字:段落属性> 692 </xsl:if> 693 <xsl:call-template name="textp"/> 694 </字:段落> 695 </xsl:for-each> 696 </图:文本内容> 697 <xsl:if test="@svg:x and @svg:y"> 698 <图:控制点 uof:locID="g0003" uof:attrList="x坐标 y坐标"> 699 <xsl:attribute name="图:x坐标"><xsl:value-of select="substring-before(@svg:x,$uofUnit)"/></xsl:attribute> 700 <xsl:attribute name="图:y坐标"><xsl:value-of select="substring-before(@svg:y,$uofUnit)"/></xsl:attribute> 701 </图:控制点> 702 </xsl:if> 703 </图:图形> 704 <xsl:if test="name()='draw:frame' and ./draw:image"> 705 <uof:其他对象 uof:locID="u0036" uof:attrList="标识符 内嵌 公共类型 私有类型"> 706 <xsl:attribute name="uof:标识符"><xsl:value-of select="concat($pic-name,'_',$picnumber)"/></xsl:attribute> 707 <xsl:attribute name="uof:内嵌">true</xsl:attribute> 708 <xsl:variable name="pic"> 709 <xsl:choose> 710 <xsl:when test="contains(./draw:image/@xlink:href,'.png')">png</xsl:when> 711 <xsl:when test="contains(./draw:image/@xlink:href,'.jpg')">jpg</xsl:when> 712 <xsl:when test="contains(./draw:image/@xlink:href,'.gif')">gif</xsl:when> 713 <xsl:when test="contains(./draw:image/@xlink:href,'.bmp')">bmp</xsl:when> 714 <xsl:when test="contains(./draw:image/@xlink:href,'.pbm')">pbm</xsl:when> 715 <xsl:when test="contains(./draw:image/@xlink:href,'.ras')">ras</xsl:when> 716 <xsl:when test="contains(./draw:image/@xlink:href,'.txt')">text</xsl:when> 717 <xsl:when test="contains(./draw:image/@xlink:href,'.xml')">xml</xsl:when> 718 <xsl:when test="contains(./draw:image/@xlink:href,'.htm')">html</xsl:when> 719 <xsl:when test="contains(./draw:image/@xlink:href,'.html')">html</xsl:when> 720 <xsl:when test="contains(./draw:image/@xlink:href,'.wav')">wav</xsl:when> 721 <xsl:when test="contains(./draw:image/@xlink:href,'.mid')">midi</xsl:when> 722 <xsl:when test="contains(./draw:image/@xlink:href,'.ra')">ra</xsl:when> 723 <xsl:when test="contains(./draw:image/@xlink:href,'.au')">au</xsl:when> 724 <xsl:when test="contains(./draw:image/@xlink:href,'.mp3')">mp3</xsl:when> 725 <xsl:when test="contains(./draw:image/@xlink:href,'.snd')">snd</xsl:when> 726 <xsl:when test="contains(./draw:image/@xlink:href,'.svg')">svg</xsl:when> 727 <xsl:when test="contains(./draw:image/@xlink:href,'.avi')">avi</xsl:when> 728 <xsl:when test="contains(./draw:image/@xlink:href,'.mpeg')">mpeg4</xsl:when> 729 <xsl:when test="contains(./draw:image/@xlink:href,'.qt')">qt</xsl:when> 730 <xsl:when test="contains(./draw:image/@xlink:href,'.rm')">rm</xsl:when> 731 <xsl:when test="contains(./draw:image/@xlink:href,'.asf')">asf</xsl:when> 732 <xsl:otherwise>图片</xsl:otherwise> 733 </xsl:choose> 734 </xsl:variable> 735 <xsl:choose> 736 <xsl:when test="$pic!='图片'"> 737 <xsl:attribute name="uof:公共类型"><xsl:value-of select="$pic"/></xsl:attribute> 738 </xsl:when> 739 <xsl:otherwise> 740 <xsl:attribute name="uof:私有类型">图片</xsl:attribute> 741 </xsl:otherwise> 742 </xsl:choose> 743 <xsl:if test="./draw:image/office:binary-data"> 744 <uof:数据 uof:locID="u0037"> 745 <xsl:value-of select="./draw:image/office:binary-data"/> 746 </uof:数据> 747 </xsl:if> 748 <xsl:if test="./draw:image/@xlink:href"> 749 <uof:路径 uof:locID="u0038"> 750 <xsl:value-of select="./draw:image/@xlink:href"/> 751 </uof:路径> 752 </xsl:if> 753 </uof:其他对象> 754 </xsl:if> 755 <xsl:for-each select="(/office:document/office:styles/descendant::*[@style:name=$pic-name]) | (/office:document/office:automatic-styles/descendant::*[@style:name=$pic-name]) "> 756 <xsl:if test="style:text-properties/@draw:fill-image-name"> 757 <uof:其他对象 uof:locID="u0036" uof:attrList="标识符 内嵌 公共类型 私有类型"> 758 <xsl:attribute name="uof:标识符"><xsl:value-of select="concat($pic-name,'-b1')"/></xsl:attribute> 759 <xsl:attribute name="uof:公共类型">png</xsl:attribute> 760 <xsl:attribute name="uof:内嵌">true</xsl:attribute> 761 <xsl:variable name="fill-name"> 762 <xsl:value-of select="style:text-properties/@draw:fill-image-name"/> 763 </xsl:variable> 764 <uof:数据 uof:locID="u0037"> 765 <xsl:for-each select="/office:document/office:styles/draw:fill-image[@draw:name=$fill-name]"> 766 <xsl:value-of select="office:binary-data"/> 767 </xsl:for-each> 768 </uof:数据> 769 <uof:路径 uof:locID="u0038"> 770 <xsl:value-of select="@xlink:href"/> 771 </uof:路径> 772 </uof:其他对象> 773 </xsl:if> 774 </xsl:for-each> 775 </xsl:template> 776 <xsl:template name="draw:points"> 777 <xsl:param name="point"/> 778 <xsl:param name="lujing"/> 779 <xsl:choose> 780 <xsl:when test="contains($point,' ' )"> 781 <xsl:variable name="first-point" select="substring-before($point,' ')"/> 782 <xsl:variable name="other-point" select="substring-after($point,' ')"/> 783 <xsl:variable name="xzuobiao"> 784 <xsl:value-of select="substring-before($first-point,',') div 1000"/> 785 </xsl:variable> 786 <xsl:variable name="yzuobiao"> 787 <xsl:value-of select="substring-after($first-point,',') div 1000"/> 788 </xsl:variable> 789 <xsl:call-template name="draw:points"> 790 <xsl:with-param name="point" select="$other-point"/> 791 <xsl:with-param name="lujing" select="concat($lujing,$xzuobiao,' ',$yzuobiao,'lineto')"/> 792 </xsl:call-template> 793 </xsl:when> 794 <xsl:otherwise> 795 <xsl:variable name="xzuobiao"> 796 <xsl:value-of select="substring-before($point,',') div 1000"/> 797 </xsl:variable> 798 <xsl:variable name="yzuobiao"> 799 <xsl:value-of select="substring-after($point,',') div 1000"/> 800 </xsl:variable> 801 <xsl:value-of select="concat($lujing,$xzuobiao,' ',$yzuobiao)"/> 802 </xsl:otherwise> 803 </xsl:choose> 804 </xsl:template> 805 <xsl:template match="office:meta"> 806 <uof:元数据 uof:locID="u0001"> 807 <uof:标题 uof:locID="u0002"> 808 <xsl:value-of select="dc:title"/> 809 </uof:标题> 810 <uof:创建应用程序 uof:locID="u0011"> 811 <xsl:value-of select="meta:generator"/> 812 </uof:创建应用程序> 813 <uof:摘要 uof:locID="u0007"> 814 <xsl:value-of select="dc:description"/> 815 </uof:摘要> 816 <uof:主题 uof:locID="u0003"> 817 <xsl:value-of select="dc:subject"/> 818 </uof:主题> 819 <uof:创建者 uof:locID="u0004"> 820 <xsl:value-of select="meta:initial-creator"/> 821 </uof:创建者> 822 <!--uof:作者 uof:locID="u0005"> 823 <xsl:value-of select="meta:initial-creator"/> 824 </uof:作者--> 825 <uof:创建日期 uof:locID="u0008"> 826 <xsl:value-of select="meta:creation-date"/> 827 </uof:创建日期> 828 <uof:最后作者 uof:locID="u0006"> 829 <xsl:value-of select="dc:creator"/> 830 </uof:最后作者> 831 <uof:关键字集 uof:locID="u0014"> 832 <xsl:for-each select="."> 833 <uof:关键字 uof:locID="u0015"> 834 <xsl:value-of select="meta:keywords/@meta:keyword"/> 835 </uof:关键字> 836 </xsl:for-each> 837 </uof:关键字集> 838 <uof:编辑次数 uof:locID="u0009"> 839 <xsl:value-of select="meta:editing-cycles"/> 840 </uof:编辑次数> 841 <xsl:if test="meta:editing-duration"> 842 <uof:编辑时间 uof:locID="u0010"> 843 <xsl:value-of select="meta:editing-duration"/> 844 </uof:编辑时间> 845 </xsl:if> 846 <xsl:if test="meta:template/@xlink:href"> 847 <uof:文档模板 uof:locID="u0013"> 848 <xsl:value-of select="meta:template/@xlink:href"/> 849 </uof:文档模板> 850 </xsl:if> 851 <xsl:if test="meta:user-defined/@meta:name"> 852 <uof:用户自定义元数据集 uof:locID="u0016"> 853 <xsl:for-each select="meta:user-defined"> 854 <uof:用户自定义元数据 uof:locID="u0017" uof:attrList="名称 类型"> 855 <xsl:attribute name="uof:名称"><xsl:value-of select="@meta:name"/></xsl:attribute> 856 <xsl:attribute name="uof:类型"><xsl:value-of select="'string'"/></xsl:attribute> 857 </uof:用户自定义元数据> 858 </xsl:for-each> 859 </uof:用户自定义元数据集> 860 </xsl:if> 861 <!--xsl:if test="meta:document-statistic/@meta:page-count"--> 862 <uof:页数 uof:locID="u0020"> 863 <xsl:value-of select="meta:document-statistic/@meta:page-count"/> 864 </uof:页数> 865 <!--/xsl:if--> 866 <!--xsl:if test="meta:document-statistic/@meta:paragraph-count"--> 867 <uof:段落数 uof:locID="u0025"> 868 <xsl:value-of select="meta:document-statistic/@meta:paragraph-count"/> 869 </uof:段落数> 870 <!--/xsl:if--> 871 <!--xsl:if test="meta:document-statistic/@meta:object-count"--> 872 <uof:对象数 uof:locID="u0026"> 873 <xsl:value-of select="meta:document-statistic/@meta:object-count"/> 874 </uof:对象数> 875 <!--/xsl:if--> 876 <!--xsl:if test="meta:document-statistic/@meta:character-count"--> 877 <uof:字数 uof:locID="u0021"> 878 <xsl:value-of select="meta:document-statistic/@meta:character-count"/> 879 </uof:字数> 880 <!--/xsl:if--> 881 <!--xsl:if test="meta:document-statistic/@meta:word-count"--> 882 <uof:中文字符数 uof:locID="u0023"> 883 <xsl:value-of select="meta:document-statistic/@meta:word-count"/> 884 </uof:中文字符数> 885 <!--/xsl:if--> 886 <uof:英文字符数 uof:locID="u0022"> 887 <xsl:value-of select="meta:document-statistic/@meta:character-count - meta:document-statistic/@meta:word-count"/> 888 </uof:英文字符数> 889 <uof:行数 uof:locID="u0024"> 890 <xsl:variable name="quzhi"> 891 <xsl:value-of select="(meta:document-statistic/@meta:character-count div 39) + 0.9"/> 892 </xsl:variable> 893 <xsl:value-of select="substring-before($quzhi,'.')"/> 894 </uof:行数> 895 <uof:分类 uof:locID="u0012"> 896 <xsl:value-of select="meta:user-defined[@meta:name='Category']"/> 897 </uof:分类> 898 <uof:经理名称 uof:locID="u0019"> 899 <xsl:value-of select="meta:user-defined[meta:name='Manager']"/> 900 </uof:经理名称> 901 <uof:公司名称 uof:locID="u0018"> 902 <xsl:value-of select="meta:user-defined[meta:name='Company']"/> 903 </uof:公司名称> 904 </uof:元数据> 905 </xsl:template> 906 <xsl:template match="office:font-face-decls"> 907 <uof:字体集 uof:locID="u0040"> 908 <xsl:for-each select="style:font-face"> 909 <xsl:element name="uof:字体声明"> 910 <xsl:attribute name="uof:attrList">标识符 名称 字体族</xsl:attribute> 911 <xsl:attribute name="uof:locID">u0041</xsl:attribute> 912 <xsl:attribute name="uof:名称"><xsl:value-of select="@svg:font-family"/></xsl:attribute> 913 <xsl:attribute name="uof:标识符"><xsl:value-of select="translate(@style:name,' ','_')"/></xsl:attribute> 914 <xsl:if test="@style:font-charset= '02'"> 915 <xsl:attribute name="uof:字符集">x-symbol</xsl:attribute> 916 </xsl:if> 917 <xsl:if test="@style:font-family-generic"> 918 <xsl:choose> 919 <xsl:when test="@style:font-family-generic = 'swiss'"> 920 <xsl:attribute name="uof:字体族">Swiss</xsl:attribute> 921 </xsl:when> 922 <xsl:when test="@style:font-family-generic ='modern'"> 923 <xsl:attribute name="uof:字体族">Modern</xsl:attribute> 924 </xsl:when> 925 <xsl:when test="@style:font-family-generic='roman'"> 926 <xsl:attribute name="uof:字体族">Roman</xsl:attribute> 927 </xsl:when> 928 <xsl:when test="@style:font-family-generic ='script'"> 929 <xsl:attribute name="uof:字体族">Script</xsl:attribute> 930 </xsl:when> 931 <xsl:when test="@style:font-family-generic ='decorative'"> 932 <xsl:attribute name="uof:字体族">Decorative</xsl:attribute> 933 </xsl:when> 934 <xsl:when test="@style:font-family-generic ='system'"> 935 <xsl:attribute name="uof:字体族">System</xsl:attribute> 936 </xsl:when> 937 <xsl:otherwise> 938 <xsl:attribute name="uof:字体族">System</xsl:attribute> 939 </xsl:otherwise> 940 </xsl:choose> 941 </xsl:if> 942 </xsl:element> 943 </xsl:for-each> 944 <xsl:apply-templates select="style:font-decl"/> 945 </uof:字体集> 946 </xsl:template> 947 <xsl:template name="自动编号集"> 948 <xsl:element name="uof:自动编号集"> 949 <xsl:attribute name="uof:locID">u0042</xsl:attribute> 950 <xsl:for-each select="/office:document//text:list-style"> 951 <xsl:element name="字:自动编号"> 952 <xsl:attribute name="uof:locID">t0169</xsl:attribute> 953 <xsl:attribute name="uof:attrList">标识符 名称 父编号引用 多级编号</xsl:attribute> 954 <xsl:attribute name="字:标识符"><xsl:value-of select="@style:name"/></xsl:attribute> 955 <xsl:if test=".//@text:style-name"> 956 <xsl:attribute name="字:名称"><xsl:value-of select=".//@text:style-name"/></xsl:attribute> 957 </xsl:if> 958 <xsl:attribute name="字:多级编号">true</xsl:attribute> 959 <xsl:for-each select="./* "> 960 <xsl:if test="not(number(@text:level)=10)"> 961 <xsl:element name="字:级别"> 962 <xsl:attribute name="uof:locID">t0159</xsl:attribute> 963 <xsl:attribute name="uof:attrList">级别值 编号对齐方式 尾随字符</xsl:attribute> 964 <xsl:attribute name="字:级别值"><xsl:value-of select="number(@text:level) - 1"/></xsl:attribute> 965 <xsl:if test="@style:num-suffix"> 966 <xsl:attribute name="字:尾随字符"><xsl:choose><xsl:when test="@style:num-suffix=' '">space</xsl:when><xsl:when test="@style:num-suffix=' '">tab</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 967 </xsl:if> 968 <xsl:if test="style:list-level-properties/@fo:text-align"> 969 <xsl:attribute name="字:编号对齐方式"><xsl:variable name="vv"><xsl:value-of select="style:list-level-properties/@fo:text-align"/></xsl:variable><xsl:choose><xsl:when test="$vv='center' ">center</xsl:when><xsl:when test="$vv='end' ">right</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose></xsl:attribute> 970 </xsl:if> 971 <xsl:if test="@text:bullet-char"> 972 <xsl:element name="字:项目符号"> 973 <xsl:attribute name="uof:locID">t0171</xsl:attribute> 974 <xsl:value-of select="@text:bullet-char"/> 975 </xsl:element> 976 </xsl:if> 977 <xsl:if test="@text:style-name"> 978 <xsl:element name="字:符号字体"> 979 <xsl:attribute name="uof:locID">t0160</xsl:attribute> 980 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 981 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 982 </xsl:element> 983 </xsl:if> 984 <xsl:if test="@style:num-format"> 985 <xsl:choose> 986 <xsl:when test="string(@style:num-format)='a'"> 987 <xsl:element name="字:编号格式"> 988 <xsl:attribute name="uof:locID">t0162</xsl:attribute>lower-letter</xsl:element> 989 </xsl:when> 990 <xsl:when test="string(@style:num-format)='A'"> 991 <xsl:element name="字:编号格式"> 992 <xsl:attribute name="uof:locID">t0162</xsl:attribute>upper-letter</xsl:element> 993 </xsl:when> 994 <xsl:when test="string(@style:num-format)='i'"> 995 <xsl:element name="字:编号格式"> 996 <xsl:attribute name="uof:locID">t0162</xsl:attribute>lower-roman</xsl:element> 997 </xsl:when> 998 <xsl:when test="string(@style:num-format)='I'"> 999 <xsl:element name="字:编号格式"> 1000 <xsl:attribute name="uof:locID">t0162</xsl:attribute>upper-roman</xsl:element> 1001 </xsl:when> 1002 <xsl:when test="string(@style:num-format)='①, ②, ③, ...'"> 1003 <xsl:element name="字:编号格式"> 1004 <xsl:attribute name="uof:locID">t0162</xsl:attribute>decimal-enclosed-circle</xsl:element> 1005 </xsl:when> 1006 <xsl:when test="string(@style:num-format)='甲, 乙, 丙, ...'"> 1007 <xsl:element name="字:编号格式"> 1008 <xsl:attribute name="uof:locID">t0162</xsl:attribute>ideograph-traditional</xsl:element> 1009 </xsl:when> 1010 <xsl:when test="string(@style:num-format)='子, 丑, 寅, ...'"> 1011 <xsl:element name="字:编号格式"> 1012 <xsl:attribute name="uof:locID">t0162</xsl:attribute>ideograph-zodiac</xsl:element> 1013 </xsl:when> 1014 <xsl:when test="string(@style:num-format)='一, 二, 三, ...'"> 1015 <xsl:element name="字:编号格式"> 1016 <xsl:attribute name="uof:locID">t0162</xsl:attribute>chinese-counting</xsl:element> 1017 </xsl:when> 1018 <xsl:when test="string(@style:num-format)='壹, 贰, 叁, ...'"> 1019 <xsl:element name="字:编号格式"> 1020 <xsl:attribute name="uof:locID">t0162</xsl:attribute>chinese-legal-simplified</xsl:element> 1021 </xsl:when> 1022 <xsl:otherwise> 1023 <xsl:element name="字:编号格式"> 1024 <xsl:attribute name="uof:locID">t0162</xsl:attribute>decimal</xsl:element> 1025 </xsl:otherwise> 1026 </xsl:choose> 1027 </xsl:if> 1028 <xsl:variable name="jibie"> 1029 <xsl:value-of select="position()"/> 1030 </xsl:variable> 1031 <xsl:variable name="xianshijibie"> 1032 <xsl:choose> 1033 <xsl:when test="@text:display-levels"> 1034 <xsl:value-of select="@text:display-levels"/> 1035 </xsl:when> 1036 <xsl:otherwise>1</xsl:otherwise> 1037 </xsl:choose> 1038 </xsl:variable> 1039 <xsl:element name="字:编号格式表示"> 1040 <xsl:attribute name="uof:locID">t0163</xsl:attribute> 1041 <xsl:call-template name="字:编号格式表示"> 1042 <xsl:with-param name="bubianjibie" select="$jibie"/> 1043 <xsl:with-param name="jibie" select="$jibie"/> 1044 <xsl:with-param name="xianshijibie" select="$xianshijibie"/> 1045 <xsl:with-param name="biaoshi" select="concat(string(@style:num-prefix),'%',$jibie,string(@style:num-suffix))"/> 1046 </xsl:call-template> 1047 </xsl:element> 1048 <xsl:if test="office:binary-data"> 1049 <xsl:element name="字:图片符号引用"> 1050 <xsl:attribute name="uof:locID">t0164</xsl:attribute> 1051 <xsl:attribute name="uof:attrList">宽度 高度</xsl:attribute> 1052 <xsl:if test="style:list-level-properties/@fo:width"> 1053 <xsl:attribute name="字:宽度"><xsl:value-of select="substring-before(style:list-level-properties/@fo:width,$uofUnit)"/></xsl:attribute> 1054 </xsl:if> 1055 <xsl:if test="style:list-level-properties/@fo:height"> 1056 <xsl:attribute name="字:高度"><xsl:value-of select="substring-before(style:list-level-properties/@fo:height,$uofUnit)"/></xsl:attribute> 1057 </xsl:if> 1058 <xsl:value-of select="concat('image_numbering_',count(preceding::text:list-level-style-image))"/> 1059 </xsl:element> 1060 </xsl:if> 1061 <xsl:if test="style:paragraph-properties/@fo:margin-left or style:paragraph-properties/@fo:margin-right or style:paragraph-properties/@fo:text-indent"> 1062 <xsl:element name="字:缩进"> 1063 <xsl:attribute name="uof:locID">t0165</xsl:attribute> 1064 <xsl:for-each select="style:paragraph-properties"> 1065 <xsl:call-template name="字:缩进类型"/> 1066 </xsl:for-each> 1067 </xsl:element> 1068 </xsl:if> 1069 <xsl:if test="style:list-level-properties/@text:min-label-width"> 1070 <xsl:element name="字:制表符位置"> 1071 <xsl:attribute name="uof:locID">t0166</xsl:attribute> 1072 <xsl:value-of select="substring-before(style:list-level-properties/@text:min-label-width,$uofUnit)"/> 1073 </xsl:element> 1074 </xsl:if> 1075 <xsl:if test="@text:start-value"> 1076 <xsl:element name="字:起始编号"> 1077 <xsl:attribute name="uof:locID">t0167</xsl:attribute> 1078 <xsl:value-of select="@text:start-value"/> 1079 </xsl:element> 1080 </xsl:if> 1081 <xsl:if test="@text:num-regular-exp"> 1082 <xsl:element name="字:正规格式"> 1083 <xsl:attribute name="uof:locID">t0168</xsl:attribute> 1084 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1085 <xsl:attribute name="字:值"><xsl:value-of select="@text:num-regular-exp"/></xsl:attribute> 1086 </xsl:element> 1087 </xsl:if> 1088 </xsl:element> 1089 </xsl:if> 1090 </xsl:for-each> 1091 </xsl:element> 1092 </xsl:for-each> 1093 </xsl:element> 1094 </xsl:template> 1095 <xsl:template name="shiyang"> 1096 <xsl:for-each select="office:styles/style:style"> 1097 <xsl:choose> 1098 <xsl:when test="@style:family='text'"> 1099 <xsl:element name="uof:句式样"> 1100 <xsl:attribute name="uof:locID">u0043</xsl:attribute> 1101 <xsl:attribute name="uof:attrList">标识符 名称 类型 别名 基式样引用 后继式样引用</xsl:attribute> 1102 <xsl:attribute name="字:标识符"><xsl:value-of select="@style:name"/></xsl:attribute> 1103 <xsl:attribute name="字:名称"><xsl:value-of select="@style:name"/></xsl:attribute> 1104 <xsl:attribute name="字:类型">auto</xsl:attribute> 1105 <xsl:choose> 1106 <xsl:when test="@style:parent-style-name"> 1107 <xsl:attribute name="字:基式样引用"><xsl:value-of select="@style:parent-style-name"/></xsl:attribute> 1108 </xsl:when> 1109 <xsl:otherwise> 1110 <xsl:attribute name="字:基式样引用"><xsl:value-of select="@style:name"/></xsl:attribute> 1111 </xsl:otherwise> 1112 </xsl:choose> 1113 <xsl:call-template name="字:句属性"/> 1114 </xsl:element> 1115 </xsl:when> 1116 </xsl:choose> 1117 </xsl:for-each> 1118 <xsl:for-each select="office:automatic-styles/style:style"> 1119 <xsl:choose> 1120 <xsl:when test="@style:family='text'"> 1121 <xsl:element name="uof:句式样"> 1122 <xsl:attribute name="uof:locID">u0043</xsl:attribute> 1123 <xsl:attribute name="uof:attrList">标识符 名称 类型 别名 基式样引用 后继式样引用</xsl:attribute> 1124 <xsl:attribute name="字:标识符"><xsl:value-of select="@style:name"/></xsl:attribute> 1125 <xsl:attribute name="字:名称"><xsl:value-of select="@style:name"/></xsl:attribute> 1126 <xsl:attribute name="字:类型">custom</xsl:attribute> 1127 <xsl:choose> 1128 <xsl:when test="@style:parent-style-name"> 1129 <xsl:attribute name="字:基式样引用"><xsl:value-of select="@style:parent-style-name"/></xsl:attribute> 1130 </xsl:when> 1131 </xsl:choose> 1132 <xsl:choose> 1133 <xsl:when test="@style:parent-style-name and not(@style:parent-style-name='Standard')"> 1134 <xsl:variable name="stylename" select="@style:parent-style-name"/> 1135 <xsl:for-each select="/office:document/office:styles/style:style[@style:name=$stylename]"> 1136 <xsl:call-template name="字:句属性"/> 1137 </xsl:for-each> 1138 </xsl:when> 1139 <xsl:otherwise> 1140 <xsl:call-template name="字:句属性"/> 1141 </xsl:otherwise> 1142 </xsl:choose> 1143 </xsl:element> 1144 </xsl:when> 1145 </xsl:choose> 1146 </xsl:for-each> 1147 <xsl:for-each select="office:styles/style:style"> 1148 <xsl:choose> 1149 <xsl:when test="@style:family='paragraph'"> 1150 <xsl:element name="uof:段落式样"> 1151 <xsl:attribute name="uof:locID">u0044</xsl:attribute> 1152 <xsl:attribute name="uof:attrList">标识符 名称 类型 别名 基式样引用 后继式样引用</xsl:attribute> 1153 <xsl:attribute name="字:标识符"><xsl:value-of select="@style:name"/></xsl:attribute> 1154 <xsl:attribute name="字:类型">auto</xsl:attribute> 1155 <xsl:if test="@style:parent-style-name"> 1156 <xsl:attribute name="字:基式样引用"><xsl:value-of select="@style:parent-style-name"/></xsl:attribute> 1157 </xsl:if> 1158 <xsl:attribute name="字:名称"><xsl:value-of select="@style:name"/></xsl:attribute> 1159 <xsl:if test="@style:display-name"> 1160 <xsl:attribute name="字:别名"><xsl:value-of select="@style:display-name"/></xsl:attribute> 1161 </xsl:if> 1162 <xsl:element name="字:句属性"> 1163 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 1164 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 1165 <xsl:call-template name="字:句属性"/> 1166 </xsl:element> 1167 <xsl:call-template name="ParaAttribute"/> 1168 </xsl:element> 1169 </xsl:when> 1170 </xsl:choose> 1171 </xsl:for-each> 1172 <xsl:for-each select="office:automatic-styles/style:style"> 1173 <xsl:choose> 1174 <xsl:when test="@style:family='paragraph'"> 1175 <xsl:element name="uof:段落式样"> 1176 <xsl:attribute name="uof:locID">u0044</xsl:attribute> 1177 <xsl:attribute name="uof:attrList">标识符 名称 类型 别名 基式样引用 后继式样引用</xsl:attribute> 1178 <xsl:attribute name="字:标识符"><xsl:value-of select="@style:name"/></xsl:attribute> 1179 <xsl:attribute name="字:类型">custom</xsl:attribute> 1180 <xsl:if test="@style:parent-style-name"> 1181 <xsl:attribute name="字:基式样引用"><xsl:value-of select="@style:parent-style-name"/></xsl:attribute> 1182 </xsl:if> 1183 <xsl:attribute name="字:名称"><xsl:value-of select="@style:name"/></xsl:attribute> 1184 <xsl:element name="字:句属性"> 1185 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 1186 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 1187 <xsl:call-template name="字:句属性"/> 1188 </xsl:element> 1189 <xsl:call-template name="ParaAttribute"/> 1190 </xsl:element> 1191 </xsl:when> 1192 </xsl:choose> 1193 </xsl:for-each> 1194 </xsl:template> 1195 <xsl:template name="字:编号格式表示"> 1196 <xsl:param name="bubianjibie"/> 1197 <xsl:param name="jibie"/> 1198 <xsl:param name="xianshijibie"/> 1199 <xsl:param name="biaoshi"/> 1200 <xsl:choose> 1201 <xsl:when test="number($xianshijibie)= 1"> 1202 <xsl:value-of select="$biaoshi"/> 1203 </xsl:when> 1204 <xsl:otherwise> 1205 <xsl:variable name="num-prefix"> 1206 <xsl:value-of select="preceding-sibling::*[number($bubianjibie -$jibie +1)]/@style:num-prefix"/> 1207 </xsl:variable> 1208 <xsl:variable name="num-suffix"> 1209 <xsl:value-of select="preceding-sibling::*[number($bubianjibie -$jibie +1)]/@style:num-suffix"/> 1210 </xsl:variable> 1211 <xsl:call-template name="字:编号格式表示"> 1212 <xsl:with-param name="bubianjibie" select="$bubianjibie"/> 1213 <xsl:with-param name="jibie" select="$jibie -1"/> 1214 <xsl:with-param name="xianshijibie" select="$xianshijibie -1"/> 1215 <xsl:with-param name="biaoshi" select="concat($num-prefix,'%',number($jibie -1),$num-suffix,'.',$biaoshi)"/> 1216 </xsl:call-template> 1217 </xsl:otherwise> 1218 </xsl:choose> 1219 </xsl:template> 1220 <xsl:template match="style:style[ancestor::office:automatic-styles]" mode="style"> 1221 <xsl:for-each select="."> 1222 <xsl:choose> 1223 <xsl:when test="@style:family='table' "> 1224 <xsl:element name="uof:文字表式样"> 1225 <xsl:attribute name="uof:locID">u0045</xsl:attribute> 1226 <xsl:attribute name="uof:attrList">标识符 名称 类型 别名 基式样引用 后继式样引用</xsl:attribute> 1227 <xsl:attribute name="字:标识符"><xsl:value-of select="@style:name"/></xsl:attribute> 1228 <xsl:attribute name="字:名称"><xsl:value-of select="@style:name"/></xsl:attribute> 1229 <xsl:attribute name="字:别名"><xsl:value-of select="@style:name"/></xsl:attribute> 1230 <xsl:attribute name="字:类型">auto</xsl:attribute> 1231 <xsl:if test="style:table-properties"> 1232 <xsl:element name="字:宽度"> 1233 <xsl:attribute name="字:绝对宽度"><xsl:value-of select="substring-before(style:table-properties/@style:width,$ooUnit)"/></xsl:attribute> 1234 <xsl:attribute name="uof:locID">t0130</xsl:attribute> 1235 <xsl:attribute name="uof:attrList">绝对宽度 相对宽度</xsl:attribute> 1236 </xsl:element> 1237 <字:对齐 uof:locID="t0133"> 1238 <xsl:choose> 1239 <xsl:when test="style:table-properties/@table:align='right'">right</xsl:when> 1240 <xsl:when test="style:table-properties/@table:align='center'">center</xsl:when> 1241 <xsl:otherwise>left</xsl:otherwise> 1242 </xsl:choose> 1243 </字:对齐> 1244 </xsl:if> 1245 </xsl:element> 1246 </xsl:when> 1247 <xsl:otherwise/> 1248 </xsl:choose> 1249 </xsl:for-each> 1250 </xsl:template> 1251 <xsl:template match="office:settings"> 1252 <字:文档设置 uof:locID="t0001"> 1253 <字:度量单位 uof:locID="t0006"> 1254 <xsl:value-of select="$ooUnit"/> 1255 </字:度量单位> 1256 <字:默认制表位位置 uof:locID="t0004"> 1257 <xsl:variable name="aa" select="substring-before(/office:document/office:styles/style:default-style[@style:family='paragraph']/style:paragraph-properties/@style:tab-stop-distance,$ooUnit)"/> 1258 <xsl:variable name="bb" select="$aa - 0.74"/> 1259 <xsl:value-of select="substring($bb,1,4)"/> 1260 </字:默认制表位位置> 1261 <字:当前视图 uof:locID="t0002"> 1262 <xsl:choose> 1263 <xsl:when test="config:config-item-set[@config:name='ooo:view-settings']/config:config-item[@config:name='InBrowseMode']='false'">page</xsl:when> 1264 <xsl:when test="config:config-item-set[@config:name='ooo:view-settings']/config:config-item[@config:name='InBrowseMode']='true'">web</xsl:when> 1265 <xsl:otherwise>page</xsl:otherwise> 1266 </xsl:choose> 1267 </字:当前视图> 1268 <xsl:if test="config:config-item-set[@config:name='ooo:view-settings']/config:config-item-map-indexed[@config:name='Views']/config:config-item-map-entry/config:config-item[@config:name='ZoomFactor']"> 1269 <字:缩放 uof:locID="t0003"> 1270 <xsl:value-of select="config:config-item-set[@config:name='ooo:view-settings']/config:config-item-map-indexed[@config:name='Views']/config:config-item-map-entry/config:config-item[@config:name='ZoomFactor']"/> 1271 </字:缩放> 1272 </xsl:if> 1273 <字:修订 uof:locID="t0005"> 1274 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1275 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="/office:document/office:body/office:text/text:tracked-changes">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1276 </字:修订> 1277 <xsl:if test="config:config-item-set[@config:name='configuration-settings']/config:config-item-map-indexed[@config:name='ForbiddenCharacters']/config:config-item-map-entry[config:config-item='CN']"> 1278 <字:标点禁则 uof:locID="t0007"> 1279 <字:行首字符 uof:locID="t0008"> 1280 <xsl:value-of select="config:config-item-set[@config:name='configuration-settings']/config:config-item-map-indexed[@config:name='ForbiddenCharacters']/config:config-item-map-entry[config:config-item='CN']/config:config-item[@config:name='BeginLine']"/> 1281 </字:行首字符> 1282 <字:行尾字符 uof:locID="t0009"> 1283 <xsl:value-of select="config:config-item-set[@config:name='configuration-settings']/config:config-item-map-indexed[@config:name='ForbiddenCharacters']/config:config-item-map-entry[config:config-item='CN']/config:config-item[@config:name='EndLine']"/> 1284 </字:行尾字符> 1285 </字:标点禁则> 1286 <xsl:if test="/office:document/office:styles/text:notes-configuration[@text:note-class='endnote']"> 1287 <字:尾注位置 uof:locID="t0210" uof:attrList="位置"> 1288 <xsl:attribute name="字:位置">doc-end</xsl:attribute> 1289 </字:尾注位置> 1290 </xsl:if> 1291 </xsl:if> 1292 </字:文档设置> 1293 </xsl:template> 1294 <xsl:template name="style:page-layout"> 1295 <字:分节 uof:locID="t0017" uof:attrList="名称"> 1296 <xsl:attribute name="字:名称"><xsl:variable name="stylename"><xsl:value-of select="@style:name"/></xsl:variable><xsl:value-of select="/office:document/office:master-styles/style:master-page[@style:page-layout-name=$stylename]/@style:name"/></xsl:attribute> 1297 <字:节属性 uof:locID="t0018"> 1298 <字:节类型 uof:locID="t0020">new-page</字:节类型> 1299 <xsl:element name="字:页边距"> 1300 <xsl:attribute name="uof:locID">t0021</xsl:attribute> 1301 <xsl:attribute name="uof:attrList">左 上 右 下</xsl:attribute> 1302 <xsl:attribute name="uof:上"><xsl:value-of select="substring-before(style:page-layout-properties/@fo:margin-top,$ooUnit)"/></xsl:attribute> 1303 <xsl:attribute name="uof:左"><xsl:value-of select="substring-before(style:page-layout-properties/@fo:margin-left,$ooUnit)"/></xsl:attribute> 1304 <xsl:attribute name="uof:下"><xsl:value-of select="substring-before(style:page-layout-properties/@fo:margin-bottom,$ooUnit)"/></xsl:attribute> 1305 <xsl:attribute name="uof:右"><xsl:value-of select="substring-before(style:page-layout-properties/@fo:margin-right,$ooUnit)"/></xsl:attribute> 1306 </xsl:element> 1307 <xsl:element name="字:纸张"> 1308 <xsl:attribute name="uof:locID">t0022</xsl:attribute> 1309 <xsl:attribute name="uof:attrList">纸型 宽度 高度</xsl:attribute> 1310 <xsl:attribute name="uof:宽度"><xsl:value-of select="substring-before(style:page-layout-properties/@fo:page-width,$ooUnit)"/></xsl:attribute> 1311 <xsl:attribute name="uof:高度"><xsl:value-of select="substring-before(style:page-layout-properties/@fo:page-height,$ooUnit)"/></xsl:attribute> 1312 <xsl:attribute name="uof:纸型"><xsl:variable name="height"><xsl:value-of select="style:page-layout-properties/@fo:page-height"/></xsl:variable><xsl:variable name="width"><xsl:value-of select="style:page-layout-properties/@fo:page-width"/></xsl:variable><xsl:choose><xsl:when test="$width='29.702cm' and $height='42cm'">A3</xsl:when><xsl:when test="$width='21.001cm' and $height='29.7cm'">A4</xsl:when><xsl:when test="$width='14.799cm' and $height='20.999cm'">A5</xsl:when><xsl:when test="$width='25cm' and $height='35.3cm'">B4</xsl:when><xsl:when test="$width='17.598cm' and $height='25cm'">B5</xsl:when><xsl:when test="$width='12.5cm' and $height='17.6cm'">B6</xsl:when><xsl:otherwise>使用者</xsl:otherwise></xsl:choose></xsl:attribute> 1313 </xsl:element> 1314 <xsl:if test="/office:document/office:master-styles/style:master-page/style:header-left"> 1315 <xsl:element name="字:奇偶页页眉页脚不同"> 1316 <xsl:attribute name="uof:locID">t0023</xsl:attribute> 1317 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1318 <xsl:attribute name="字:值">true</xsl:attribute> 1319 </xsl:element> 1320 </xsl:if> 1321 <xsl:element name="字:首页页眉页脚不同"> 1322 <xsl:attribute name="uof:locID">t0024</xsl:attribute> 1323 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1324 <xsl:attribute name="字:值">false</xsl:attribute> 1325 </xsl:element> 1326 <xsl:if test="style:header-style/style:header-footer-properties"> 1327 <xsl:element name="字:页眉位置"> 1328 <xsl:attribute name="uof:locID">t0025</xsl:attribute> 1329 <xsl:attribute name="uof:attrList">距边界 距版芯</xsl:attribute> 1330 <xsl:attribute name="字:距边界"><xsl:value-of select="substring-before(style:header-style/style:header-footer-properties/@fo:margin-bottom,$ooUnit)"/></xsl:attribute> 1331 <xsl:variable name="long1" select="substring-before(style:header-style/style:header-footer-properties/@fo:margin-bottom,$ooUnit)"/> 1332 <xsl:variable name="long2" select="substring-before(style:header-style/style:header-footer-properties/@svg:height,$ooUnit)"/> 1333 <xsl:attribute name="字:距版芯"><xsl:value-of select="$long2 - $long1"/></xsl:attribute> 1334 </xsl:element> 1335 </xsl:if> 1336 <xsl:if test="style:footer-style/style:header-footer-properties"> 1337 <xsl:element name="字:页脚位置"> 1338 <xsl:attribute name="uof:locID">t0026</xsl:attribute> 1339 <xsl:attribute name="uof:attrList">距边界 距版芯</xsl:attribute> 1340 <xsl:attribute name="字:距边界"><xsl:value-of select="substring-before(style:footer-style/style:header-footer-properties/@fo:margin-top,$ooUnit)"/></xsl:attribute> 1341 <xsl:variable name="long1" select="substring-before(style:footer-style/style:header-footer-properties/@fo:margin-top,$ooUnit)"/> 1342 <xsl:variable name="long2" select="substring-before(style:footer-style/style:header-footer-properties/@svg:height,$ooUnit)"/> 1343 <xsl:attribute name="字:距版芯"><xsl:value-of select="$long2 - $long1"/></xsl:attribute> 1344 </xsl:element> 1345 </xsl:if> 1346 <xsl:variable name="masterPages" select="'Standard'"/> 1347 <xsl:variable name="mp"> 1348 <xsl:value-of select="@style:name"/> 1349 </xsl:variable> 1350 <xsl:for-each select="/office:document/office:master-styles/style:master-page[@style:page-layout-name=$mp and @style:name=$masterPages]"> 1351 <xsl:if test="style:header-left or style:header"> 1352 <字:页眉 uof:locID="t0027"> 1353 <xsl:choose> 1354 <xsl:when test="style:header-left"> 1355 <xsl:for-each select="style:header"> 1356 <字:首页页眉 uof:locID="t0030"> 1357 <xsl:if test="text:p"> 1358 <xsl:for-each select="text:p"> 1359 <xsl:call-template name="execParagraph"> 1360 <xsl:with-param name="currlistlvl" select="number('0')"/> 1361 <xsl:with-param name="liststylename" select="string('00000')"/> 1362 </xsl:call-template> 1363 </xsl:for-each> 1364 </xsl:if> 1365 <xsl:if test="table:table"> 1366 <xsl:for-each select="table:table"> 1367 <xsl:call-template name="exec_table"/> 1368 </xsl:for-each> 1369 </xsl:if> 1370 </字:首页页眉> 1371 </xsl:for-each> 1372 <xsl:for-each select="style:header-left"> 1373 <字:偶数页页眉 uof:locID="t0029"> 1374 <xsl:if test="text:p"> 1375 <xsl:for-each select="text:p"> 1376 <xsl:call-template name="execParagraph"> 1377 <xsl:with-param name="currlistlvl" select="number('0')"/> 1378 <xsl:with-param name="liststylename" select="string('00000')"/> 1379 </xsl:call-template> 1380 </xsl:for-each> 1381 </xsl:if> 1382 <xsl:if test="table:table"> 1383 <xsl:for-each select="table:table"> 1384 <xsl:call-template name="exec_table"/> 1385 </xsl:for-each> 1386 </xsl:if> 1387 </字:偶数页页眉> 1388 </xsl:for-each> 1389 </xsl:when> 1390 <xsl:otherwise> 1391 <xsl:for-each select="style:header"> 1392 <字:奇数页页眉 uof:locID="t0028"> 1393 <xsl:if test="text:p"> 1394 <xsl:for-each select="text:p"> 1395 <xsl:call-template name="execParagraph"> 1396 <xsl:with-param name="currlistlvl" select="number('0')"/> 1397 <xsl:with-param name="liststylename" select="string('00000')"/> 1398 </xsl:call-template> 1399 </xsl:for-each> 1400 </xsl:if> 1401 <xsl:if test="table:table"> 1402 <xsl:for-each select="table:table"> 1403 <xsl:call-template name="exec_table"/> 1404 </xsl:for-each> 1405 </xsl:if> 1406 </字:奇数页页眉> 1407 </xsl:for-each> 1408 </xsl:otherwise> 1409 </xsl:choose> 1410 </字:页眉> 1411 </xsl:if> 1412 </xsl:for-each> 1413 <xsl:for-each select="/office:document/office:master-styles/style:master-page[@style:page-layout-name=$mp and @style:name=$masterPages]"> 1414 <xsl:if test="style:footer-left or style:footer"> 1415 <字:页脚 uof:locID="t0031"> 1416 <xsl:choose> 1417 <xsl:when test="style:footer-left"> 1418 <xsl:for-each select="style:footer"> 1419 <字:首页页脚 uof:locID="t0034"> 1420 <xsl:if test="text:p"> 1421 <xsl:for-each select="text:p"> 1422 <xsl:call-template name="execParagraph"> 1423 <xsl:with-param name="currlistlvl" select="number('0')"/> 1424 <xsl:with-param name="liststylename" select="string('00000')"/> 1425 </xsl:call-template> 1426 </xsl:for-each> 1427 </xsl:if> 1428 <xsl:if test="table:table"> 1429 <xsl:for-each select="table:table"> 1430 <xsl:call-template name="exec_table"/> 1431 </xsl:for-each> 1432 </xsl:if> 1433 </字:首页页脚> 1434 </xsl:for-each> 1435 <xsl:for-each select="style:footer-left"> 1436 <字:偶数页页脚 uof:locID="t0033"> 1437 <xsl:if test="text:p"> 1438 <xsl:for-each select="text:p"> 1439 <xsl:call-template name="execParagraph"> 1440 <xsl:with-param name="currlistlvl" select="number('0')"/> 1441 <xsl:with-param name="liststylename" select="string('00000')"/> 1442 </xsl:call-template> 1443 </xsl:for-each> 1444 </xsl:if> 1445 <xsl:if test="table:table"> 1446 <xsl:for-each select="table:table"> 1447 <xsl:call-template name="exec_table"/> 1448 </xsl:for-each> 1449 </xsl:if> 1450 </字:偶数页页脚> 1451 </xsl:for-each> 1452 </xsl:when> 1453 <xsl:otherwise> 1454 <xsl:for-each select="style:footer"> 1455 <字:奇数页页脚 uof:locID="t0032"> 1456 <xsl:if test="text:p"> 1457 <xsl:for-each select="text:p"> 1458 <xsl:call-template name="execParagraph"> 1459 <xsl:with-param name="currlistlvl" select="number('0')"/> 1460 <xsl:with-param name="liststylename" select="string('00000')"/> 1461 </xsl:call-template> 1462 </xsl:for-each> 1463 </xsl:if> 1464 <xsl:if test="table:table"> 1465 <xsl:for-each select="table:table"> 1466 <xsl:call-template name="exec_table"/> 1467 </xsl:for-each> 1468 </xsl:if> 1469 </字:奇数页页脚> 1470 </xsl:for-each> 1471 </xsl:otherwise> 1472 </xsl:choose> 1473 </字:页脚> 1474 </xsl:if> 1475 </xsl:for-each> 1476 <xsl:if test="@style:page-usage"> 1477 <字:对称页边距 uof:locID="t0036" uof:attrList="值"> 1478 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@style:page-usage='mirrored'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1479 </字:对称页边距> 1480 </xsl:if> 1481 <xsl:if test="@style:page-usage='mirrored'"> 1482 <xsl:element name="字:拼页"> 1483 <xsl:attribute name="uof:locID">t0037</xsl:attribute> 1484 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1485 <xsl:attribute name="字:值">1</xsl:attribute> 1486 </xsl:element> 1487 </xsl:if> 1488 <xsl:element name="字:纸张方向"> 1489 <xsl:attribute name="uof:locID">t0038</xsl:attribute> 1490 <xsl:value-of select="style:page-layout-properties/@style:print-orientation"/> 1491 </xsl:element> 1492 <xsl:if test="style:page-layout-properties/@style:paper-tray-name"> 1493 <字:纸张来源 uof:locID="t0039" uof:attrList="首页 其他页" 字:首页="false" 字:其他页="style:page-layout-properties/@style:paper-tray-name"/> 1494 </xsl:if> 1495 <xsl:if test="style:page-layout-properties/@style:num-format"> 1496 <xsl:element name="字:页码设置"> 1497 <xsl:attribute name="uof:locID">t0042</xsl:attribute> 1498 <xsl:attribute name="uof:attrList">首页显示 格式 包含章节号 章节起始样式引用 分隔符 起始编号</xsl:attribute> 1499 <xsl:attribute name="字:首页显示">1</xsl:attribute> 1500 <xsl:attribute name="字:格式"><xsl:variable name="format"><xsl:value-of select="style:page-layout-properties/@style:num-format"/></xsl:variable><xsl:call-template name="oo数字格式"><xsl:with-param name="oo_format" select="$format"/></xsl:call-template></xsl:attribute> 1501 <xsl:if test="style:text-properties/@style:first-page-number"> 1502 <xsl:attribute name="字:起始编号"><xsl:value-of select="style:text-properties/@style:first-page-number"/></xsl:attribute> 1503 </xsl:if> 1504 <xsl:attribute name="字:包含章节号">false</xsl:attribute> 1505 <!--xsl:attribute name="字:章节起始样式引用">false</xsl:attribute--> 1506 <xsl:attribute name="字:分隔符">hyphen</xsl:attribute> 1507 </xsl:element> 1508 </xsl:if> 1509 <xsl:if test="/office:document/office:styles/text:notes-configuration[@text:note-class='footnote']"> 1510 <xsl:element name="字:脚注设置"> 1511 <xsl:attribute name="uof:locID">t0040</xsl:attribute> 1512 <xsl:attribute name="uof:attrList">位置 格式 起始编号 编号方式</xsl:attribute> 1513 <xsl:for-each select="/office:document/office:styles/text:notes-configuration[@text:note-class='footnote']"> 1514 <xsl:attribute name="字:位置"><xsl:choose><xsl:when test="@text:footnotes-position='page'">page-bottom</xsl:when><xsl:when test="@text:footnotes-position='document'">below-text</xsl:when></xsl:choose></xsl:attribute> 1515 <xsl:attribute name="字:编号方式"><xsl:choose><xsl:when test="@text:start-numbering-at='document'">continuous</xsl:when><xsl:when test="@text:start-numbering-at='chapter'">section</xsl:when><xsl:when test="@text:start-numbering-at='page'">page</xsl:when></xsl:choose></xsl:attribute> 1516 <xsl:attribute name="字:起始编号"><xsl:value-of select="@text:start-value + 1"/></xsl:attribute> 1517 <xsl:attribute name="字:格式"><xsl:variable name="format"><xsl:value-of select="@style:num-format"/></xsl:variable><xsl:call-template name="oo数字格式"><xsl:with-param name="oo_format" select="$format"/></xsl:call-template></xsl:attribute> 1518 </xsl:for-each> 1519 </xsl:element> 1520 </xsl:if> 1521 <xsl:if test="/office:document/office:styles/text:notes-configuration[@text:note-class='endnote']"> 1522 <字:尾注设置 uof:locID="t0041" uof:attrList="格式 起始编号 编号方式"> 1523 <xsl:for-each select="/office:document/office:styles/text:notes-configuration[@text:note-class='endnote']"> 1524 <xsl:attribute name="字:格式"><xsl:variable name="format"><xsl:value-of select="@style:num-format"/></xsl:variable><xsl:call-template name="oo数字格式"><xsl:with-param name="oo_format" select="$format"/></xsl:call-template></xsl:attribute> 1525 <xsl:attribute name="字:起始编号"><xsl:value-of select="@text:start-value + 1"/></xsl:attribute> 1526 </xsl:for-each> 1527 </字:尾注设置> 1528 </xsl:if> 1529 <xsl:if test="/office:document/office:styles/text:linenumbering-configuration"> 1530 <字:行号设置 uof:locID="t0043" uof:attrList="使用行号 编号方式 起始编号 距边界 行号间隔"> 1531 <xsl:for-each select="/office:document/office:styles/text:linenumbering-configuration"> 1532 <xsl:choose> 1533 <xsl:when test="@text:number-lines='false'"> 1534 <xsl:attribute name="字:使用行号">false</xsl:attribute> 1535 </xsl:when> 1536 <xsl:otherwise> 1537 <xsl:attribute name="字:使用行号">true</xsl:attribute> 1538 <xsl:attribute name="字:编号方式"><xsl:choose><xsl:when test="@text:count-in-floating-frames='true'">section</xsl:when><xsl:when test="@text:restart-on-page='true'">page</xsl:when><xsl:when test="@text:count-empty-lines='false'"/><xsl:otherwise>continuous</xsl:otherwise></xsl:choose></xsl:attribute> 1539 </xsl:otherwise> 1540 </xsl:choose> 1541 <xsl:if test="@style:num-format"> 1542 <xsl:attribute name="字:起始编号"><xsl:value-of select="@style:num-format"/></xsl:attribute> 1543 </xsl:if> 1544 <xsl:if test="@text:offset"> 1545 <xsl:attribute name="字:距边界"><xsl:value-of select="substring-before(@text:offset,$uofUnit)"/></xsl:attribute> 1546 </xsl:if> 1547 <xsl:if test="@text:increment"> 1548 <xsl:attribute name="字:行号间隔"><xsl:value-of select="@text:increment"/></xsl:attribute> 1549 </xsl:if> 1550 </xsl:for-each> 1551 </字:行号设置> 1552 </xsl:if> 1553 <xsl:variable name="aa"> 1554 <xsl:value-of select="substring-before(style:page-layout-properties/@style:layout-grid-ruby-height,$ooUnit)"/> 1555 </xsl:variable> 1556 <xsl:if test="style:page-layout-properties/@style:layout-grid-display and $aa='0' "> 1557 <字:网格设置 uof:locID="t0044" uof:attrList="网格类型 宽度 高度 显示网格 打印网格"> 1558 <xsl:if test="style:page-layout-properties/@style:layout-grid-mode"> 1559 <xsl:attribute name="字:网格类型"><xsl:choose><xsl:when test="style:page-layout-properties/@style:layout-grid-mode='both-nosnap'">line-char</xsl:when><xsl:when test="style:page-layout-properties/@style:layout-grid-mode='both'">char</xsl:when><xsl:when test="style:page-layout-properties/@style:layout-grid-mode='line'">line</xsl:when><xsl:when test="style:page-layout-properties/@style:layout-grid-mode='none'">none</xsl:when></xsl:choose></xsl:attribute> 1560 </xsl:if> 1561 <xsl:if test="style:page-layout-properties/@style:layout-grid-base-width"> 1562 <xsl:attribute name="字:宽度"><xsl:value-of select="substring-before(style:page-layout-properties/@style:layout-grid-base-width,$ooUnit)"/></xsl:attribute> 1563 </xsl:if> 1564 <xsl:if test="style:page-layout-properties/@style:layout-grid-base-height"> 1565 <xsl:attribute name="字:高度"><xsl:value-of select="substring-before(style:page-layout-properties/@style:layout-grid-base-height,$ooUnit)"/></xsl:attribute> 1566 </xsl:if> 1567 <xsl:if test="style:page-layout-properties/@style:layout-grid-display"> 1568 <xsl:attribute name="字:显示网格"><xsl:choose><xsl:when test="style:page-layout-properties/@style:layout-grid-display='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1569 </xsl:if> 1570 <xsl:if test="style:page-layout-properties/@style:layout-grid-print"> 1571 <xsl:attribute name="字:打印网格"><xsl:choose><xsl:when test="style:page-layout-properties/@style:layout-grid-print='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1572 </xsl:if> 1573 </字:网格设置> 1574 </xsl:if> 1575 <xsl:if test="style:page-layout-properties/@style:layout-grid-display and not($aa = '0')"> 1576 <字:稿纸设置 uof:locID="t0211" uof:attrList="类型 格式 线型 颜色 方向"> 1577 <xsl:variable name="mode"> 1578 <xsl:value-of select="style:page-layout-properties/@style:layout-grid-mode"/> 1579 </xsl:variable> 1580 <xsl:variable name="ruby"> 1581 <xsl:value-of select="substring-before(style:page-layout-properties/@style:layout-grid-ruby-height,$ooUnit)"/> 1582 </xsl:variable> 1583 <xsl:variable name="width"> 1584 <xsl:value-of select="substring-before(style:page-layout-properties/@style:layout-grid-base-width,$ooUnit)"/> 1585 </xsl:variable> 1586 <xsl:variable name="height"> 1587 <xsl:value-of select="substring-before(style:page-layout-properties/@style:layout-grid-base-height,$ooUnit)"/> 1588 </xsl:variable> 1589 <xsl:attribute name="字:类型"><xsl:choose><xsl:when test="style:page-layout-properties/@style:layout-grid-mode='line'">letter-paper</xsl:when><xsl:when test="style:page-layout-properties/@style:layout-grid-mode='both'">draft-paper</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 1590 <xsl:if test="style:page-layout-properties/@style:layout-grid-mode"> 1591 <xsl:attribute name="字:格式"><xsl:choose><xsl:when test="$mode='both' and $width='0.728' and $height='0.728' and $ruby='0.496' ">fourth-gear</xsl:when><xsl:when test="$mode='both' and $width='0.584' and $height='0.584' and $ruby='0.64' ">third-gear</xsl:when><xsl:when test="$mode='both' and $width='0.728' and $height='0.728' and $ruby='0.905' ">second-gear</xsl:when><xsl:when test="$mode='both' and $width='0.728' and $height='0.728' and $ruby='1.633' ">first-gear</xsl:when></xsl:choose></xsl:attribute> 1592 </xsl:if> 1593 <xsl:if test="style:page-layout-properties/@style:layout-grid-color"> 1594 <xsl:attribute name="字:颜色"><xsl:value-of select="style:page-layout-properties/@style:layout-grid-color"/></xsl:attribute> 1595 </xsl:if> 1596 </字:稿纸设置> 1597 </xsl:if> 1598 <xsl:if test="/office:document/office:automatic-styles/style:page-layout/style:page-layout-properties/@style:writing-mode='lr-tb' or style:text-properties/@style:writing-mode='rl-tb'"> 1599 <字:垂直对齐方式 uof:locID="t0045"> 1600 <xsl:variable name="path" select="/office:document/office:automatic-styles/style:style/style:paragraph-properties"/> 1601 <xsl:choose> 1602 <xsl:when test="$path/@fo:text-align='start'">top</xsl:when> 1603 <xsl:when test="$path/@fo:text-align='end'">bottom</xsl:when> 1604 <xsl:when test="$path/@fo:text-align='center'">center</xsl:when> 1605 <xsl:otherwise>justified</xsl:otherwise> 1606 </xsl:choose> 1607 </字:垂直对齐方式> 1608 </xsl:if> 1609 <字:文字排列方向 uof:locID="t0046"> 1610 <xsl:variable name="writing_mode"> 1611 <xsl:value-of select="style:page-layout-properties/@style:writing-mode"/> 1612 </xsl:variable> 1613 <xsl:choose> 1614 <xsl:when test="$writing_mode='lr-tb' or $writing_mode='lr'">hori-l2r</xsl:when> 1615 <xsl:when test="$writing_mode='rl-tb' or $writing_mode='rl'">hori-r2l</xsl:when> 1616 <xsl:when test="$writing_mode='tb-rl'">vert-r2l</xsl:when> 1617 <xsl:when test="$writing_mode='tb-lr'">vert-l2r</xsl:when> 1618 <xsl:otherwise>hori-l2r</xsl:otherwise> 1619 </xsl:choose> 1620 </字:文字排列方向> 1621 <xsl:if test="style:page-layout-properties/@fo:border or style:page-layout-properties/@fo:border-top or style:page-layout-properties/@fo:border-bottom or style:page-layout-properties/@fo:border-left or style:page-layout-properties/@fo:border-right or style:page-layout-properties/@style:shadow[.!='none']"> 1622 <xsl:element name="字:边框"> 1623 <xsl:attribute name="uof:locID">t0047</xsl:attribute> 1624 <xsl:for-each select="style:page-layout-properties"> 1625 <xsl:call-template name="uof:边框"/> 1626 </xsl:for-each> 1627 </xsl:element> 1628 </xsl:if> 1629 <xsl:if test="style:page-layout-properties/@fo:background-color"> 1630 <xsl:element name="字:填充"> 1631 <xsl:attribute name="uof:locID">t0048</xsl:attribute> 1632 <xsl:for-each select="style:page-layout-properties"> 1633 <xsl:call-template name="图:填充"/> 1634 </xsl:for-each> 1635 </xsl:element> 1636 </xsl:if> 1637 <xsl:if test="style:page-layout-properties/style:columns"> 1638 <xsl:element name="字:分栏"> 1639 <xsl:attribute name="uof:locID">t0049</xsl:attribute> 1640 <xsl:attribute name="uof:attrList">栏数 等宽 分隔线 分隔线宽度 分隔线颜色</xsl:attribute> 1641 <xsl:if test="//@fo:column-count"> 1642 <xsl:attribute name="字:栏数"><xsl:choose><xsl:when test="//@fo:column-count='0'">1</xsl:when><xsl:otherwise><xsl:value-of select="//@fo:column-count"/></xsl:otherwise></xsl:choose></xsl:attribute> 1643 </xsl:if> 1644 <xsl:variable name="第一宽度"> 1645 <xsl:value-of select="style:page-layout-properties/style:columns/style:column/@style:rel-width"/> 1646 </xsl:variable> 1647 <xsl:variable name="dkm"> 1648 <xsl:for-each select="style:page-layout-properties/style:columns/style:column"> 1649 <xsl:if test="$第一宽度 != @style:rel-width"> 1650 <xsl:value-of select="boolean($第一宽度 = @style:rel-width)"/> 1651 </xsl:if> 1652 </xsl:for-each> 1653 </xsl:variable> 1654 <xsl:choose> 1655 <xsl:when test="style:page-layout-properties/style:columns/@fo:column-gap"> 1656 <xsl:attribute name="字:等宽">true</xsl:attribute> 1657 </xsl:when> 1658 <xsl:otherwise> 1659 <xsl:attribute name="字:等宽">false</xsl:attribute> 1660 </xsl:otherwise> 1661 </xsl:choose> 1662 <xsl:if test="style:page-layout-properties/style:columns/style:column-sep"> 1663 <xsl:attribute name="字:分隔线宽度"><xsl:value-of select="substring-before(style:page-layout-properties/style:columns/style:column-sep/@style:width,$ooUnit)"/></xsl:attribute> 1664 <xsl:attribute name="字:分隔线颜色"><xsl:value-of select="style:page-layout-properties/style:columns/style:column-sep/@style:color"/></xsl:attribute> 1665 <xsl:attribute name="字:分隔线">single</xsl:attribute> 1666 </xsl:if> 1667 <xsl:for-each select="style:page-layout-properties/style:columns/style:column"> 1668 <xsl:element name="字:栏"> 1669 <xsl:variable name="left"> 1670 <xsl:value-of select="substring-before(@fo:start-indent,$uofUnit)"/> 1671 </xsl:variable> 1672 <xsl:variable name="right"> 1673 <xsl:value-of select="substring-before(@fo:end-indent,$uofUnit)"/> 1674 </xsl:variable> 1675 <xsl:if test="@style:rel-width"> 1676 <xsl:attribute name="字:宽度"><xsl:value-of select="substring-before(@style:rel-width,'*')"/></xsl:attribute> 1677 </xsl:if> 1678 <xsl:if test="@fo:start-indent or @fo:end-indent"> 1679 <xsl:choose> 1680 <xsl:when test="parent::style:columns/@fo:column-gap"> 1681 <xsl:attribute name="字:间距"><xsl:choose><xsl:when test="$left - $right >0 "><xsl:value-of select="$left - $right"/></xsl:when><xsl:when test="$right - $left > 0 "><xsl:value-of select="$right - $left"/></xsl:when><xsl:otherwise><xsl:value-of select="$right"/></xsl:otherwise></xsl:choose></xsl:attribute> 1682 </xsl:when> 1683 <xsl:otherwise> 1684 <xsl:attribute name="字:间距"><xsl:value-of select="$right"/></xsl:attribute> 1685 </xsl:otherwise> 1686 </xsl:choose> 1687 </xsl:if> 1688 <xsl:attribute name="uof:locID">t0050</xsl:attribute> 1689 <xsl:attribute name="uof:attrList">宽度 间距</xsl:attribute> 1690 </xsl:element> 1691 </xsl:for-each> 1692 </xsl:element> 1693 </xsl:if> 1694 </字:节属性> 1695 </字:分节> 1696 </xsl:template> 1697 <xsl:template match="office:text"> 1698 <xsl:for-each select="node( )"> 1699 <xsl:choose> 1700 <xsl:when test="name()='text:list'or name()='text:ordered-list'"> 1701 <xsl:call-template name="unordered-ordered-list"> 1702 <xsl:with-param name="currlistlvl" select="number('1')"/> 1703 <xsl:with-param name="liststylename" select="@text:style-name"/> 1704 </xsl:call-template> 1705 </xsl:when> 1706 <xsl:when test="name()='text:p'or name()='text:h'"> 1707 <xsl:variable name="bs" select="./@text:style-name"/> 1708 <xsl:if test="/office:document/office:automatic-styles/style:style[@style:name=$bs]/@style:master-page-name"> 1709 <xsl:variable name="bs1" select="/office:document/office:automatic-styles/style:style[@style:name=$bs]/@style:master-page-name"/> 1710 <xsl:if test="/office:document/office:master-styles/style:master-page[@style:name=$bs1]/@style:page-layout-name"> 1711 <xsl:variable name="bs2" select="/office:document/office:master-styles/style:master-page[@style:name=$bs1]/@style:page-layout-name"/> 1712 <xsl:for-each select="/office:document/office:automatic-styles/style:page-layout[@style:name=$bs2]"> 1713 <xsl:call-template name="style:page-layout"/> 1714 </xsl:for-each> 1715 </xsl:if> 1716 </xsl:if> 1717 <xsl:call-template name="execParagraph"> 1718 <xsl:with-param name="currlistlvl" select="number('0')"/> 1719 <xsl:with-param name="liststylename" select="string('00000')"/> 1720 </xsl:call-template> 1721 </xsl:when> 1722 <xsl:when test="name()='table:table'"> 1723 <xsl:variable name="tbs" select="./@table:style-name"/> 1724 <xsl:if test="/office:document/office:automatic-styles/style:style[@style:name=$tbs]/@style:master-page-name"> 1725 <xsl:variable name="tbs1" select="/office:document/office:automatic-styles/style:style[@style:name=$tbs]/@style:master-page-name"/> 1726 <xsl:if test="/office:document/office:master-styles/style:master-page[@style:name=$tbs1]/@style:page-layout-name"> 1727 <xsl:variable name="tbs2" select="/office:document/office:master-styles/style:master-page[@style:name=$tbs1]/@style:page-layout-name"/> 1728 <xsl:for-each select="/office:document/office:automatic-styles/style:page-layout[@style:name=$tbs2]"> 1729 <xsl:call-template name="style:page-layout"/> 1730 </xsl:for-each> 1731 </xsl:if> 1732 </xsl:if> 1733 <xsl:call-template name="exec_table"/> 1734 </xsl:when> 1735 <xsl:when test="name()='text:table-of-content'"> 1736 <xsl:call-template name="text:table-of-content"/> 1737 </xsl:when> 1738 <xsl:when test="name()='text:alphabetical-index'"> 1739 <xsl:call-template name="text:alphabetical-index"/> 1740 </xsl:when> 1741 </xsl:choose> 1742 </xsl:for-each> 1743 </xsl:template> 1744 <xsl:template name="jiaozhu"> 1745 <字:脚注 uof:locID="t0107" uof:attrList="引文体"> 1746 <xsl:for-each select="text:note-citation"> 1747 <xsl:attribute name="字:引文体"><xsl:value-of select="."/></xsl:attribute> 1748 </xsl:for-each> 1749 <xsl:for-each select="text:note-body/text:p"> 1750 <xsl:call-template name="execParagraph"> 1751 <xsl:with-param name="currlistlvl" select="number('0')"/> 1752 <xsl:with-param name="liststylename" select="string('00000')"/> 1753 </xsl:call-template> 1754 </xsl:for-each> 1755 </字:脚注> 1756 </xsl:template> 1757 <xsl:template name="weizhu"> 1758 <字:尾注 uof:locID="t0108" uof:attrList="引文体"> 1759 <xsl:for-each select="text:note-citation"> 1760 <xsl:attribute name="字:引文体"><xsl:value-of select="."/></xsl:attribute> 1761 </xsl:for-each> 1762 <xsl:for-each select="text:note-body/text:p"> 1763 <xsl:call-template name="execParagraph"> 1764 <xsl:with-param name="currlistlvl" select="number('0')"/> 1765 <xsl:with-param name="liststylename" select="string('00000')"/> 1766 </xsl:call-template> 1767 </xsl:for-each> 1768 </字:尾注> 1769 </xsl:template> 1770 <xsl:template name="unordered-ordered-list"> 1771 <xsl:param name="currlistlvl"/> 1772 <xsl:param name="liststylename"/> 1773 <xsl:for-each select="text:list-item"> 1774 <xsl:if test="text:p"> 1775 <xsl:for-each select="text:p"> 1776 <xsl:call-template name="execParagraph"> 1777 <xsl:with-param name="currlistlvl" select="$currlistlvl"/> 1778 <xsl:with-param name="liststylename" select="$liststylename"/> 1779 </xsl:call-template> 1780 </xsl:for-each> 1781 </xsl:if> 1782 <xsl:for-each select="node( )"> 1783 <xsl:if test="name()='text:list'"> 1784 <xsl:call-template name="unordered-ordered-list"> 1785 <xsl:with-param name="currlistlvl" select="$currlistlvl +1"/> 1786 <xsl:with-param name="liststylename" select="$liststylename"/> 1787 </xsl:call-template> 1788 </xsl:if> 1789 </xsl:for-each> 1790 </xsl:for-each> 1791 </xsl:template> 1792 <xsl:template name="execParagraph"> 1793 <xsl:param name="currlistlvl"/> 1794 <xsl:param name="liststylename"/> 1795 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 1796 <xsl:element name="字:段落属性"> 1797 <xsl:attribute name="uof:locID">t0052</xsl:attribute> 1798 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 1799 <xsl:if test="@text:style-name"> 1800 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 1801 </xsl:if> 1802 <xsl:if test="not(number($currlistlvl) =number('0'))"> 1803 <xsl:variable name="parent-position"> 1804 <xsl:number from="/office:document/office:body/office:text/text:list" level="any" count="text:list-item/text:p" format="1"/> 1805 </xsl:variable> 1806 <xsl:element name="字:自动编号信息"> 1807 <xsl:attribute name="uof:locID">t0059</xsl:attribute> 1808 <xsl:attribute name="uof:attrList">编号引用 编号级别 重新编号 起始编号</xsl:attribute> 1809 <xsl:attribute name="字:编号引用"><xsl:value-of select="$liststylename"/></xsl:attribute> 1810 <xsl:attribute name="字:编号级别"><xsl:value-of select="$currlistlvl - 1"/></xsl:attribute> 1811 <xsl:attribute name="字:重新编号"><xsl:choose><xsl:when test="number($parent-position)=number('1')">1</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1812 <xsl:attribute name="字:起始编号"><xsl:for-each select="/office:document//text:list-style[$liststylename=@style:name]/*[number($currlistlvl)=number(@text:level)]"><xsl:choose><xsl:when test="@text:start-value"><xsl:value-of select="@text:start-value"/></xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:for-each></xsl:attribute> 1813 </xsl:element> 1814 </xsl:if> 1815 <xsl:variable name="stylename"> 1816 <xsl:value-of select="@text:style-name"/> 1817 </xsl:variable> 1818 <xsl:for-each select="/office:document//style:style"> 1819 <xsl:if test="@style:name=$stylename"> 1820 <xsl:element name="字:句属性"> 1821 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 1822 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 1823 <xsl:attribute name="字:式样引用"><xsl:value-of select="$stylename"/></xsl:attribute> 1824 <xsl:call-template name="字:句属性"/> 1825 </xsl:element> 1826 <xsl:call-template name="ParaAttribute"> 1827 <xsl:with-param name="text-style-name" select="@style:name"/> 1828 </xsl:call-template> 1829 </xsl:if> 1830 </xsl:for-each> 1831 </xsl:element> 1832 <xsl:call-template name="textp"/> 1833 <xsl:if test="parent::office:text and not(preceding-sibling::text:p) and preceding-sibling::*[substring-before(name(),':')='draw']"> 1834 <xsl:for-each select="preceding-sibling::*[substring-before(name(),':')='draw']"> 1835 <字:句 uof:locID="t0085"> 1836 <xsl:call-template name="字:锚点"/> 1837 </字:句> 1838 </xsl:for-each> 1839 </xsl:if> 1840 <xsl:if test="draw:frame/draw:text-box/text:p"> 1841 <xsl:for-each select="draw:frame/draw:text-box/text:p"> 1842 <xsl:for-each select="child::*[substring-before(name(),':')='draw']"> 1843 <字:句 uof:locID="t0085"> 1844 <xsl:call-template name="字:锚点"/> 1845 </字:句> 1846 </xsl:for-each> 1847 </xsl:for-each> 1848 </xsl:if> 1849 <xsl:variable name="aa"> 1850 <xsl:value-of select="@text:style-name"/> 1851 </xsl:variable> 1852 <xsl:if test="//office:document/office:automatic-styles/style:style[@style:name=$aa]/style:paragraph-properties/@fo:break-before='column'"> 1853 <字:句 uof:locID="t0085"> 1854 <xsl:element name="字:分栏符"> 1855 <xsl:attribute name="uof:locID">t0125</xsl:attribute> 1856 </xsl:element> 1857 </字:句> 1858 </xsl:if> 1859 <xsl:if test="//office:document/office:automatic-styles/style:style[@style:name=$aa]/style:paragraph-properties/@fo:break-before='page'"> 1860 <字:句 uof:locID="t0085"> 1861 <xsl:element name="字:分页符"> 1862 <xsl:attribute name="uof:locID">t0127</xsl:attribute> 1863 </xsl:element> 1864 </字:句> 1865 </xsl:if> 1866 <xsl:if test="/office:document/office:body/office:text/text:p/text:initial-creator"> 1867 <xsl:apply-templates select="text:initial-creator"/> 1868 </xsl:if> 1869 <xsl:if test="/office:document/office:body/office:text/text:p/text:title"> 1870 <xsl:apply-templates select="text:title"/> 1871 </xsl:if> 1872 <xsl:if test="/office:document/office:body/office:text/text:p/text:subject"> 1873 <xsl:apply-templates select="text:subject"/> 1874 </xsl:if> 1875 <xsl:if test="/office:document/office:body/office:text/text:p/text:file-name"> 1876 <xsl:apply-templates select="text:file-name"/> 1877 </xsl:if> 1878 <xsl:if test="/office:document/office:body/office:text/text:p/text:author-name"> 1879 <xsl:apply-templates select="text:author-name"/> 1880 </xsl:if> 1881 <xsl:if test="/office:document/office:body/office:text/text:p/text:author-initials"> 1882 <xsl:apply-templates select="text:author-initials"/> 1883 </xsl:if> 1884 <xsl:if test="/office:document/office:body/office:text/text:p/text:span/text:date"> 1885 <xsl:apply-templates select="text:date"/> 1886 </xsl:if> 1887 </字:段落> 1888 </xsl:template> 1889 <xsl:template name="ParaAttribute"> 1890 <xsl:param name="text-style-name"/> 1891 <xsl:if test="substring-after(@style:display-name,'Heading')"> 1892 <xsl:element name="字:大纲级别"> 1893 <xsl:attribute name="uof:locID">t0054</xsl:attribute> 1894 <xsl:value-of select="substring-after(@style:display-name,'Heading ')"/> 1895 </xsl:element> 1896 </xsl:if> 1897 <xsl:if test="style:paragraph-properties/@fo:text-align or style:paragraph-properties/@style:vertical-align"> 1898 <xsl:element name="字:对齐"> 1899 <xsl:attribute name="uof:locID">t0055</xsl:attribute> 1900 <xsl:attribute name="uof:attrList">水平对齐 文字对齐</xsl:attribute> 1901 <xsl:attribute name="字:水平对齐"><xsl:choose><xsl:when test="style:paragraph-properties/@fo:text-align='end'">right</xsl:when><xsl:when test="style:paragraph-properties/@fo:text-align='center'">center</xsl:when><xsl:when test="style:paragraph-properties/@fo:text-align='justify' and not(style:paragraph-properties/@fo:text-align-last='justify')">justified</xsl:when><xsl:when test="style:paragraph-properties/@fo:text-align='justify' and style:paragraph-properties/@fo:text-align-last='justify'">distributed</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose></xsl:attribute> 1902 <xsl:attribute name="字:文字对齐"><xsl:choose><xsl:when test="style:paragraph-properties/@style:vertical-align='baseline'">base</xsl:when><xsl:when test="style:paragraph-properties/@style:vertical-align='top'">top</xsl:when><xsl:when test="style:paragraph-properties/@style:vertical-align='middle'">center</xsl:when><xsl:when test="style:paragraph-properties/@style:vertical-align='bottom'">bottom</xsl:when><xsl:otherwise>auto</xsl:otherwise></xsl:choose></xsl:attribute> 1903 </xsl:element> 1904 </xsl:if> 1905 <xsl:if test="style:paragraph-properties/@fo:margin-left or style:paragraph-properties/@fo:margin-right or style:paragraph-properties/@fo:text-indent"> 1906 <xsl:element name="字:缩进"> 1907 <xsl:attribute name="uof:locID">t0056</xsl:attribute> 1908 <xsl:for-each select="style:paragraph-properties"> 1909 <xsl:call-template name="字:缩进类型"/> 1910 </xsl:for-each> 1911 </xsl:element> 1912 </xsl:if> 1913 <xsl:element name="字:行距"> 1914 <xsl:attribute name="uof:locID">t0057</xsl:attribute> 1915 <xsl:attribute name="uof:attrList">类型 值</xsl:attribute> 1916 <xsl:choose> 1917 <xsl:when test="contains(style:paragraph-properties/@fo:line-height,$ooUnit)"> 1918 <xsl:attribute name="字:类型">fixed</xsl:attribute> 1919 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(style:paragraph-properties/@fo:line-height,$ooUnit)"/></xsl:attribute> 1920 </xsl:when> 1921 <xsl:when test="contains(style:paragraph-properties/@fo:line-height,'%')"> 1922 <xsl:attribute name="字:类型">multi-lines</xsl:attribute> 1923 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(style:paragraph-properties/@fo:line-height,'%') div 100"/></xsl:attribute> 1924 </xsl:when> 1925 <xsl:when test="style:paragraph-properties/@style:line-height-at-least"> 1926 <xsl:attribute name="字:类型">at-least</xsl:attribute> 1927 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(style:paragraph-properties/@style:line-height-at-least,$ooUnit)"/></xsl:attribute> 1928 </xsl:when> 1929 <xsl:when test="style:paragraph-properties/@style:line-spacing"> 1930 <xsl:attribute name="字:类型">line-space</xsl:attribute> 1931 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(style:paragraph-properties/@style:line-spacing,$ooUnit)"/></xsl:attribute> 1932 </xsl:when> 1933 <xsl:otherwise> 1934 <xsl:attribute name="字:类型">multi-lines</xsl:attribute> 1935 <xsl:attribute name="字:值">1.0</xsl:attribute> 1936 </xsl:otherwise> 1937 </xsl:choose> 1938 </xsl:element> 1939 <xsl:if test="style:paragraph-properties/@fo:widows"> 1940 <xsl:element name="字:孤行控制"> 1941 <xsl:attribute name="uof:locID">t0060</xsl:attribute> 1942 <xsl:value-of select="style:paragraph-properties/@fo:widows"/> 1943 </xsl:element> 1944 </xsl:if> 1945 <xsl:if test="style:paragraph-properties/@fo:orphans"> 1946 <xsl:element name="字:寡行控制"> 1947 <xsl:attribute name="uof:locID">t0061</xsl:attribute> 1948 <xsl:value-of select="style:paragraph-properties/@fo:orphans"/> 1949 </xsl:element> 1950 </xsl:if> 1951 <xsl:element name="字:段中不分页"> 1952 <xsl:attribute name="uof:locID">t0062</xsl:attribute> 1953 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1954 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:paragraph-properties/@fo:keep-together='always'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1955 </xsl:element> 1956 <xsl:if test="style:paragraph-properties/@fo:keep-with-next"> 1957 <xsl:element name="字:与下段同页"> 1958 <xsl:attribute name="uof:locID">t0063</xsl:attribute> 1959 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1960 <xsl:attribute name="字:值">true</xsl:attribute> 1961 </xsl:element> 1962 </xsl:if> 1963 <xsl:if test="style:paragraph-properties/@fo:break-before"> 1964 <xsl:element name="字:段前分页"> 1965 <xsl:attribute name="uof:locID">t0064</xsl:attribute> 1966 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1967 <xsl:attribute name="字:值">true</xsl:attribute> 1968 </xsl:element> 1969 </xsl:if> 1970 <xsl:if test="style:paragraph-properties/@style:snap-to-layout-grid"> 1971 <xsl:element name="字:对齐网格"> 1972 <xsl:attribute name="uof:locID">t0069</xsl:attribute> 1973 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1974 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:paragraph-properties/@style:snap-to-layout-grid='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1975 </xsl:element> 1976 </xsl:if> 1977 <xsl:if test="style:paragraph-properties/style:drop-cap/@style:lines"> 1978 <xsl:element name="字:首字下沉"> 1979 <xsl:attribute name="uof:locID">t0070</xsl:attribute> 1980 <xsl:attribute name="uof:attrList">类型 字体引用 字符数 行数 间距</xsl:attribute> 1981 <xsl:attribute name="字:类型">dropped</xsl:attribute> 1982 <xsl:if test="style:paragraph-properties/style:drop-cap/@style:style-name"> 1983 <xsl:attribute name="字:字体引用"><xsl:value-of select="translate(style:paragraph-properties/style:drop-cap/@style:style-name,' ','_')"/></xsl:attribute> 1984 </xsl:if> 1985 <xsl:attribute name="字:间距"><xsl:choose><xsl:when test="style:paragraph-properties/style:drop-cap/@style:distance"><xsl:value-of select="substring-before(style:paragraph-properties/style:drop-cap/@style:distance,$ooUnit)"/></xsl:when><xsl:otherwise>0.00</xsl:otherwise></xsl:choose></xsl:attribute> 1986 <xsl:if test="style:paragraph-properties/style:drop-cap/@style:length"> 1987 <xsl:attribute name="字:字符数"><xsl:value-of select="style:paragraph-properties/style:drop-cap/@style:length"/></xsl:attribute> 1988 </xsl:if> 1989 <xsl:if test="style:paragraph-properties/style:drop-cap/@style:lines"> 1990 <xsl:attribute name="字:行数"><xsl:value-of select="style:paragraph-properties/style:drop-cap/@style:lines"/></xsl:attribute> 1991 </xsl:if> 1992 </xsl:element> 1993 </xsl:if> 1994 <xsl:element name="字:取消断字"> 1995 <xsl:attribute name="uof:locID">t0071</xsl:attribute> 1996 <xsl:attribute name="uof:attrList">值</xsl:attribute> 1997 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:paragraph-properties/@fo:hyphenate"><xsl:value-of select="style:paragraph-properties/@fo:hyphenate"/></xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 1998 </xsl:element> 1999 <xsl:element name="字:取消行号"> 2000 <xsl:attribute name="uof:locID">t0072</xsl:attribute> 2001 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2002 <xsl:variable name="aa"> 2003 <xsl:value-of select="style:paragraph-properties/@text:number-lines"/> 2004 </xsl:variable> 2005 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="$aa='false'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute> 2006 </xsl:element> 2007 <xsl:element name="字:允许单词断字"> 2008 <xsl:attribute name="字:值">true</xsl:attribute> 2009 <xsl:attribute name="uof:locID">t0073</xsl:attribute> 2010 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2011 </xsl:element> 2012 <xsl:if test="style:paragraph-properties/@style:punctuation-wrap"> 2013 <xsl:element name="字:行首尾标点控制"> 2014 <xsl:attribute name="uof:locID">t0074</xsl:attribute> 2015 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2016 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:paragraph-properties/@style:punctuation-wrap='hanging'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 2017 </xsl:element> 2018 </xsl:if> 2019 <xsl:element name="字:是否行首标点压缩"> 2020 <xsl:attribute name="uof:locID">t0075</xsl:attribute> 2021 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2022 <xsl:attribute name="字:值">false</xsl:attribute> 2023 </xsl:element> 2024 <xsl:if test="style:paragraph-properties/@style:line-break "> 2025 <xsl:element name="字:中文习惯首尾字符"> 2026 <xsl:attribute name="uof:locID">t0076</xsl:attribute> 2027 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2028 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:paragraph-properties/@style:line-break='strict'">true</xsl:when><xsl:when test="style:paragraph-properties/@style:line-break='normal'">false</xsl:when></xsl:choose></xsl:attribute> 2029 </xsl:element> 2030 </xsl:if> 2031 <xsl:if test="style:paragraph-properties/@style:text-autospace"> 2032 <xsl:element name="字:自动调整中英文字符间距"> 2033 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:paragraph-properties/@style:text-autospace='ideograph-alpha'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 2034 <xsl:attribute name="uof:locID">t0077</xsl:attribute> 2035 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2036 </xsl:element> 2037 </xsl:if> 2038 <xsl:if test="style:paragraph-properties/@style:text-autospace"> 2039 <xsl:element name="字:自动调整中文与数字间距"> 2040 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:paragraph-properties/@style:text-autospace='ideograph-alpha'">true </xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 2041 <xsl:attribute name="uof:locID">t0078</xsl:attribute> 2042 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2043 </xsl:element> 2044 </xsl:if> 2045 <xsl:element name="字:有网格自动调整右缩进"> 2046 <xsl:attribute name="字:值">false</xsl:attribute> 2047 <xsl:attribute name="uof:locID">t0195</xsl:attribute> 2048 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2049 </xsl:element> 2050 <xsl:if test="style:paragraph-properties/@fo:border or style:paragraph-properties/@fo:border-top or style:paragraph-properties/@fo:border-bottom or style:paragraph-properties/@fo:border-left or style:paragraph-properties/@fo:border-right or style:paragraph-properties/@style:shadow[.!='none']"> 2051 <xsl:element name="字:边框"> 2052 <xsl:attribute name="uof:locID">t0065</xsl:attribute> 2053 <xsl:for-each select="style:paragraph-properties"> 2054 <xsl:call-template name="uof:边框"/> 2055 </xsl:for-each> 2056 </xsl:element> 2057 </xsl:if> 2058 <xsl:if test="style:paragraph-properties/@fo:background-color"> 2059 <xsl:element name="字:填充"> 2060 <xsl:attribute name="uof:locID">t0066</xsl:attribute> 2061 <xsl:for-each select="style:paragraph-properties"> 2062 <xsl:call-template name="图:填充"/> 2063 </xsl:for-each> 2064 </xsl:element> 2065 </xsl:if> 2066 <xsl:if test="style:paragraph-properties/@fo:margin-top or style:paragraph-properties/@fo:margin-bottom"> 2067 <字:段间距 uof:locID="t0058"> 2068 <xsl:if test="style:paragraph-properties/@fo:margin-top"> 2069 <字:段前距 uof:locID="t0196"> 2070 <字:绝对值 uof:locID="t0199" uof:attrList="值"> 2071 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(style:paragraph-properties/@fo:margin-top,$ooUnit)"/></xsl:attribute> 2072 </字:绝对值> 2073 </字:段前距> 2074 </xsl:if> 2075 <xsl:if test="style:paragraph-properties/@fo:margin-bottom"> 2076 <字:段后距 uof:locID="t0197"> 2077 <字:绝对值 uof:locID="t0202" uof:attrList="值"> 2078 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(style:paragraph-properties/@fo:margin-bottom,$ooUnit)"/></xsl:attribute> 2079 </字:绝对值> 2080 </字:段后距> 2081 </xsl:if> 2082 </字:段间距> 2083 </xsl:if> 2084 <xsl:if test="style:paragraph-properties/style:tab-stops"> 2085 <xsl:element name="字:制表位设置"> 2086 <xsl:attribute name="uof:locID">t0067</xsl:attribute> 2087 <xsl:for-each select="style:paragraph-properties/style:tab-stops/style:tab-stop"> 2088 <xsl:element name="字:制表位"> 2089 <xsl:attribute name="uof:locID">t0068</xsl:attribute> 2090 <xsl:attribute name="uof:attrList">位置 类型 前导符 制表位字符</xsl:attribute> 2091 <xsl:attribute name="字:位置"><xsl:value-of select="substring-before(@style:position,$ooUnit)"/></xsl:attribute> 2092 <xsl:variable name="aa"> 2093 <xsl:value-of select="@style:type"/> 2094 </xsl:variable> 2095 <xsl:variable name="zbflx"> 2096 <xsl:choose> 2097 <xsl:when test="$aa='right'">right</xsl:when> 2098 <xsl:when test="$aa='center'">center</xsl:when> 2099 <xsl:when test="$aa='char'and @style:char!=''">decimal</xsl:when> 2100 <xsl:otherwise>left</xsl:otherwise> 2101 </xsl:choose> 2102 </xsl:variable> 2103 <xsl:attribute name="字:类型"><xsl:value-of select="$zbflx"/></xsl:attribute> 2104 <xsl:attribute name="字:制表位字符"><xsl:value-of select="@style:leader-text"/></xsl:attribute> 2105 <xsl:if test="@style:leader-style"> 2106 <xsl:attribute name="字:前导符"><xsl:value-of select="@style:leader-style"/></xsl:attribute> 2107 </xsl:if> 2108 </xsl:element> 2109 </xsl:for-each> 2110 </xsl:element> 2111 </xsl:if> 2112 </xsl:template> 2113 <xsl:template match="text:s"> 2114 <xsl:param name="bText"/> 2115 <xsl:choose> 2116 <xsl:when test="$bText='0'"> 2117 <xsl:variable name="count"> 2118 <xsl:choose> 2119 <xsl:when test="not(@text:c)">1</xsl:when> 2120 <xsl:otherwise> 2121 <xsl:value-of select="@text:c"/> 2122 </xsl:otherwise> 2123 </xsl:choose> 2124 </xsl:variable> 2125 <字:句 uof:locID="t0085"> 2126 <字:空格符 uof:locID="t0126" uof:attrList="个数" 字:个数="{$count}"/> 2127 </字:句> 2128 </xsl:when> 2129 <xsl:otherwise> 2130 <字:空格符 uof:locID="t0126" uof:attrList="个数" 字:个数="{@text:c}"/> 2131 </xsl:otherwise> 2132 </xsl:choose> 2133 </xsl:template> 2134 <xsl:template name="textp" match="text:p"> 2135 <xsl:variable name="parentstyle"> 2136 <xsl:value-of select="@text:style-name"/> 2137 </xsl:variable> 2138 <xsl:for-each select="node( )"> 2139 <xsl:choose> 2140 <xsl:when test="self::node()[name(.)='text:span']"> 2141 <xsl:call-template name="textspan"/> 2142 </xsl:when> 2143 <xsl:when test="self::node()[name(.)='text:sequence']"> 2144 <xsl:apply-templates select="."/> 2145 </xsl:when> 2146 <xsl:when test="self::node()/draw:text-box/text:p/text:sequence"> 2147 <xsl:for-each select="draw:text-box/text:p/node()"> 2148 <xsl:choose> 2149 <xsl:when test="self::node()[name(.)='text:sequence']"> 2150 <xsl:apply-templates select="."/> 2151 </xsl:when> 2152 <xsl:when test="not(self::node()[substring-before(name(.),':')='draw'])"> 2153 <xsl:call-template name="字:句"> 2154 <xsl:with-param name="parentstyle" select="$parentstyle"/> 2155 </xsl:call-template> 2156 </xsl:when> 2157 </xsl:choose> 2158 </xsl:for-each> 2159 </xsl:when> 2160 <xsl:when test="self::node()[name(.)='text:date']"> 2161 <xsl:apply-templates select="."/> 2162 </xsl:when> 2163 <xsl:when test="self::node()[name(.)='text:time']"> 2164 <xsl:apply-templates select="."/> 2165 </xsl:when> 2166 <xsl:when test="self::node()[name(.)='text:s']"> 2167 <xsl:apply-templates select="."> 2168 <xsl:with-param name="bText" select="0"/> 2169 </xsl:apply-templates> 2170 </xsl:when> 2171 <xsl:when test="self::node()[name(.)='text:file-name']"> 2172 <xsl:apply-templates select="."/> 2173 </xsl:when> 2174 <xsl:when test="self::node()[name(.)='text:chapter']"> 2175 <xsl:apply-templates select="."/> 2176 </xsl:when> 2177 <xsl:when test="self::node()[name(.)='text:editing-duration']"> 2178 <xsl:apply-templates select="."/> 2179 </xsl:when> 2180 <xsl:when test="self::node()[name(.)='text:creation-time']"> 2181 <xsl:apply-templates select="."/> 2182 </xsl:when> 2183 <xsl:when test="self::node()[name(.)='text:creation-date']"> 2184 <xsl:apply-templates select="."/> 2185 </xsl:when> 2186 <xsl:when test="self::node()[name(.)='text:character-count']"> 2187 <xsl:apply-templates select="."/> 2188 </xsl:when> 2189 <xsl:when test="self::node()[name(.)='text:page-count']"> 2190 <xsl:apply-templates select="."/> 2191 </xsl:when> 2192 <xsl:when test="self::node()[name(.)='text:page-number']"> 2193 <xsl:apply-templates select="."/> 2194 </xsl:when> 2195 <xsl:when test="substring-before(name(.),':')='draw' and not(name(.)='draw:a')"> 2196 <字:句 uof:locID="t0085"> 2197 <xsl:call-template name="字:锚点"/> 2198 </字:句> 2199 </xsl:when> 2200 <xsl:when test="self::node()[name(.)='text:note']/@text:note-class='footnote'"> 2201 <字:句 uof:locID="t0085"> 2202 <xsl:call-template name="jiaozhu"/> 2203 </字:句> 2204 </xsl:when> 2205 <xsl:when test="self::node()[name(.)='text:note']/@text:note-class='endnote'"> 2206 <字:句 uof:locID="t0085"> 2207 <xsl:call-template name="weizhu"/> 2208 </字:句> 2209 </xsl:when> 2210 <xsl:when test="name(.)='text:alphabetical-index-mark-start'"> 2211 <xsl:element name="字:句"> 2212 <xsl:element name="字:区域开始"> 2213 <xsl:attribute name="uof:locId">t0121</xsl:attribute> 2214 <xsl:attribute name="uof:attrList">标识符 名称 类型</xsl:attribute> 2215 <xsl:attribute name="字:类型">user-data</xsl:attribute> 2216 <xsl:attribute name="字:名称"><xsl:value-of select="@text:string-value-phonetic"/></xsl:attribute> 2217 <xsl:attribute name="字:标识符"><xsl:value-of select="@text:id"/></xsl:attribute> 2218 </xsl:element> 2219 </xsl:element> 2220 </xsl:when> 2221 <xsl:when test="name(.)='text:alphabetical-index-mark-end'"> 2222 <xsl:element name="字:句"> 2223 <xsl:element name="字:区域结束" uof:locID="t0122" uof:attrList="标识符引用"> 2224 <xsl:attribute name="字:标识符引用"><xsl:value-of select="@text:id"/></xsl:attribute> 2225 </xsl:element> 2226 </xsl:element> 2227 </xsl:when> 2228 <xsl:when test="name(.)='text:bookmark' "> 2229 <字:句 uof:locID="t0085"> 2230 <xsl:element name="字:句属性"> 2231 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 2232 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 2233 </xsl:element> 2234 <字:区域开始 uof:locID="t0121" uof:attrList="标识符 名称 类型" 字:名称="{@text:name}" 字:类型="bookmark" 字:标识符="{generate-id()}"/> 2235 <字:区域结束 uof:locID="t0122" uof:attrList="标识符引用" 字:标识符引用="{generate-id()}"/> 2236 </字:句> 2237 </xsl:when> 2238 <xsl:when test="name(.)='text:a'"> 2239 <字:句 uof:locID="t0085"> 2240 <xsl:element name="字:句属性"> 2241 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 2242 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 2243 </xsl:element> 2244 <xsl:element name="字:区域开始"> 2245 <xsl:attribute name="字:标识符">hlnk<xsl:number from="/office:document/office:body/office:text" level="any" count="text:a"/></xsl:attribute> 2246 <xsl:attribute name="字:名称">Hyperlink</xsl:attribute> 2247 <xsl:attribute name="字:类型">hyperlink</xsl:attribute> 2248 <xsl:attribute name="uof:locID">t0121</xsl:attribute> 2249 <xsl:attribute name="uof:attrList">标识符 名称 类型</xsl:attribute> 2250 </xsl:element> 2251 <xsl:element name="字:文本串"> 2252 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 2253 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 2254 <xsl:value-of select="."/> 2255 </xsl:element> 2256 <xsl:element name="字:区域结束"> 2257 <xsl:attribute name="字:标识符引用">hlnk<xsl:number from="/office:document/office:body/office:text" level="any" count="text:a"/></xsl:attribute> 2258 <xsl:attribute name="uof:locID">t0122</xsl:attribute> 2259 <xsl:attribute name="uof:attrList">标识符引用</xsl:attribute> 2260 </xsl:element> 2261 </字:句> 2262 </xsl:when> 2263 <xsl:when test="name(.)='office:annotation'"> 2264 <字:句 uof:locID="t0085"> 2265 <xsl:element name="字:句属性"> 2266 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 2267 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 2268 </xsl:element> 2269 <xsl:element name="字:区域开始"> 2270 <xsl:attribute name="字:标识符">cmt<xsl:number from="/office:document/office:body/office:text" level="any" count="office:annotation"/></xsl:attribute> 2271 <xsl:attribute name="字:名称">Comment</xsl:attribute> 2272 <xsl:attribute name="字:类型">annotation</xsl:attribute> 2273 <xsl:attribute name="uof:locID">t0121</xsl:attribute> 2274 <xsl:attribute name="uof:attrList">标识符 名称 类型</xsl:attribute> 2275 </xsl:element> 2276 <xsl:element name="字:区域结束"> 2277 <xsl:attribute name="字:标识符引用">cmt<xsl:number from="/office:document/office:body/office:text" level="any" count="office:annotation"/></xsl:attribute> 2278 <xsl:attribute name="uof:locID">t0122</xsl:attribute> 2279 <xsl:attribute name="uof:attrList">标识符引用</xsl:attribute> 2280 </xsl:element> 2281 </字:句> 2282 </xsl:when> 2283 <xsl:when test="self::node()[name(.)='text:change-start'] or self::node()[name(.)='text:change'] or self::node()[name(.)='text:change-end']"> 2284 <xsl:call-template name="xiuding"/> 2285 </xsl:when> 2286 <xsl:otherwise> 2287 <xsl:call-template name="字:句"> 2288 <xsl:with-param name="parentstyle" select="$parentstyle"/> 2289 </xsl:call-template> 2290 </xsl:otherwise> 2291 </xsl:choose> 2292 </xsl:for-each> 2293 </xsl:template> 2294 <xsl:template name="xiuding"> 2295 <xsl:choose> 2296 <xsl:when test="self::node()[name(.)='text:change-start']or self::node()[name(.)='text:change']"> 2297 <xsl:variable name="changeID"> 2298 <xsl:value-of select="@text:change-id"/> 2299 </xsl:variable> 2300 <xsl:for-each select="/office:document/office:body/office:text/text:tracked-changes/text:changed-region"> 2301 <xsl:if test="$changeID=@text:id"> 2302 <xsl:choose> 2303 <xsl:when test="text:insertion"> 2304 <xsl:element name="字:修订开始"> 2305 <xsl:attribute name="uof:locID">t0206</xsl:attribute> 2306 <xsl:attribute name="uof:attrList">标识符 类型 修订信息引用</xsl:attribute> 2307 <xsl:attribute name="字:标识符"><xsl:value-of select="@text:id"/></xsl:attribute> 2308 <xsl:attribute name="字:类型">insert</xsl:attribute> 2309 <xsl:attribute name="字:修订信息引用"><xsl:value-of select="@text:id"/></xsl:attribute> 2310 </xsl:element> 2311 </xsl:when> 2312 <xsl:when test="text:format-change"> 2313 <xsl:element name="字:修订开始"> 2314 <xsl:attribute name="uof:locID">t0206</xsl:attribute> 2315 <xsl:attribute name="uof:attrList">标识符 类型 修订信息引用</xsl:attribute> 2316 <xsl:attribute name="字:标识符"><xsl:value-of select="@text:id"/></xsl:attribute> 2317 <xsl:attribute name="字:类型">format</xsl:attribute> 2318 <xsl:attribute name="字:修订信息引用"><xsl:value-of select="@text:id"/></xsl:attribute> 2319 </xsl:element> 2320 </xsl:when> 2321 <xsl:when test="text:deletion"> 2322 <xsl:element name="字:修订开始"> 2323 <xsl:attribute name="uof:locID">t0206</xsl:attribute> 2324 <xsl:attribute name="uof:attrList">标识符 类型 修订信息引用</xsl:attribute> 2325 <xsl:attribute name="字:标识符"><xsl:value-of select="@text:id"/></xsl:attribute> 2326 <xsl:attribute name="字:类型">delete</xsl:attribute> 2327 <xsl:attribute name="字:修订信息引用"><xsl:value-of select="@text:id"/></xsl:attribute> 2328 </xsl:element> 2329 </xsl:when> 2330 </xsl:choose> 2331 </xsl:if> 2332 </xsl:for-each> 2333 </xsl:when> 2334 <xsl:when test="self::node()[name(.)='text:change-end']"> 2335 <xsl:variable name="changeendID"> 2336 <xsl:value-of select="@text:change-id"/> 2337 </xsl:variable> 2338 <xsl:for-each select="/office:document/office:body/office:text/text:tracked-changes/text:changed-region"> 2339 <xsl:if test="$changeendID=@text:id"> 2340 <xsl:choose> 2341 <xsl:when test="text:insertion"> 2342 <xsl:element name="字:修订结束"> 2343 <xsl:attribute name="uof:locID">t0207</xsl:attribute> 2344 <xsl:attribute name="uof:attrList">开始标识引用</xsl:attribute> 2345 <xsl:attribute name="字:开始标识引用"><xsl:value-of select="@text:id"/></xsl:attribute> 2346 </xsl:element> 2347 </xsl:when> 2348 <xsl:when test="text:deletion"> 2349 <xsl:element name="字:修订结束"> 2350 <xsl:attribute name="uof:locID">t0207</xsl:attribute> 2351 <xsl:attribute name="uof:attrList">开始标识引用</xsl:attribute> 2352 <xsl:attribute name="字:开始标识引用"><xsl:value-of select="@text:id"/></xsl:attribute> 2353 </xsl:element> 2354 </xsl:when> 2355 <xsl:when test="text:format-change"> 2356 <xsl:element name="字:修订结束"> 2357 <xsl:attribute name="uof:locID">t0207</xsl:attribute> 2358 <xsl:attribute name="uof:attrList">开始标识引用</xsl:attribute> 2359 <xsl:attribute name="字:开始标识引用"><xsl:value-of select="@text:id"/></xsl:attribute> 2360 </xsl:element> 2361 </xsl:when> 2362 </xsl:choose> 2363 </xsl:if> 2364 </xsl:for-each> 2365 </xsl:when> 2366 </xsl:choose> 2367 </xsl:template> 2368 <xsl:template name="字:句"> 2369 <xsl:param name="parentstyle"/> 2370 <xsl:if test="not(name(.)='text:bookmark-start' or name(.)='text:bookmark-end' or name(.)='draw:image' or name(.)='office:binary-data' or name(.)='text:page-number' or name(.)='text:page-count' or name(.)='text:initial-creator' or name(.)='text:author-name' or name(.)='text:author-initials' or name(.)='text:creation-time' or name(.)='text:creation-date' or name(.)='text:title' or name(.)='text:subject' or name(.)='text:file-name' or name(.)='text:editing-duration' or name(.)='text:character-count' or name(.)='text:chapter')"> 2371 <字:句 uof:locID="t0085"> 2372 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"> 2373 <xsl:choose> 2374 <xsl:when test="@text:style-name"> 2375 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 2376 </xsl:when> 2377 <xsl:when test="parent::text:h/@text:outline-level"> 2378 <xsl:attribute name="字:式样引用"><xsl:value-of select="concat('Heading_20_',parent::text:h/@text:outline-level)"/></xsl:attribute> 2379 </xsl:when> 2380 <xsl:when test="parent::node()/@text:style-name"> 2381 <xsl:attribute name="字:式样引用"><xsl:value-of select="parent::node( )/@text:style-name"/></xsl:attribute> 2382 </xsl:when> 2383 </xsl:choose> 2384 </字:句属性> 2385 <xsl:if test="ancestor::text:note-body"> 2386 <字:引文符号> 2387 <xsl:value-of select="ancestor::text:note/text:note-citation"/> 2388 </字:引文符号> 2389 </xsl:if> 2390 <xsl:choose> 2391 <xsl:when test="(preceding-sibling::text:bookmark-start) and (following-sibling::text:bookmark-end)"> 2392 <字:区域开始 uof:locID="t0121" uof:attrList="标识符 名称 类型"> 2393 <xsl:attribute name="字:标识符"><xsl:value-of select="preceding-sibling::text:bookmark-start/@text:name"/></xsl:attribute> 2394 <xsl:attribute name="字:名称">Bookmark</xsl:attribute> 2395 <xsl:attribute name="字:类型">bookmark</xsl:attribute> 2396 </字:区域开始> 2397 <xsl:element name="字:文本串"> 2398 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 2399 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 2400 <xsl:value-of select="string(.)"/> 2401 </xsl:element> 2402 <字:区域结束 uof:locID="t0122" uof:attrList="标识符引用"> 2403 <xsl:attribute name="字:标识符引用"><xsl:value-of select="following-sibling::text:bookmark-end/@text:name"/></xsl:attribute> 2404 </字:区域结束> 2405 </xsl:when> 2406 <xsl:when test="name(.)='draw:a'"> 2407 <xsl:variable name="link-name"> 2408 <xsl:value-of select="substring-after(@xlink:href,'#')"/> 2409 </xsl:variable> 2410 <字:区域开始 uof:locID="t0121" uof:attrList="标识符 名称 类型"> 2411 <xsl:attribute name="字:标识符"><xsl:value-of select="$link-name"/></xsl:attribute> 2412 <xsl:attribute name="字:名称">Bookmark</xsl:attribute> 2413 <xsl:attribute name="字:类型">bookmark</xsl:attribute> 2414 </字:区域开始> 2415 <xsl:call-template name="字:锚点"/> 2416 <字:区域结束 uof:locID="t0122" uof:attrList="标识符引用"> 2417 <xsl:attribute name="字:标识符引用"><xsl:value-of select="$link-name"/></xsl:attribute> 2418 </字:区域结束> 2419 </xsl:when> 2420 <xsl:when test="self::node( )[name(.)='text:tab']"> 2421 <xsl:element name="字:制表符"> 2422 <xsl:attribute name="uof:locID">t0123</xsl:attribute> 2423 </xsl:element> 2424 </xsl:when> 2425 <xsl:when test="self::node( )[name(.)='text:line-break']"> 2426 <xsl:element name="字:换行符"> 2427 <xsl:attribute name="uof:locID">t0124</xsl:attribute> 2428 </xsl:element> 2429 </xsl:when> 2430 <xsl:when test="name(.)='text:bookmark-start' or name(.)='text:bookmark-end' or name(.)='draw:image' or name(.)='office:binary-data'"> 2431 </xsl:when> 2432 <xsl:otherwise> 2433 <xsl:element name="字:文本串"> 2434 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 2435 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 2436 <xsl:value-of select="string(.)"/> 2437 </xsl:element> 2438 </xsl:otherwise> 2439 </xsl:choose> 2440 </字:句> 2441 </xsl:if> 2442 </xsl:template> 2443 <xsl:template match="draw:text-box"> 2444 <xsl:apply-templates/> 2445 </xsl:template> 2446 <xsl:template name="text"> 2447 <xsl:element name="字:句属性"> 2448 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 2449 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 2450 <xsl:attribute name="字:式样引用"><xsl:value-of select="parent::node( )/@text:style-name"/></xsl:attribute> 2451 </xsl:element> 2452 <xsl:element name="字:文本串"> 2453 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 2454 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 2455 <xsl:value-of select="string(.)"/> 2456 </xsl:element> 2457 </xsl:template> 2458 <xsl:template name="textspan"> 2459 <字:句 uof:locID="t0085"> 2460 <xsl:choose> 2461 <xsl:when test="./text:note/@text:note-class='footnote'"> 2462 <xsl:for-each select="text:note"> 2463 <xsl:call-template name="jiaozhu"/> 2464 </xsl:for-each> 2465 </xsl:when> 2466 <xsl:when test="./text:note/@text:note-class='endnote'"> 2467 <xsl:for-each select="text:note"> 2468 <xsl:call-template name="weizhu"/> 2469 </xsl:for-each> 2470 </xsl:when> 2471 <xsl:otherwise> 2472 <xsl:element name="字:句属性"> 2473 <xsl:attribute name="uof:locID">t0086</xsl:attribute> 2474 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 2475 <xsl:variable name="textstyle"> 2476 <xsl:value-of select="@text:style-name"/> 2477 </xsl:variable> 2478 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 2479 <xsl:for-each select="/office:document/office:automatic-styles//style:style[@style:family='text']"> 2480 <xsl:if test="@style:name=$textstyle and not(@style:parent-style-name='Standard')"> 2481 <xsl:if test="@style:parent-style-name=/office:document/office:styles/style:style/@style:name"> 2482 <xsl:call-template name="SentenceXD"> 2483 <xsl:with-param name="Sentencestyle" select="@style:parent-style-name"/> 2484 </xsl:call-template> 2485 </xsl:if> 2486 </xsl:if> 2487 </xsl:for-each> 2488 <xsl:for-each select="/office:document/office:automatic-styles//style:style[@style:family='text']"> 2489 <xsl:if test="@style:name=$textstyle"> 2490 <xsl:call-template name="SentenceXD"> 2491 <xsl:with-param name="Sentencestyle" select="@style:name"/> 2492 </xsl:call-template> 2493 </xsl:if> 2494 </xsl:for-each> 2495 </xsl:element> 2496 <xsl:element name="字:文本串"> 2497 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 2498 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 2499 <xsl:value-of select="string(.)"/> 2500 </xsl:element> 2501 </xsl:otherwise> 2502 </xsl:choose> 2503 </字:句> 2504 </xsl:template> 2505 <xsl:template name="SentenceXD"> 2506 <xsl:param name="Sentencestyle"/> 2507 </xsl:template> 2508 <xsl:template name="字:锚点"> 2509 <xsl:if test="not(name(.)='draw:glue-point')"> 2510 <xsl:variable name="name"> 2511 <xsl:value-of select="name(.)"/> 2512 </xsl:variable> 2513 <xsl:choose> 2514 <xsl:when test="name='draw:a'"> 2515 <xsl:for-each select="child::node( )"> 2516 <xsl:call-template name="字:锚点"/> 2517 </xsl:for-each> 2518 </xsl:when> 2519 <xsl:otherwise> 2520 <xsl:if test="$name = 'draw:g'"> 2521 <xsl:for-each select="child::*"> 2522 <xsl:call-template name="字:锚点"/> 2523 </xsl:for-each> 2524 </xsl:if> 2525 <字:锚点 uof:locID="t0110" uof:attrList="标识符 类型"> 2526 <xsl:choose> 2527 <xsl:when test="@text:anchor-type='as-char'"> 2528 <xsl:attribute name="字:类型">inline</xsl:attribute> 2529 </xsl:when> 2530 <xsl:otherwise> 2531 <xsl:attribute name="字:类型">normal</xsl:attribute> 2532 </xsl:otherwise> 2533 </xsl:choose> 2534 <字:锚点属性 uof:locID="t0111"> 2535 <字:宽度 uof:locID="t0112"> 2536 <xsl:choose> 2537 <xsl:when test="@svg:width"> 2538 <xsl:value-of select="substring-before(@svg:width,$uofUnit)"/> 2539 </xsl:when> 2540 <xsl:when test="@svg:x1"> 2541 <xsl:value-of select="substring-before(@svg:x2,$uofUnit) - substring-before(@svg:x1,$uofUnit)"/> 2542 </xsl:when> 2543 </xsl:choose> 2544 </字:宽度> 2545 <字:高度 uof:locID="t0113"> 2546 <xsl:choose> 2547 <xsl:when test="@svg:height"> 2548 <xsl:value-of select="substring-before(@svg:height,$uofUnit)"/> 2549 </xsl:when> 2550 <xsl:when test="@svg:x1"> 2551 <xsl:value-of select="substring-before(@svg:y2,$uofUnit) - substring-before(@svg:y1,$uofUnit)"/> 2552 </xsl:when> 2553 <xsl:when test="child::draw:text-box/@fo:min-height"> 2554 <xsl:value-of select="substring-before(child::draw:text-box/@fo:min-height,$uofUnit)"/> 2555 </xsl:when> 2556 </xsl:choose> 2557 </字:高度> 2558 <xsl:if test="not(@text:anchor-type='as-char')"> 2559 <字:位置 uof:locID="t0114"> 2560 <字:水平 uof:locID="t0176" uof:attrList="相对于"> 2561 <xsl:for-each select="key('graphicset',@draw:style-name)/style:graphic-properties"> 2562 <xsl:attribute name="字:相对于"><xsl:choose><xsl:when test="@style:horizontal-rel='page'">page</xsl:when><xsl:when test="@style:horizontal-rel='paragraph'">margin</xsl:when><xsl:when test="@style:horizontal-rel='page-content'">margin</xsl:when><xsl:when test="@style:horizontal-rel='paragraph-content'">margin</xsl:when><xsl:when test="@style:horizontal-rel='char'">char</xsl:when><xsl:otherwise>paragraph</xsl:otherwise></xsl:choose></xsl:attribute> 2563 </xsl:for-each> 2564 <xsl:choose> 2565 <xsl:when test="@svg:x or @svg:x1"> 2566 <字:绝对 uof:locID="t0177" uof:attrList="值"> 2567 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@svg:x"><xsl:value-of select="substring-before(@svg:x,$uofUnit)"/></xsl:when><xsl:when test="@svg:x1"><xsl:value-of select="substring-before(@svg:x1,$uofUnit)"/></xsl:when></xsl:choose></xsl:attribute> 2568 </字:绝对> 2569 </xsl:when> 2570 <xsl:otherwise> 2571 <字:相对 uof:locID="t0178" uof:attrList="参考点 值"> 2572 <xsl:for-each select="key('graphicset',@draw:style-name)/style:graphic-properties"> 2573 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@style:horizontal-pos='left'">left</xsl:when><xsl:when test="@style:horizontal-pos='right'">right</xsl:when><xsl:when test="@style:horizontal-pos='center'">center</xsl:when></xsl:choose></xsl:attribute> 2574 </xsl:for-each> 2575 </字:相对> 2576 </xsl:otherwise> 2577 </xsl:choose> 2578 </字:水平> 2579 <字:垂直 uof:locID="t0179" uof:attrList="相对于"> 2580 <xsl:for-each select="key('graphicset',@draw:style-name)/style:graphic-properties"> 2581 <xsl:attribute name="字:相对于"><xsl:choose><xsl:when test="@style:vertical-rel='page'">page</xsl:when><xsl:when test="@style:vertical-rel='paragraph'">paragraph</xsl:when><xsl:when test="@style:vertical-rel='page-content'">margin</xsl:when><xsl:when test="@style:vertical-rel='paragraph-content'">margin</xsl:when><xsl:when test="@style:vertical-rel='line'">line</xsl:when><xsl:otherwise>paragraph</xsl:otherwise></xsl:choose></xsl:attribute> 2582 </xsl:for-each> 2583 <xsl:choose> 2584 <xsl:when test="@svg:y or @svg:y1"> 2585 <字:绝对 uof:locID="t0180" uof:attrList="值"> 2586 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@svg:y"><xsl:value-of select="substring-before(@svg:y,$uofUnit)"/></xsl:when><xsl:when test="@svg:y1"><xsl:value-of select="substring-before(@svg:y1,$uofUnit)"/></xsl:when></xsl:choose></xsl:attribute> 2587 </字:绝对> 2588 </xsl:when> 2589 <xsl:otherwise> 2590 <字:相对 uof:locID="t0181" uof:attrList="参考点 值"> 2591 <xsl:for-each select="key('graphicset',@draw:style-name)/style:graphic-properties"> 2592 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@style:vertical-pos='bottom'">bottom</xsl:when><xsl:when test="@style:vertical-pos='top'">top</xsl:when><xsl:when test="@style:vertical-pos='middle'">center</xsl:when><xsl:when test="@style:vertical-pos='below'">inside</xsl:when></xsl:choose></xsl:attribute> 2593 </xsl:for-each> 2594 </字:相对> 2595 </xsl:otherwise> 2596 </xsl:choose> 2597 </字:垂直> 2598 </字:位置> 2599 </xsl:if> 2600 <xsl:for-each select="key('graphicset',@draw:style-name)/style:graphic-properties"> 2601 <字:绕排 uof:locID="t0115" uof:attrList="绕排方式 环绕文字 绕排顶点"> 2602 <xsl:variable name="wrap_type1"> 2603 <xsl:value-of select="@style:wrap"/> 2604 </xsl:variable> 2605 <xsl:variable name="wrap_type2"> 2606 <xsl:value-of select="@style:run-through"/> 2607 </xsl:variable> 2608 <xsl:variable name="a"> 2609 <xsl:value-of select="@style:number-wrapped-paragraphs"/> 2610 </xsl:variable> 2611 <xsl:if test="$wrap_type1"> 2612 <xsl:attribute name="字:绕排方式"><xsl:choose><xsl:when test="$wrap_type1='run-through' and $wrap_type2='background' ">behindtext</xsl:when><xsl:when test="$wrap_type1='run-through' and $a='1'">infrontoftext</xsl:when><xsl:when test="$wrap_type1='run-through'">through</xsl:when><xsl:when test="$wrap_type1='dynamic' ">top-bottom</xsl:when><xsl:when test="$wrap_type1='parallel' ">square</xsl:when><xsl:when test="$wrap_type1='left' or $wrap_type1='right'">tight</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 2613 </xsl:if> 2614 <xsl:if test="$wrap_type1='left' or $wrap_type1='right'"> 2615 <xsl:attribute name="字:环绕文字"><xsl:choose><xsl:when test="$wrap_type1='left'">left</xsl:when><xsl:when test="$wrap_type1='right'">right</xsl:when></xsl:choose></xsl:attribute> 2616 </xsl:if> 2617 </字:绕排> 2618 <字:边距 uof:locID="t0116" uof:attrList="上 左 右 下"> 2619 <xsl:choose> 2620 <xsl:when test="@fo:margin-top"> 2621 <xsl:attribute name="字:上"><xsl:value-of select="substring-before(@fo:margin-top,$uofUnit)"/></xsl:attribute> 2622 <xsl:attribute name="字:下"><xsl:value-of select="substring-before(@fo:margin-bottom,$uofUnit)"/></xsl:attribute> 2623 </xsl:when> 2624 <xsl:otherwise> 2625 <xsl:attribute name="字:上">0.0</xsl:attribute> 2626 <xsl:attribute name="字:下">0.0</xsl:attribute> 2627 </xsl:otherwise> 2628 </xsl:choose> 2629 <xsl:choose> 2630 <xsl:when test="@fo:margin-right"> 2631 <xsl:attribute name="字:右"><xsl:value-of select="substring-before(@fo:margin-right,$uofUnit)"/></xsl:attribute> 2632 <xsl:attribute name="字:左"><xsl:value-of select="substring-before(@fo:margin-left,$uofUnit)"/></xsl:attribute> 2633 </xsl:when> 2634 <xsl:otherwise> 2635 <xsl:attribute name="字:右">0.0</xsl:attribute> 2636 <xsl:attribute name="字:左">0.0</xsl:attribute> 2637 </xsl:otherwise> 2638 </xsl:choose> 2639 </字:边距> 2640 <字:锁定 uof:attrList="值" uof:locID="t0117"> 2641 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@draw:move-protect='false'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute> 2642 </字:锁定> 2643 <字:保护 uof:locID="t0118" uof:attrList="值"> 2644 <xsl:choose> 2645 <xsl:when test="$name='draw:image' or $name='draw:text-box'"> 2646 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@style:protect = 'content size position' or @style:protect = 'content' or @style:protect = 'content size' or @style:protect = 'size position' or @style:protect = 'size' or @style:protect = 'position' or @style:protect = 'content position' and @draw:size-protect= 'true'and @draw:move-protect= 'true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 2647 </xsl:when> 2648 <xsl:otherwise> 2649 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@style:protect = 'position size'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 2650 </xsl:otherwise> 2651 </xsl:choose> 2652 </字:保护> 2653 </xsl:for-each> 2654 <字:允许重叠 uof:locID="t0119" uof:attrList="值" 字:值="true"/> 2655 </字:锚点属性> 2656 <字:图形 uof:locID="t0120" uof:attrList="图形引用"> 2657 <xsl:variable name="refpicname"> 2658 <xsl:if test="@draw:style-name"> 2659 <xsl:value-of select="@draw:style-name"/> 2660 </xsl:if> 2661 </xsl:variable> 2662 <xsl:variable name="picnumber"> 2663 <xsl:if test="@draw:style-name"> 2664 <xsl:value-of select="count(preceding::*[@draw:style-name=$refpicname])"/> 2665 </xsl:if> 2666 </xsl:variable> 2667 <xsl:attribute name="字:图形引用"><xsl:value-of select="concat($refpicname,'_',$picnumber)"/></xsl:attribute> 2668 </字:图形> 2669 </字:锚点> 2670 </xsl:otherwise> 2671 </xsl:choose> 2672 </xsl:if> 2673 </xsl:template> 2674 <xsl:template name="liekuan"> 2675 <xsl:param name="count"/> 2676 <xsl:param name="width"/> 2677 <xsl:if test="$count > 0"> 2678 <字:列宽 uof:locID="t0132"> 2679 <xsl:value-of select="$width"/> 2680 </字:列宽> 2681 <xsl:call-template name="liekuan"> 2682 <xsl:with-param name="count" select="$count -1"/> 2683 <xsl:with-param name="width" select="$width"/> 2684 </xsl:call-template> 2685 </xsl:if> 2686 </xsl:template> 2687 <xsl:template name="exec_table" match="table:table"> 2688 <xsl:param name="tabletype"/> 2689 <字:文字表 uof:locID="t0128" uof:attrList="类型"> 2690 <xsl:choose> 2691 <xsl:when test="@table:is-sub-table='true'"> 2692 <xsl:attribute name="字:类型">sub-table</xsl:attribute> 2693 <xsl:element name="字:文字表属性"> 2694 <xsl:attribute name="uof:locID">t0129</xsl:attribute> 2695 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 2696 <xsl:element name="字:列宽集"> 2697 <xsl:attribute name="uof:locID">t0131</xsl:attribute> 2698 <xsl:for-each select="table:table-column"> 2699 <xsl:variable name="tableColName" select="@table:style-name"/> 2700 <xsl:variable name="colWidth" select="substring-before(//style:style[@style:name=$tableColName and @style:family='table-column']/style:table-column-properties/@style:column-width,$ooUnit)"/> 2701 <xsl:choose> 2702 <xsl:when test="@table:number-columns-repeated"> 2703 <xsl:call-template name="liekuan"> 2704 <xsl:with-param name="count" select="@table:number-columns-repeated"/> 2705 <xsl:with-param name="width" select="$colWidth"/> 2706 </xsl:call-template> 2707 </xsl:when> 2708 <xsl:otherwise> 2709 <字:列宽 uof:locID="t0132"> 2710 <xsl:value-of select="$colWidth"/> 2711 </字:列宽> 2712 </xsl:otherwise> 2713 </xsl:choose> 2714 </xsl:for-each> 2715 </xsl:element> 2716 </xsl:element> 2717 </xsl:when> 2718 <xsl:otherwise> 2719 <xsl:attribute name="字:类型">table</xsl:attribute> 2720 <xsl:element name="字:文字表属性"> 2721 <xsl:attribute name="uof:locID">t0129</xsl:attribute> 2722 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 2723 <xsl:attribute name="字:式样引用"><xsl:value-of select="@table:style-name"/></xsl:attribute> 2724 <xsl:variable name="tableName" select="@table:style-name"/> 2725 <xsl:element name="字:列宽集"> 2726 <xsl:attribute name="uof:locID">t0131</xsl:attribute> 2727 <xsl:for-each select="table:table-column"> 2728 <xsl:variable name="tableColName" select="@table:style-name"/> 2729 <xsl:variable name="colWidth" select="substring-before(//style:style[@style:name=$tableColName and @style:family='table-column']/style:table-column-properties/@style:column-width,$ooUnit)"/> 2730 <xsl:choose> 2731 <xsl:when test="@table:number-columns-repeated"> 2732 <xsl:call-template name="liekuan"> 2733 <xsl:with-param name="count" select="@table:number-columns-repeated"/> 2734 <xsl:with-param name="width" select="$colWidth"/> 2735 </xsl:call-template> 2736 </xsl:when> 2737 <xsl:otherwise> 2738 <字:列宽 uof:locID="t0132"> 2739 <xsl:value-of select="$colWidth"/> 2740 </字:列宽> 2741 </xsl:otherwise> 2742 </xsl:choose> 2743 </xsl:for-each> 2744 </xsl:element> 2745 <xsl:for-each select="key('set_styleStyle',$tableName)"> 2746 <xsl:element name="字:宽度"> 2747 <xsl:attribute name="uof:locID">t0130</xsl:attribute> 2748 <xsl:attribute name="uof:attrList">绝对宽度 相对宽度</xsl:attribute> 2749 <xsl:attribute name="字:绝对宽度"><xsl:value-of select="substring-before(style:table-properties/@style:width,$ooUnit)"/></xsl:attribute> 2750 <xsl:if test="style:table-properties/@style:rel-width"> 2751 <xsl:attribute name="字:相对宽度"><xsl:value-of select="substring-before(style:table-properties/@style:rel-width,'%') div 100"/></xsl:attribute> 2752 </xsl:if> 2753 </xsl:element> 2754 <xsl:element name="字:对齐"> 2755 <xsl:attribute name="uof:locID">t0133</xsl:attribute> 2756 <xsl:choose> 2757 <xsl:when test="style:table-properties/@table:align='right'">right</xsl:when> 2758 <xsl:when test="style:table-properties/@table:align='center'">center</xsl:when> 2759 <xsl:otherwise>left</xsl:otherwise> 2760 </xsl:choose> 2761 </xsl:element> 2762 <xsl:if test="style:table-properties/@fo:margin-left"> 2763 <xsl:element name="字:左缩进"> 2764 <xsl:attribute name="uof:locID">t0134</xsl:attribute> 2765 <xsl:value-of select="substring-before(style:table-properties/@fo:margin-left,$ooUnit)"/> 2766 </xsl:element> 2767 </xsl:if> 2768 <xsl:element name="字:绕排"> 2769 <xsl:attribute name="uof:locID">t0135</xsl:attribute> 2770 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2771 <xsl:attribute name="字:值">around</xsl:attribute> 2772 </xsl:element> 2773 <xsl:element name="字:边框"> 2774 <xsl:attribute name="uof:locID">t0137</xsl:attribute> 2775 <xsl:for-each select="style:table-properties"> 2776 <xsl:call-template name="uof:边框"/> 2777 </xsl:for-each> 2778 </xsl:element> 2779 <xsl:if test="style:table-properties/style:background-image/office:binary-data or style:table-properties/@fo:background-color or style:page-layout-properties/@fo:background-color"> 2780 <字:填充 uof:locID="t0138"> 2781 <xsl:for-each select="style:table-properties"> 2782 <xsl:call-template name="图:填充"> 2783 <xsl:with-param name="style-name" select="$tableName"/> 2784 </xsl:call-template> 2785 </xsl:for-each> 2786 </字:填充> 2787 </xsl:if> 2788 <xsl:element name="字:绕排边距"> 2789 <xsl:attribute name="uof:locID">t0139</xsl:attribute> 2790 <xsl:attribute name="uof:attrList">上 左 右 下</xsl:attribute> 2791 <xsl:if test="style:table-properties/@fo:margin-top"> 2792 <xsl:attribute name="字:上"><xsl:value-of select="substring-before(style:table-properties/@fo:margin-top,$ooUnit)"/></xsl:attribute> 2793 </xsl:if> 2794 <xsl:if test="style:table-properties/@fo:margin-left"> 2795 <xsl:attribute name="字:左"><xsl:value-of select="substring-before(style:table-properties/@fo:margin-left,$ooUnit)"/></xsl:attribute> 2796 </xsl:if> 2797 <xsl:if test="style:table-properties/@fo:margin-right"> 2798 <xsl:attribute name="字:右"><xsl:value-of select="substring-before(style:table-properties/@fo:margin-right,$ooUnit)"/></xsl:attribute> 2799 </xsl:if> 2800 <xsl:if test="style:table-properties/@fo:margin-bottom"> 2801 <xsl:attribute name="字:下"><xsl:value-of select="substring-before(style:table-properties/@fo:margin-bottom,$ooUnit)"/></xsl:attribute> 2802 </xsl:if> 2803 </xsl:element> 2804 <xsl:element name="字:自动调整大小"> 2805 <xsl:attribute name="字:值">true</xsl:attribute> 2806 <xsl:attribute name="uof:locID">t0140</xsl:attribute> 2807 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2808 </xsl:element> 2809 <xsl:element name="字:默认单元格边距"> 2810 <xsl:attribute name="uof:locID">t0141</xsl:attribute> 2811 <xsl:attribute name="uof:attrList">上 左 右 下</xsl:attribute> 2812 <xsl:attribute name="字:上">0.10</xsl:attribute> 2813 <xsl:attribute name="字:左">0.10</xsl:attribute> 2814 <xsl:attribute name="字:右">0.10</xsl:attribute> 2815 <xsl:attribute name="字:下">0.10</xsl:attribute> 2816 </xsl:element> 2817 <xsl:element name="字:默认单元格间距"> 2818 <xsl:attribute name="uof:locID">t0142</xsl:attribute> 2819 <xsl:value-of select="'0.00'"/> 2820 </xsl:element> 2821 </xsl:for-each> 2822 </xsl:element> 2823 </xsl:otherwise> 2824 </xsl:choose> 2825 <xsl:apply-templates select="table:table-header-rows/table:table-row"/> 2826 <xsl:apply-templates select="table:table-row"/> 2827 </字:文字表> 2828 </xsl:template> 2829 <xsl:key name="set_colWidth" match="//office:automatic-styles/style:style[@style:family='table-column']" use="@style:name"/> 2830 <xsl:key name="set_styleStyle" match="//office:automatic-styles/style:style" use="@style:name"/> 2831 <xsl:template match="table:table-row"> 2832 <xsl:element name="字:行"> 2833 <xsl:attribute name="uof:locID">t0143</xsl:attribute> 2834 <xsl:variable name="rowStyleName" select="@table:style-name|table:table-row/@table:style-name"/> 2835 <xsl:element name="字:表行属性"> 2836 <xsl:attribute name="uof:locID">t0144</xsl:attribute> 2837 <xsl:for-each select="key('set_styleStyle',$rowStyleName)/style:table-row-properties[@style:row-height or @style:min-row-height]"> 2838 <xsl:element name="字:高度"> 2839 <xsl:if test="@style:row-height"> 2840 <xsl:attribute name="字:固定值"><xsl:value-of select="substring-before(@style:row-height,$ooUnit)"/></xsl:attribute> 2841 </xsl:if> 2842 <xsl:if test="@style:min-row-height"> 2843 <xsl:attribute name="字:最小值"><xsl:value-of select="substring-before(@style:min-row-height,$ooUnit)"/></xsl:attribute> 2844 </xsl:if> 2845 <xsl:attribute name="uof:locID">t0145</xsl:attribute> 2846 <xsl:attribute name="uof:attrList">固定值 最小值</xsl:attribute> 2847 </xsl:element> 2848 </xsl:for-each> 2849 <xsl:if test="key('set_styleStyle',$rowStyleName)/style:table-row-properties[@style:keep-together]"> 2850 <xsl:element name="字:跨页"> 2851 <xsl:attribute name="uof:locID">t0146</xsl:attribute> 2852 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2853 <xsl:for-each select="key('set_styleStyle',$rowStyleName)/style:table-row-properties[@style:keep-together]"> 2854 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="@style:keep-together='false'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute> 2855 </xsl:for-each> 2856 </xsl:element> 2857 </xsl:if> 2858 <xsl:if test="name(..)='table:table-header-rows'"> 2859 <xsl:element name="字:表头行"> 2860 <xsl:attribute name="uof:locID">t0147</xsl:attribute> 2861 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2862 <xsl:attribute name="字:值">true</xsl:attribute> 2863 </xsl:element> 2864 </xsl:if> 2865 </xsl:element> 2866 <xsl:for-each select="node()"> 2867 <xsl:choose> 2868 <xsl:when test="name()='table:table-cell'"> 2869 <xsl:element name="字:单元格"> 2870 <xsl:attribute name="uof:locID">t0148</xsl:attribute> 2871 <xsl:call-template name="execTableCellAttribute"/> 2872 <xsl:for-each select="node( )"> 2873 <xsl:choose> 2874 <xsl:when test="name()='text:p'"> 2875 <xsl:call-template name="execParagraph"> 2876 <xsl:with-param name="currlistlvl" select="number('0')"/> 2877 <xsl:with-param name="liststylename" select="string('00000')"/> 2878 </xsl:call-template> 2879 </xsl:when> 2880 <xsl:when test="name()='table:table' or name()='table:sub-table' or self::node()/@table:is-sub-table='true'"> 2881 <xsl:call-template name="exec_table"> 2882 <xsl:with-param name="tabletype" select="name()"/> 2883 </xsl:call-template> 2884 </xsl:when> 2885 <xsl:otherwise/> 2886 </xsl:choose> 2887 </xsl:for-each> 2888 </xsl:element> 2889 </xsl:when> 2890 <xsl:otherwise/> 2891 </xsl:choose> 2892 </xsl:for-each> 2893 </xsl:element> 2894 </xsl:template> 2895 <xsl:template name="execTableCellAttribute"> 2896 <xsl:element name="字:单元格属性"> 2897 <xsl:attribute name="uof:locID">t0149</xsl:attribute> 2898 <xsl:variable name="StyleName" select="@table:style-name"/> 2899 <xsl:element name="字:宽度"> 2900 <xsl:attribute name="uof:locID">t0150</xsl:attribute> 2901 <xsl:attribute name="uof:attrList">绝对值 相对值</xsl:attribute> 2902 <xsl:variable name="sn"> 2903 <xsl:number from="/office:document/office:body/office:text" level="single" count="table:table-cell" format="1"/> 2904 </xsl:variable> 2905 <xsl:variable name="sn1"> 2906 <xsl:choose> 2907 <xsl:when test="../../table:table-column[number($sn)]/@table:style-name"> 2908 <xsl:value-of select="$sn"/> 2909 </xsl:when> 2910 <xsl:when test=" name(../..)='table:table-header-rows' and ../../../table:table-column[number($sn)]/@table:style-name"> 2911 <xsl:value-of select="$sn"/> 2912 </xsl:when> 2913 <xsl:otherwise> 2914 <xsl:value-of select="'1'"/> 2915 </xsl:otherwise> 2916 </xsl:choose> 2917 </xsl:variable> 2918 <xsl:variable name="KuanDu"> 2919 <xsl:choose> 2920 <xsl:when test=" name(../..)='table:table-header-rows' and ../../../table:table-column[number($sn)]/@table:style-name"> 2921 <xsl:value-of select="../../../table:table-column[number($sn1)]/@table:style-name"/> 2922 </xsl:when> 2923 <xsl:otherwise> 2924 <xsl:value-of select="../../table:table-column[number($sn1)]/@table:style-name"/> 2925 </xsl:otherwise> 2926 </xsl:choose> 2927 </xsl:variable> 2928 <xsl:attribute name="字:绝对值"><xsl:value-of select="substring-before(key('set_colWidth',$KuanDu)/style:table-column-properties/@style:column-width,$ooUnit)"/></xsl:attribute> 2929 <xsl:if test="key('set_colWidth',$KuanDu)/style:table-column-properties/@style:rel-column-width"> 2930 <xsl:attribute name="字:相对值"><xsl:value-of select="substring-before(key('set_colWidth',$KuanDu)/style:table-column-properties/@style:rel-column-width,'*')"/></xsl:attribute> 2931 </xsl:if> 2932 </xsl:element> 2933 <xsl:if test="@table:number-columns-spanned"> 2934 <xsl:element name="字:跨列"> 2935 <xsl:attribute name="uof:locID">t0156</xsl:attribute> 2936 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2937 <xsl:attribute name="字:值"><xsl:value-of select="@table:number-columns-spanned"/></xsl:attribute> 2938 </xsl:element> 2939 </xsl:if> 2940 <xsl:for-each select="key('set_styleStyle',$StyleName)"> 2941 <xsl:element name="字:单元格边距"> 2942 <xsl:attribute name="uof:locID">t0151</xsl:attribute> 2943 <xsl:attribute name="uof:attrList">上 左 右 下</xsl:attribute> 2944 <xsl:choose> 2945 <xsl:when test="style:table-cell-properties/@fo:padding"> 2946 <xsl:attribute name="字:上"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding,$uofUnit)"/></xsl:attribute> 2947 <xsl:attribute name="字:左"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding,$uofUnit)"/></xsl:attribute> 2948 <xsl:attribute name="字:右"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding,$uofUnit)"/></xsl:attribute> 2949 <xsl:attribute name="字:下"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding,$uofUnit)"/></xsl:attribute> 2950 </xsl:when> 2951 <xsl:otherwise> 2952 <xsl:attribute name="字:上"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding-top,$uofUnit)"/></xsl:attribute> 2953 <xsl:attribute name="字:左"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding-left,$uofUnit)"/></xsl:attribute> 2954 <xsl:attribute name="字:右"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding-right,$uofUnit)"/></xsl:attribute> 2955 <xsl:attribute name="字:下"><xsl:value-of select="substring-before(style:table-cell-properties/@fo:padding-bottom,$uofUnit)"/></xsl:attribute> 2956 </xsl:otherwise> 2957 </xsl:choose> 2958 </xsl:element> 2959 <xsl:if test="style:table-cell-properties/@fo:border or style:table-cell-properties/@fo:border-top or style:table-cell-properties/@fo:border-bottom or style:table-cell-properties/@fo:border-left or style:table-cell-properties/@fo:border-right or style:table-cell-properties/@style:shadow"> 2960 <xsl:element name="字:边框"> 2961 <xsl:attribute name="uof:locID">t0152</xsl:attribute> 2962 <xsl:for-each select="style:table-cell-properties"> 2963 <xsl:call-template name="uof:边框"/> 2964 </xsl:for-each> 2965 </xsl:element> 2966 </xsl:if> 2967 <xsl:if test="style:table-cell-properties/style:background-image/office:binary-data or style:table-cell-properties/@fo:background-color"> 2968 <字:填充 uof:locID="t0153"> 2969 <xsl:for-each select="style:table-cell-properties"> 2970 <xsl:call-template name="图:填充"/> 2971 </xsl:for-each> 2972 </字:填充> 2973 </xsl:if> 2974 <字:垂直对齐方式 uof:locID="t0154"> 2975 <xsl:choose> 2976 <xsl:when test="style:table-cell-properties/@style:vertical-align='middle'">center</xsl:when> 2977 <xsl:when test="style:table-cell-properties/@style:vertical-align='bottom'">bottom</xsl:when> 2978 <xsl:otherwise>top</xsl:otherwise> 2979 </xsl:choose> 2980 </字:垂直对齐方式> 2981 <xsl:element name="字:自动换行"> 2982 <xsl:attribute name="字:值">true</xsl:attribute> 2983 <xsl:attribute name="uof:locID">t0157</xsl:attribute> 2984 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2985 </xsl:element> 2986 <xsl:element name="字:适应文字"> 2987 <xsl:attribute name="字:值">true</xsl:attribute> 2988 <xsl:attribute name="uof:locID">t0158</xsl:attribute> 2989 <xsl:attribute name="uof:attrList">值</xsl:attribute> 2990 </xsl:element> 2991 </xsl:for-each> 2992 </xsl:element> 2993 </xsl:template> 2994 <xsl:key name="bpath" match="//office:document/office:body/office:text/text:p/text:span" use="@text:style-name"/> 2995 <xsl:template name="字:句属性"> 2996 <xsl:element name="字:字体"> 2997 <xsl:attribute name="uof:locID">t0088</xsl:attribute> 2998 <xsl:attribute name="uof:attrList">西文字体引用 中文字体引用 特殊字体引用 西文绘制 字号 相对字号 颜色</xsl:attribute> 2999 <xsl:if test="contains(@style:parent-style-name,'Header') or contains(@style:parent-style-name,'Foot') or contains(@style:parent-style-name,'Endnote')"> 3000 <xsl:attribute name="字:字号">9</xsl:attribute> 3001 </xsl:if> 3002 <xsl:if test="style:text-properties/@fo:font-size or style:text-properties/@style:font-size-asian or style:text-properties/@style:font-size-complex"> 3003 <xsl:choose> 3004 <xsl:when test="contains(style:text-properties/@fo:font-size,'%') or contains(style:text-properties/@style:font-size-asian,'%')"> 3005 <xsl:attribute name="字:相对字号"><xsl:choose><xsl:when test="style:text-properties/@fo:font-size"><xsl:value-of select="substring-before(style:text-properties/@fo:font-size,'%')"/></xsl:when><xsl:when test="style:text-properties/@style:font-size-asian"><xsl:value-of select="substring-before(style:text-properties/@style:font-size-asian,'%')"/></xsl:when></xsl:choose></xsl:attribute> 3006 </xsl:when> 3007 <xsl:otherwise> 3008 <xsl:attribute name="字:字号"><xsl:choose><xsl:when test="style:text-properties/@fo:font-size"><xsl:value-of select="substring-before(style:text-properties/@fo:font-size,'pt')"/></xsl:when><xsl:when test="style:text-properties/@style:font-size-asian"><xsl:value-of select="substring-before(style:text-properties/@style:font-size-asian,'pt')"/></xsl:when><xsl:when test="style:text-properties/@style:font-size-complex"><xsl:value-of select="substring-before(style:text-properties/@style:font-size-complex,'pt')"/></xsl:when></xsl:choose></xsl:attribute> 3009 </xsl:otherwise> 3010 </xsl:choose> 3011 </xsl:if> 3012 <xsl:if test="style:text-properties/@style:font-name"> 3013 <xsl:variable name="xiwen" select="style:text-properties/@style:font-name"/> 3014 <xsl:attribute name="字:西文字体引用"><xsl:value-of select="translate($xiwen,' ','_')"/></xsl:attribute> 3015 </xsl:if> 3016 <xsl:if test="style:text-properties/@style:font-name-asian"> 3017 <xsl:attribute name="字:中文字体引用"><xsl:value-of select="style:text-properties/@style:font-name-asian"/></xsl:attribute> 3018 </xsl:if> 3019 <xsl:if test="style:text-properties/@fo:color"> 3020 <xsl:attribute name="字:颜色"><xsl:value-of select="style:text-properties/@fo:color"/></xsl:attribute> 3021 </xsl:if> 3022 </xsl:element> 3023 <xsl:if test="style:text-properties/@fo:background-color and not(style:text-properties/@style:text-background-color='transparent')"> 3024 <xsl:element name="字:填充"> 3025 <xsl:attribute name="uof:locID">t0093</xsl:attribute> 3026 <xsl:element name="图:图案"> 3027 <xsl:attribute name="uof:locID">g0036</xsl:attribute> 3028 <xsl:attribute name="uof:attrList">类型 图形引用 前景色 背景色</xsl:attribute> 3029 <xsl:if test="style:text-properties/@fo:background-color"> 3030 <xsl:attribute name="图:前景色"><xsl:choose><xsl:when test="style:text-properties/@fo:background-color='transparent'">auto</xsl:when><xsl:otherwise><xsl:value-of select="style:text-properties/@fo:background-color"/></xsl:otherwise></xsl:choose></xsl:attribute> 3031 </xsl:if> 3032 </xsl:element> 3033 </xsl:element> 3034 </xsl:if> 3035 <xsl:if test="style:text-properties/@fo:font-weight or style:text-properties/@style:font-weight-asian"> 3036 <xsl:element name="字:粗体"> 3037 <xsl:attribute name="uof:locID">t0089</xsl:attribute> 3038 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3039 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:text-properties/@style:font-weight-asian='bold' or style:text-properties/@fo:font-weight='bold'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 3040 </xsl:element> 3041 </xsl:if> 3042 <xsl:if test="style:text-properties/@fo:font-style or style:text-properties/@style:font-style-asian"> 3043 <xsl:element name="字:斜体"> 3044 <xsl:attribute name="uof:locID">t0090</xsl:attribute> 3045 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3046 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:text-properties/@fo:font-style='italic' or style:text-properties/@style:font-style-asian='italic'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute> 3047 </xsl:element> 3048 </xsl:if> 3049 <xsl:if test="style:text-properties/@fo:background-color|style:text-properties/@style:text-background-color"> 3050 <xsl:element name="字:突出显示"> 3051 <xsl:attribute name="字:颜色"><xsl:choose><xsl:when test="style:text-properties/@fo:background-color='transparent' or style:text-properties/@style:text-background-color='transparent'">auto</xsl:when><xsl:otherwise><xsl:value-of select="style:text-properties/@fo:background-color|style:text-properties/@style:text-background-color"/></xsl:otherwise></xsl:choose></xsl:attribute> 3052 <xsl:attribute name="uof:locID">t0091</xsl:attribute> 3053 <xsl:attribute name="uof:attrList">颜色</xsl:attribute> 3054 </xsl:element> 3055 </xsl:if> 3056 <xsl:if test="style:text-properties/@style:text-line-through-style"> 3057 <xsl:element name="字:删除线"> 3058 <xsl:attribute name="uof:locID">t0094</xsl:attribute> 3059 <xsl:attribute name="uof:attrList">类型</xsl:attribute> 3060 <xsl:attribute name="字:类型"><xsl:call-template name="uof:删除线类型"><xsl:with-param name="lineType" select="style:text-properties/@style:text-line-through-style"/></xsl:call-template></xsl:attribute> 3061 </xsl:element> 3062 </xsl:if> 3063 <xsl:if test="style:text-properties/@style:text-underline-style"> 3064 <xsl:element name="字:下划线"> 3065 <xsl:attribute name="uof:locID">t0095</xsl:attribute> 3066 <xsl:attribute name="uof:attrList">类型 颜色 字下划线</xsl:attribute> 3067 <xsl:attribute name="字:类型"><xsl:call-template name="uof:线型类型"/></xsl:attribute> 3068 <xsl:if test="style:text-properties/@style:text-underline-color"> 3069 <xsl:attribute name="字:颜色"><xsl:choose><xsl:when test="style:text-properties/@style:text-underline-color='font-color'">auto</xsl:when><xsl:otherwise><xsl:value-of select="style:text-properties/@style:text-underline-color"/></xsl:otherwise></xsl:choose></xsl:attribute> 3070 </xsl:if> 3071 </xsl:element> 3072 </xsl:if> 3073 <xsl:if test="style:text-properties/@fo:text-shadow"> 3074 <xsl:element name="字:阴影"> 3075 <xsl:attribute name="uof:locID">t0100</xsl:attribute> 3076 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3077 <xsl:attribute name="字:值"><xsl:choose><xsl:when test="style:text-properties/@fo:text-shadow='none'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute> 3078 </xsl:element> 3079 </xsl:if> 3080 <xsl:if test="style:text-properties/@style:text-emphasize"> 3081 <xsl:element name="字:着重号"> 3082 <xsl:attribute name="uof:locID">t0096</xsl:attribute> 3083 <xsl:attribute name="uof:attrList">类型 颜色 字着重号</xsl:attribute> 3084 <xsl:attribute name="字:类型"><xsl:call-template name="uof:着重号类型"><xsl:with-param name="te" select="style:text-properties/@style:text-emphasize"/></xsl:call-template></xsl:attribute> 3085 <xsl:if test="style:text-properties/@fo:color"> 3086 <xsl:attribute name="字:颜色"><xsl:value-of select="style:text-properties/@fo:color"/></xsl:attribute> 3087 </xsl:if> 3088 </xsl:element> 3089 </xsl:if> 3090 <xsl:if test="style:text-properties/@text:display"> 3091 <xsl:element name="字:隐藏文字"> 3092 <xsl:attribute name="uof:locID">t0097</xsl:attribute> 3093 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3094 <xsl:attribute name="字:值">true</xsl:attribute> 3095 </xsl:element> 3096 </xsl:if> 3097 <xsl:if test="style:text-properties/@style:text-outline"> 3098 <xsl:element name="字:空心"> 3099 <xsl:attribute name="uof:locID">t0098</xsl:attribute> 3100 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3101 <xsl:attribute name="字:值"><xsl:value-of select="style:text-properties/@style:text-outline"/></xsl:attribute> 3102 </xsl:element> 3103 </xsl:if> 3104 <xsl:if test="style:text-properties/@style:font-relief"> 3105 <xsl:element name="字:浮雕"> 3106 <xsl:attribute name="uof:locID">t0099</xsl:attribute> 3107 <xsl:attribute name="uof:attrList">类型</xsl:attribute> 3108 <xsl:attribute name="字:类型"><xsl:choose><xsl:when test="style:text-properties/@style:font-relief='embossed'">emboss</xsl:when><xsl:when test="style:text-properties/@style:font-relief='engraved'">engrave</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 3109 </xsl:element> 3110 </xsl:if> 3111 <xsl:if test="style:text-properties/@fo:text-transform or style:text-properties/@fo:font-variant"> 3112 <xsl:element name="字:醒目字体"> 3113 <xsl:attribute name="uof:locID">t0101</xsl:attribute> 3114 <xsl:attribute name="uof:attrList">类型</xsl:attribute> 3115 <xsl:attribute name="字:类型"><xsl:choose><xsl:when test="style:text-properties/@fo:text-transform='uppercase'">uppercase</xsl:when><xsl:when test="style:text-properties/@fo:text-transform='lowercase'">lowercase</xsl:when><xsl:when test="style:text-properties/@fo:text-transform='capitalize'">capital</xsl:when><xsl:when test="style:text-properties/@fo:font-variant='small-caps'">small-caps</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 3116 </xsl:element> 3117 </xsl:if> 3118 <xsl:if test="style:text-properties/@style:text-position"> 3119 <xsl:element name="字:位置"> 3120 <xsl:attribute name="uof:locID">t0102</xsl:attribute> 3121 <xsl:variable name="aa"> 3122 <xsl:value-of select="style:text-properties/@style:text-position"/> 3123 </xsl:variable> 3124 <xsl:choose> 3125 <xsl:when test="contains($aa,'sub')"> 3126 <xsl:value-of select="substring-before($aa,' ')"/> 3127 </xsl:when> 3128 <xsl:when test="contains($aa,'super')"> 3129 <xsl:value-of select="substring-before($aa,' ')"/> 3130 </xsl:when> 3131 <xsl:otherwise> 3132 <xsl:value-of select="translate($aa,'%','')"/> 3133 </xsl:otherwise> 3134 </xsl:choose> 3135 </xsl:element> 3136 </xsl:if> 3137 <xsl:if test="style:text-properties/@style:text-scale"> 3138 <xsl:element name="字:缩放"> 3139 <xsl:attribute name="uof:locID">t0103</xsl:attribute> 3140 <xsl:variable name="scale" select="style:text-properties/@style:text-scale"/> 3141 <xsl:choose> 3142 <xsl:when test="contains($scale,'%')"> 3143 <xsl:value-of select="substring-before($scale,'%')"/> 3144 </xsl:when> 3145 <xsl:otherwise> 3146 <xsl:value-of select="style:text-properties/@style:text-scale"/> 3147 </xsl:otherwise> 3148 </xsl:choose> 3149 </xsl:element> 3150 </xsl:if> 3151 <xsl:if test="style:text-properties/@fo:letter-spacing"> 3152 <xsl:element name="字:字符间距"> 3153 <xsl:attribute name="uof:locID">t0104</xsl:attribute> 3154 <xsl:value-of select="substring-before(style:text-properties/@fo:letter-spacing,$uofUnit)"/> 3155 </xsl:element> 3156 </xsl:if> 3157 <xsl:if test="style:text-properties/@style:letter-kerning"> 3158 <xsl:element name="字:调整字间距"> 3159 <xsl:variable name="tt" select="style:text-properties/@style:letter-kerning"/> 3160 <xsl:attribute name="uof:locID">t0105</xsl:attribute> 3161 <xsl:choose> 3162 <xsl:when test="$tt='true'">1</xsl:when> 3163 <xsl:otherwise>0</xsl:otherwise> 3164 </xsl:choose> 3165 </xsl:element> 3166 </xsl:if> 3167 <xsl:element name="字:字符对齐网格"> 3168 <xsl:attribute name="字:值">false</xsl:attribute> 3169 <xsl:attribute name="uof:locID">t0106</xsl:attribute> 3170 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3171 </xsl:element> 3172 </xsl:template> 3173 <xsl:template name="uof:线型类型"> 3174 <xsl:variable name="spath" select="style:text-properties/@style:text-underline-style"/> 3175 <xsl:variable name="wpath" select="style:text-properties/@style:text-underline-width"/> 3176 <xsl:variable name="tpath" select="style:text-properties/@style:text-underline-type"/> 3177 <xsl:choose> 3178 <xsl:when test="$spath='solid' and not($tpath='double' ) and $wpath='auto' ">single</xsl:when> 3179 <xsl:when test="$spath='solid' and $tpath='double' and $wpath='auto' ">double</xsl:when> 3180 <xsl:when test="$spath='solid' and not($tpath='double' )and $wpath='bold' ">thick</xsl:when> 3181 <xsl:when test="$spath='dotted' and not($tpath='double' )and $wpath='auto' ">dotted</xsl:when> 3182 <xsl:when test="$spath='dotted' and not($tpath='double' )and $wpath='bold' ">dotted-heavy</xsl:when> 3183 <xsl:when test="$spath='dash' and not($tpath='double' )and $wpath='auto' ">dash</xsl:when> 3184 <xsl:when test="$spath='dash' and not($tpath='double' )and $wpath='bold' ">dashed-heavy</xsl:when> 3185 <xsl:when test="$spath='long-dash' and not($tpath='double' )and $wpath='auto' ">dash-long</xsl:when> 3186 <xsl:when test="$spath='long-dash' and not($tpath='double' )and $wpath='bold' ">dash-long-heavy</xsl:when> 3187 <xsl:when test="$spath='dot-dash' and not($tpath='double' )and $wpath='auto' ">dot-dash</xsl:when> 3188 <xsl:when test="$spath='dot-dash' and not($tpath='double' )and $wpath='bold' ">dash-dot-heavy</xsl:when> 3189 <xsl:when test="$spath='dot-dot-dash' and not($tpath='double' )and $wpath='auto' ">dot-dot-dash</xsl:when> 3190 <xsl:when test="$spath='dot-dot-dash' and not($tpath='double' )and $wpath='bold' ">dash-dot-dot-heavy</xsl:when> 3191 <xsl:when test="$spath='wave' and not($tpath='double' )and $wpath='auto' ">wave</xsl:when> 3192 <xsl:when test="$spath='wave' and not($tpath='double' )and $wpath='bold' ">wavy-heavy</xsl:when> 3193 <xsl:when test="$spath='wave' and $tpath='double' and $wpath='auto' ">wavy-double</xsl:when> 3194 <xsl:otherwise>none</xsl:otherwise> 3195 </xsl:choose> 3196 </xsl:template> 3197 <xsl:template name="uof:删除线类型"> 3198 <xsl:param name="lineType"/> 3199 <xsl:variable name="tw" select="style:text-properties/@style:text-line-through-width"/> 3200 <xsl:variable name="tt" select="style:text-properties/@style:text-line-through-text"/> 3201 <xsl:variable name="ttp" select="style:text-properties/@style:text-line-through-type"/> 3202 <xsl:choose> 3203 <xsl:when test="$lineType='solid'and $ttp='double'">double</xsl:when> 3204 <xsl:when test="$lineType='solid'and $tw='bold'">bold</xsl:when> 3205 <xsl:when test="$lineType='solid'and $tt='X'">xl</xsl:when> 3206 <xsl:when test="$lineType='solid'and $tt='/'">/l</xsl:when> 3207 <xsl:otherwise> 3208 <xsl:if test="not($lineType='none') ">single</xsl:if> 3209 </xsl:otherwise> 3210 </xsl:choose> 3211 </xsl:template> 3212 <xsl:template name="uof:着重号类型"> 3213 <xsl:param name="te"/> 3214 <xsl:choose> 3215 <xsl:when test="$te='disc above' ">disc above</xsl:when> 3216 <xsl:when test="$te='circle above' ">circle above</xsl:when> 3217 <xsl:when test="$te='dot above' ">dot above</xsl:when> 3218 <xsl:when test="$te='accent above' ">accent above</xsl:when> 3219 <xsl:when test="$te='dot below' ">dot</xsl:when> 3220 <xsl:when test="$te='circle below' ">circle below</xsl:when> 3221 <xsl:when test="$te='disc below' ">disc below</xsl:when> 3222 <xsl:when test="$te='accent below' ">accent below</xsl:when> 3223 <xsl:otherwise>none</xsl:otherwise> 3224 </xsl:choose> 3225 </xsl:template> 3226 <xsl:template name="uof:边框"> 3227 <xsl:choose> 3228 <xsl:when test="@fo:border"> 3229 <xsl:call-template name="uof:左边框"> 3230 <xsl:with-param name="border" select="@fo:border"/> 3231 </xsl:call-template> 3232 <xsl:call-template name="uof:上边框"> 3233 <xsl:with-param name="border" select="@fo:border"/> 3234 </xsl:call-template> 3235 <xsl:call-template name="uof:右边框"> 3236 <xsl:with-param name="border" select="@fo:border"/> 3237 </xsl:call-template> 3238 <xsl:call-template name="uof:下边框"> 3239 <xsl:with-param name="border" select="@fo:border"/> 3240 </xsl:call-template> 3241 </xsl:when> 3242 <xsl:otherwise> 3243 <xsl:if test="@fo:border-left or contains(substring-before(substring-after(@style:shadow,' '),' '),'-')"> 3244 <xsl:call-template name="uof:左边框"> 3245 <xsl:with-param name="border" select="@fo:border-left"/> 3246 </xsl:call-template> 3247 </xsl:if> 3248 <xsl:if test="@fo:border-top or contains(substring-after(substring-after(@style:shadow,' '),' '),'-')"> 3249 <xsl:call-template name="uof:上边框"> 3250 <xsl:with-param name="border" select="@fo:border-top"/> 3251 </xsl:call-template> 3252 </xsl:if> 3253 <xsl:if test="@fo:border-right or substring-before(substring-before(substring-after(@style:shadow,' '),' '),$ooUnit) >0 or contains(substring-before(substring-after(@style:shadow,' '),' '),'+')"> 3254 <xsl:call-template name="uof:右边框"> 3255 <xsl:with-param name="border" select="@fo:border-right"/> 3256 </xsl:call-template> 3257 </xsl:if> 3258 <xsl:if test="@fo:border-bottom or substring-before(substring-after(substring-after(@style:shadow,' '),' '),$ooUnit) >0 or contains(substring-after(substring-after(@style:shadow,' '),' '),'+')"> 3259 <xsl:call-template name="uof:下边框"> 3260 <xsl:with-param name="border" select="@fo:border-bottom"/> 3261 </xsl:call-template> 3262 </xsl:if> 3263 </xsl:otherwise> 3264 </xsl:choose> 3265 </xsl:template> 3266 <xsl:template name="uof:左边框"> 3267 <xsl:param name="border"/> 3268 <xsl:element name="uof:左"> 3269 <xsl:attribute name="uof:locID">u0057</xsl:attribute> 3270 <xsl:attribute name="uof:attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> 3271 <xsl:attribute name="uof:类型"><xsl:choose><xsl:when test="$border!='none'"><xsl:choose><xsl:when test="substring-before(substring-after($border,' '),' ')='solid'">single</xsl:when><xsl:when test="substring-before(substring-after($border,' '),' ')='double'">double</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 3272 <xsl:if test="$border!='none'"> 3273 <xsl:attribute name="uof:宽度"><xsl:value-of select="substring-before(substring-before($border,' '),substring($ooUnit,1,2))"/></xsl:attribute> 3274 <xsl:attribute name="uof:颜色"><xsl:value-of select="substring-after(substring-after($border,' '),' ')"/></xsl:attribute> 3275 <xsl:if test="@fo:padding or @fo:padding-left"> 3276 <xsl:attribute name="uof:边距"><xsl:choose><xsl:when test="@fo:padding-left"><xsl:value-of select="substring-before(@fo:padding-left,$ooUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="substring-before(@fo:padding,$ooUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute> 3277 </xsl:if> 3278 </xsl:if> 3279 <xsl:if test="contains(substring-before(substring-after(@style:shadow,' '),' '),'-')"> 3280 <xsl:attribute name="uof:阴影">true</xsl:attribute> 3281 </xsl:if> 3282 </xsl:element> 3283 </xsl:template> 3284 <xsl:template name="uof:上边框"> 3285 <xsl:param name="border"/> 3286 <xsl:element name="uof:上"> 3287 <xsl:attribute name="uof:locID">u0058</xsl:attribute> 3288 <xsl:attribute name="uof:attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> 3289 <xsl:attribute name="uof:类型"><xsl:choose><xsl:when test="$border!='none'"><xsl:choose><xsl:when test="substring-before(substring-after($border,' '),' ')='solid'">single</xsl:when><xsl:when test="substring-before(substring-after($border,' '),' ')='double'">double</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 3290 <xsl:if test="$border!='none'"> 3291 <xsl:attribute name="uof:宽度"><xsl:value-of select="substring-before(substring-before($border,' '),substring($ooUnit,1,2))"/></xsl:attribute> 3292 <xsl:attribute name="uof:颜色"><xsl:value-of select="substring-after(substring-after($border,' '),' ')"/></xsl:attribute> 3293 <xsl:if test="@fo:padding or @fo:padding-top"> 3294 <xsl:attribute name="uof:边距"><xsl:choose><xsl:when test="@fo:padding-top"><xsl:value-of select="substring-before(@fo:padding-top,$ooUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="substring-before(@fo:padding,$ooUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute> 3295 </xsl:if> 3296 </xsl:if> 3297 <xsl:if test="contains(substring-after(substring-after(@style:shadow,' '),' '),'-')"> 3298 <xsl:attribute name="uof:阴影">true</xsl:attribute> 3299 </xsl:if> 3300 </xsl:element> 3301 </xsl:template> 3302 <xsl:template name="uof:右边框"> 3303 <xsl:param name="border"/> 3304 <xsl:element name="uof:右"> 3305 <xsl:attribute name="uof:locID">u0059</xsl:attribute> 3306 <xsl:attribute name="uof:attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> 3307 <xsl:attribute name="uof:类型"><xsl:choose><xsl:when test="$border!='none'"><xsl:choose><xsl:when test="substring-before(substring-after($border,' '),' ')='solid'">single</xsl:when><xsl:when test="substring-before(substring-after($border,' '),' ')='double'">double</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 3308 <xsl:if test="$border!='none'"> 3309 <xsl:attribute name="uof:宽度"><xsl:value-of select="substring-before(substring-before($border,' '),substring($ooUnit,1,2))"/></xsl:attribute> 3310 <xsl:attribute name="uof:颜色"><xsl:value-of select="substring-after(substring-after($border,' '),' ')"/></xsl:attribute> 3311 <xsl:if test="@fo:padding or @fo:padding-right"> 3312 <xsl:attribute name="uof:边距"><xsl:choose><xsl:when test="@fo:padding-right"><xsl:value-of select="substring-before(@fo:padding-right,$ooUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="substring-before(@fo:padding,$ooUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute> 3313 </xsl:if> 3314 </xsl:if> 3315 <xsl:if test="substring-before(substring-before(substring-after(@style:shadow,' '),' '),$ooUnit) >0 or contains(substring-before(substring-after(@style:shadow,' '),' '),'+')"> 3316 <xsl:attribute name="uof:阴影">true</xsl:attribute> 3317 </xsl:if> 3318 </xsl:element> 3319 </xsl:template> 3320 <xsl:template name="uof:下边框"> 3321 <xsl:param name="border"/> 3322 <xsl:element name="uof:下"> 3323 <xsl:attribute name="uof:locID">u0060</xsl:attribute> 3324 <xsl:attribute name="uof:attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> 3325 <xsl:attribute name="uof:类型"><xsl:choose><xsl:when test="$border!='none'"><xsl:choose><xsl:when test="substring-before(substring-after($border,' '),' ')='solid'">single</xsl:when><xsl:when test="substring-before(substring-after($border,' '),' ')='double'">double</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute> 3326 <xsl:if test="$border!='none'"> 3327 <xsl:attribute name="uof:宽度"><xsl:value-of select="substring-before(substring-before($border,' '),substring($ooUnit,1,2))"/></xsl:attribute> 3328 <xsl:attribute name="uof:颜色"><xsl:value-of select="substring-after(substring-after($border,' '),' ')"/></xsl:attribute> 3329 <xsl:if test="@fo:padding or @fo:padding-bottom"> 3330 <xsl:attribute name="uof:边距"><xsl:choose><xsl:when test="@fo:padding-bottom"><xsl:value-of select="substring-before(@fo:padding-bottom,$ooUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="substring-before(@fo:padding,$ooUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute> 3331 </xsl:if> 3332 </xsl:if> 3333 <xsl:if test="substring-before(substring-after(substring-after(@style:shadow,' '),' '),$ooUnit) >0 or contains(substring-after(substring-after(@style:shadow,' '),' '),'+')"> 3334 <xsl:attribute name="uof:阴影">true</xsl:attribute> 3335 </xsl:if> 3336 </xsl:element> 3337 </xsl:template> 3338 <xsl:key name="geshi" match="//office:document/office:automatic-styles/number:date-style | //office:document/office:automatic-styles/number:time-style" use="@style:name"/> 3339 <xsl:template name="inline-text"> 3340 <xsl:param name="pStyleName"/> 3341 <xsl:param name="bText"/> 3342 <xsl:apply-templates select="text()|textspan|jiaozhu|weizhu|office:annotation|text:sequence|text:date|text:time|text:page-number|text:page-count|text:subject|text:title|text:initial-creator|text:author-name|text:author-initials|text:file-name|text:change-start|text:change-end|text:change"> 3343 <xsl:with-param name="pStyleName" select="$pStyleName"/> 3344 <xsl:with-param name="bText" select="$bText"/> 3345 </xsl:apply-templates> 3346 </xsl:template> 3347 <xsl:template match="text:sequence"> 3348 <xsl:param name="tStyle"/> 3349 <xsl:if test="@text:name='Illustration' or @text:name='Text' or @text:name='Drawing' or @text:name='Table'"> 3350 <xsl:element name="字:域开始"> 3351 <xsl:attribute name="字:类型"><xsl:value-of select="'seq'"/></xsl:attribute> 3352 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3353 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3354 </xsl:element> 3355 <xsl:element name="字:域代码"> 3356 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3357 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3358 <字:句 uof:locID="t0085"> 3359 <xsl:if test="$tStyle!=''"> 3360 <字:句属性 字:式样引用="{$tStyle}" uof:locID="t0086" uof:attrList="式样引用"/> 3361 </xsl:if> 3362 <xsl:variable name="fmt"> 3363 <xsl:call-template name="oo数字格式域开关"> 3364 <xsl:with-param name="oo_format" select="@style:num-format"/> 3365 </xsl:call-template> 3366 </xsl:variable> 3367 <字:文本串> 3368 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3369 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3370 <xsl:value-of select="concat('SEQ ',@text:name,' \* ',$fmt,' \f ',@text:formula)"/> 3371 </字:文本串> 3372 </字:句> 3373 </字:段落> 3374 </xsl:element> 3375 <字:句 uof:locID="t0085"> 3376 <字:文本串> 3377 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3378 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3379 <xsl:value-of select="string(.)"/> 3380 </字:文本串> 3381 </字:句> 3382 <xsl:element name="字:域结束"> 3383 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3384 </xsl:element> 3385 </xsl:if> 3386 </xsl:template> 3387 <xsl:template match="text:time"> 3388 <xsl:element name="字:域开始"> 3389 <xsl:attribute name="字:类型"><xsl:value-of select="'time'"/></xsl:attribute> 3390 <xsl:choose> 3391 <xsl:when test="text:fixed='1'"> 3392 <xsl:attribute name="字:锁定">true</xsl:attribute> 3393 </xsl:when> 3394 <xsl:otherwise> 3395 <xsl:attribute name="字:锁定">false</xsl:attribute> 3396 </xsl:otherwise> 3397 </xsl:choose> 3398 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3399 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3400 </xsl:element> 3401 <xsl:element name="字:域代码"> 3402 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3403 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3404 <字:句 uof:locID="t0085"> 3405 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3406 <xsl:variable name="timefmt"> 3407 <xsl:variable name="aa" select="@style:data-style-name"/> 3408 <xsl:for-each select="key('geshi',$aa)/number:hours | key('geshi',$aa)/number:minutes | key('geshi',$aa)/number:am-pm | key('geshi',$aa)/number:seconds | key('geshi',$aa)/number:text"> 3409 <xsl:choose> 3410 <xsl:when test="@number:style='long' "> 3411 <xsl:if test="self::node( )[name(.)='number:hours']">HH</xsl:if> 3412 <xsl:if test="self::node( )[name(.)='number:minutes']">MM</xsl:if> 3413 <xsl:if test="self::node( )[name(.)='number:seconds']">SS</xsl:if> 3414 </xsl:when> 3415 <xsl:otherwise> 3416 <xsl:if test="self::node( )[name(.)='number:text']"> 3417 <xsl:value-of select="."/> 3418 </xsl:if> 3419 <xsl:if test="self::node( )[name(.)='number:hours']">H</xsl:if> 3420 <xsl:if test="self::node( )[name(.)='number:minutes']">M</xsl:if> 3421 <xsl:if test="self::node( )[name(.)='number:seconds']">S</xsl:if> 3422 <xsl:if test="self::node( )[name(.)='number:am-pm']">am/pm</xsl:if> 3423 </xsl:otherwise> 3424 </xsl:choose> 3425 </xsl:for-each> 3426 </xsl:variable> 3427 <xsl:variable name="quote">"</xsl:variable> 3428 <字:文本串> 3429 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3430 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3431 <xsl:value-of select="concat('TIME \@ ',$quote,$timefmt,$quote)"/> 3432 </字:文本串> 3433 </字:句> 3434 </字:段落> 3435 </xsl:element> 3436 <字:句 uof:locID="t0085"> 3437 <字:文本串> 3438 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3439 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3440 <xsl:value-of select="string(.)"/> 3441 </字:文本串> 3442 </字:句> 3443 <xsl:element name="字:域结束"> 3444 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3445 </xsl:element> 3446 </xsl:template> 3447 <xsl:template match="text:date"> 3448 <xsl:element name="字:域开始"> 3449 <xsl:attribute name="字:类型"><xsl:value-of select="'date'"/></xsl:attribute> 3450 <xsl:choose> 3451 <xsl:when test="text:fixed='1'"> 3452 <xsl:attribute name="字:锁定">true</xsl:attribute> 3453 </xsl:when> 3454 <xsl:otherwise> 3455 <xsl:attribute name="字:锁定">false</xsl:attribute> 3456 </xsl:otherwise> 3457 </xsl:choose> 3458 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3459 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3460 </xsl:element> 3461 <xsl:element name="字:域代码"> 3462 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3463 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3464 <字:句 uof:locID="t0085"> 3465 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3466 <xsl:variable name="datefmt"> 3467 <xsl:variable name="bb" select="@style:data-style-name"/> 3468 <xsl:for-each select="key('geshi',$bb)/number:year | key('geshi',$bb)/number:month | key('geshi',$bb)/number:day | key('geshi',$bb)/number:hours | key('geshi',$bb)/number:minutes | key('geshi',$bb)/number:seconds | key('geshi',$bb)/number:quarter | key('geshi',$bb)/number:day-of-week | key('geshi',$bb)/number:week-of-year | key('geshi',$bb)/number:text | key('geshi',$bb)/number:am-pm"> 3469 <xsl:choose> 3470 <xsl:when test="@number:style='long' "> 3471 <xsl:if test="self::node( )[name(.)='number:year']">yyyy</xsl:if> 3472 <xsl:if test="self::node( )[name(.)='number:month']">MM</xsl:if> 3473 <xsl:if test="self::node( )[name(.)='number:day']">dd</xsl:if> 3474 <xsl:if test="self::node( )[name(.)='number:hours']">hh</xsl:if> 3475 <xsl:if test="self::node( )[name(.)='number:minutes']">mm</xsl:if> 3476 <xsl:if test="self::node( )[name(.)='number:seconds']">ss</xsl:if> 3477 <xsl:if test="self::node( )[name(.)='number:quarter']">第QQ季度</xsl:if> 3478 <xsl:if test="self::node( )[name(.)='number:day-of-week']">星期N</xsl:if> 3479 <xsl:if test="self::node( )[name(.)='number:week-of-year']">WW</xsl:if> 3480 </xsl:when> 3481 <xsl:otherwise> 3482 <xsl:if test="self::node( )[name(.)='number:text']"> 3483 <xsl:value-of select="."/> 3484 </xsl:if> 3485 <xsl:if test="self::node( )[name(.)='number:year']">yy</xsl:if> 3486 <xsl:if test="self::node( )[name(.)='number:month']">M</xsl:if> 3487 <xsl:if test="self::node( )[name(.)='number:day']">d</xsl:if> 3488 <xsl:if test="self::node( )[name(.)='number:hours']">h</xsl:if> 3489 <xsl:if test="self::node( )[name(.)='number:minutes']">m</xsl:if> 3490 <xsl:if test="self::node( )[name(.)='number:seconds']">s</xsl:if> 3491 <xsl:if test="self::node( )[name(.)='number:quarter']">Q季</xsl:if> 3492 <xsl:if test="self::node( )[name(.)='number:day-of-week']">星期N</xsl:if> 3493 <xsl:if test="self::node( )[name(.)='number:week-of-year']">WW</xsl:if> 3494 <xsl:if test="self::node( )[name(.)='number:am-pm']">am/pm</xsl:if> 3495 </xsl:otherwise> 3496 </xsl:choose> 3497 </xsl:for-each> 3498 </xsl:variable> 3499 <xsl:variable name="quote">"</xsl:variable> 3500 <字:文本串> 3501 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3502 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3503 <xsl:value-of select="concat('CREATEDATE \@ ',$quote,$datefmt,$quote)"/> 3504 </字:文本串> 3505 </字:句> 3506 </字:段落> 3507 </xsl:element> 3508 <字:句 uof:locID="t0085"> 3509 <字:文本串> 3510 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3511 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3512 <xsl:value-of select="string(.)"/> 3513 </字:文本串> 3514 </字:句> 3515 <xsl:element name="字:域结束"> 3516 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3517 </xsl:element> 3518 </xsl:template> 3519 <xsl:template name="oo数字格式域开关"> 3520 <xsl:param name="oo_format"/> 3521 <xsl:choose> 3522 <xsl:when test="$oo_format='1'">Arabic</xsl:when> 3523 <xsl:when test="$oo_format='I'">ROMAN</xsl:when> 3524 <xsl:when test="$oo_format='i'">roman</xsl:when> 3525 <xsl:when test="$oo_format='A'">ALPHABETIC</xsl:when> 3526 <xsl:when test="$oo_format='a'">alphabetic</xsl:when> 3527 <xsl:when test="$oo_format='1, 2, 3, ...'">GB1</xsl:when> 3528 <xsl:when test="$oo_format='①, ②, ③, ...'">GB3</xsl:when> 3529 <xsl:when test="$oo_format='一, 二, 三, ...'">CHINESENUM3</xsl:when> 3530 <xsl:when test="$oo_format='壹, 贰, 叁, ...'">CHINESENUM2</xsl:when> 3531 <xsl:when test="$oo_format='甲, 乙, 丙, ...'">ZODIAC1</xsl:when> 3532 <xsl:when test="$oo_format='子, 丑, 寅, ...'">ZODIAC2</xsl:when> 3533 <xsl:otherwise>Arabic</xsl:otherwise> 3534 </xsl:choose> 3535 </xsl:template> 3536 <xsl:template match="text:page-number"> 3537 <xsl:element name="字:域开始"> 3538 <xsl:attribute name="字:类型"><xsl:value-of select="'page'"/></xsl:attribute> 3539 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3540 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3541 <xsl:choose> 3542 <xsl:when test="text:fixed='1'"> 3543 <xsl:attribute name="字:锁定">true</xsl:attribute> 3544 </xsl:when> 3545 <xsl:otherwise> 3546 <xsl:attribute name="字:锁定">false</xsl:attribute> 3547 </xsl:otherwise> 3548 </xsl:choose> 3549 </xsl:element> 3550 <xsl:element name="字:域代码"> 3551 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3552 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3553 <字:句 uof:locID="t0085"> 3554 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3555 <xsl:variable name="fmt"> 3556 <xsl:call-template name="oo数字格式域开关"> 3557 <xsl:with-param name="oo_format" select="@style:num-format"/> 3558 </xsl:call-template> 3559 </xsl:variable> 3560 <字:文本串> 3561 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3562 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3563 <xsl:choose> 3564 <xsl:when test="@style:num-format"> 3565 <xsl:value-of select="concat('PAGE \* ',$fmt)"/> 3566 </xsl:when> 3567 <xsl:otherwise>PAGE</xsl:otherwise> 3568 </xsl:choose> 3569 </字:文本串> 3570 </字:句> 3571 </字:段落> 3572 </xsl:element> 3573 <字:句 uof:locID="t0085"> 3574 <字:文本串> 3575 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3576 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3577 <xsl:value-of select="string(.)"/> 3578 </字:文本串> 3579 </字:句> 3580 <xsl:element name="字:域结束"> 3581 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3582 </xsl:element> 3583 </xsl:template> 3584 <xsl:template match="text:page-count"> 3585 <xsl:element name="字:域开始"> 3586 <xsl:attribute name="字:类型"><xsl:value-of select="'numpages'"/></xsl:attribute> 3587 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3588 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3589 <xsl:choose> 3590 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3591 <xsl:attribute name="字:锁定">true</xsl:attribute> 3592 </xsl:when> 3593 <xsl:otherwise> 3594 <xsl:attribute name="字:锁定">false</xsl:attribute> 3595 </xsl:otherwise> 3596 </xsl:choose> 3597 </xsl:element> 3598 <xsl:element name="字:域代码"> 3599 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3600 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3601 <字:句 uof:locID="t0085"> 3602 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3603 <xsl:variable name="fmt"> 3604 <xsl:call-template name="oo数字格式域开关"> 3605 <xsl:with-param name="oo_format" select="@style:num-format"/> 3606 </xsl:call-template> 3607 </xsl:variable> 3608 <字:文本串> 3609 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3610 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3611 <xsl:choose> 3612 <xsl:when test="@style:num-format"> 3613 <xsl:value-of select="concat('NumPages \* ',$fmt,' \* Upper')"/> 3614 </xsl:when> 3615 <xsl:otherwise>NumPages</xsl:otherwise> 3616 </xsl:choose> 3617 </字:文本串> 3618 </字:句> 3619 </字:段落> 3620 </xsl:element> 3621 <字:句 uof:locID="t0085"> 3622 <字:文本串> 3623 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3624 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3625 <xsl:value-of select="string(.)"/> 3626 </字:文本串> 3627 </字:句> 3628 <xsl:element name="字:域结束"> 3629 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3630 </xsl:element> 3631 </xsl:template> 3632 <xsl:template match="text:initial-creator"> 3633 <xsl:element name="字:域开始"> 3634 <xsl:attribute name="字:类型"><xsl:value-of select="'author'"/></xsl:attribute> 3635 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3636 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3637 <xsl:choose> 3638 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3639 <xsl:attribute name="字:锁定">true</xsl:attribute> 3640 </xsl:when> 3641 <xsl:otherwise> 3642 <xsl:attribute name="字:锁定">false</xsl:attribute> 3643 </xsl:otherwise> 3644 </xsl:choose> 3645 </xsl:element> 3646 <xsl:element name="字:域代码"> 3647 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3648 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3649 <字:句 uof:locID="t0085"> 3650 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3651 <字:文本串> 3652 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3653 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3654 <!--xsl:value-of select="concat('AUTHOR \* ','Caps',' \* MERGEFORMAT')"/--> 3655 <xsl:value-of select="'AUTHOR'"/> 3656 </字:文本串> 3657 </字:句> 3658 </字:段落> 3659 </xsl:element> 3660 <字:句 uof:locID="t0085"> 3661 <字:文本串> 3662 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3663 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3664 <xsl:value-of select="string(.)"/> 3665 </字:文本串> 3666 </字:句> 3667 <xsl:element name="字:域结束"> 3668 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3669 </xsl:element> 3670 </xsl:template> 3671 <xsl:template match="text:author-name"> 3672 <xsl:param name="tStyle"/> 3673 <xsl:element name="字:域开始"> 3674 <xsl:attribute name="字:类型"><xsl:value-of select="'username'"/></xsl:attribute> 3675 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3676 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3677 <xsl:choose> 3678 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3679 <xsl:attribute name="字:锁定">true</xsl:attribute> 3680 </xsl:when> 3681 <xsl:otherwise> 3682 <xsl:attribute name="字:锁定">false</xsl:attribute> 3683 </xsl:otherwise> 3684 </xsl:choose> 3685 </xsl:element> 3686 <xsl:element name="字:域代码"> 3687 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3688 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3689 <字:句 uof:locID="t0085"> 3690 <xsl:if test="$tStyle!=''"> 3691 <字:句属性 字:式样引用="{$tStyle}" uof:locID="t0086" uof:attrList="式样引用"/> 3692 </xsl:if> 3693 <字:文本串 uof:locID="t0109" uof:attrList="标识符">AUTHOR</字:文本串> 3694 </字:句> 3695 </字:段落> 3696 </xsl:element> 3697 <字:句 uof:locID="t0085"> 3698 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3699 <xsl:value-of select="."/> 3700 </字:文本串> 3701 </字:句> 3702 <xsl:element name="字:域结束"> 3703 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3704 </xsl:element> 3705 </xsl:template> 3706 <xsl:template match="text:author-initials"> 3707 <xsl:param name="tStyle"/> 3708 <xsl:element name="字:域开始"> 3709 <xsl:attribute name="字:类型"><xsl:value-of select="'userinitials'"/></xsl:attribute> 3710 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3711 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3712 <xsl:choose> 3713 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3714 <xsl:attribute name="字:锁定">true</xsl:attribute> 3715 </xsl:when> 3716 <xsl:otherwise> 3717 <xsl:attribute name="字:锁定">false</xsl:attribute> 3718 </xsl:otherwise> 3719 </xsl:choose> 3720 </xsl:element> 3721 <xsl:element name="字:域代码"> 3722 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3723 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3724 <字:句 uof:locID="t0085"> 3725 <xsl:if test="$tStyle!=''"> 3726 <字:句属性 字:式样引用="{$tStyle}" uof:locID="t0086" uof:attrList="式样引用"/> 3727 </xsl:if> 3728 <字:文本串 uof:locID="t0109" uof:attrList="标识符">AUTHOR</字:文本串> 3729 </字:句> 3730 </字:段落> 3731 </xsl:element> 3732 <字:句 uof:locID="t0085"> 3733 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3734 <xsl:value-of select="."/> 3735 </字:文本串> 3736 </字:句> 3737 <xsl:element name="字:域结束"> 3738 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3739 </xsl:element> 3740 </xsl:template> 3741 <xsl:template match="text:title"> 3742 <xsl:element name="字:域开始"> 3743 <xsl:attribute name="字:类型"><xsl:value-of select="'title'"/></xsl:attribute> 3744 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3745 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3746 <xsl:choose> 3747 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3748 <xsl:attribute name="字:锁定">true</xsl:attribute> 3749 </xsl:when> 3750 <xsl:otherwise> 3751 <xsl:attribute name="字:锁定">false</xsl:attribute> 3752 </xsl:otherwise> 3753 </xsl:choose> 3754 </xsl:element> 3755 <xsl:element name="字:域代码"> 3756 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3757 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3758 <字:句 uof:locID="t0085"> 3759 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3760 <xsl:variable name="titlename" select="/office:document/office:meta/dc:title"/> 3761 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3762 <xsl:value-of select="concat('TITLE',' \* Upper')"/> 3763 </字:文本串> 3764 </字:句> 3765 </字:段落> 3766 </xsl:element> 3767 <字:句 uof:locID="t0085"> 3768 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3769 <xsl:value-of select="."/> 3770 </字:文本串> 3771 </字:句> 3772 <xsl:element name="字:域结束"> 3773 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3774 </xsl:element> 3775 </xsl:template> 3776 <xsl:template match="text:subject"> 3777 <xsl:element name="字:域开始"> 3778 <xsl:attribute name="字:类型"><xsl:value-of select="'subject'"/></xsl:attribute> 3779 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3780 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3781 <xsl:choose> 3782 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3783 <xsl:attribute name="字:锁定">true</xsl:attribute> 3784 </xsl:when> 3785 <xsl:otherwise> 3786 <xsl:attribute name="字:锁定">false</xsl:attribute> 3787 </xsl:otherwise> 3788 </xsl:choose> 3789 </xsl:element> 3790 <xsl:element name="字:域代码"> 3791 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3792 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3793 <字:句 uof:locID="t0085"> 3794 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3795 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3796 <xsl:value-of select="concat('SUBJECT \* ','Caps',' \* MERGEFORMAT')"/> 3797 </字:文本串> 3798 </字:句> 3799 </字:段落> 3800 </xsl:element> 3801 <字:句 uof:locID="t0085"> 3802 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3803 <xsl:value-of select="."/> 3804 </字:文本串> 3805 </字:句> 3806 <xsl:element name="字:域结束"> 3807 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3808 </xsl:element> 3809 </xsl:template> 3810 <xsl:template match="text:file-name"> 3811 <xsl:element name="字:域开始"> 3812 <xsl:attribute name="字:类型"><xsl:value-of select="'filename'"/></xsl:attribute> 3813 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3814 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3815 <xsl:choose> 3816 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3817 <xsl:attribute name="字:锁定">true</xsl:attribute> 3818 </xsl:when> 3819 <xsl:otherwise> 3820 <xsl:attribute name="字:锁定">false</xsl:attribute> 3821 </xsl:otherwise> 3822 </xsl:choose> 3823 </xsl:element> 3824 <xsl:element name="字:域代码"> 3825 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3826 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3827 <字:句 uof:locID="t0085"> 3828 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3829 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3830 <!--xsl:value-of select="concat('FILENAME \* ','Caps',' \* MERGEFORMAT')"/--> 3831 <xsl:value-of select="concat('FILENAME',' \p')"/> 3832 </字:文本串> 3833 </字:句> 3834 </字:段落> 3835 </xsl:element> 3836 <字:句 uof:locID="t0085"> 3837 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 3838 <xsl:value-of select="."/> 3839 </字:文本串> 3840 </字:句> 3841 <xsl:element name="字:域结束"> 3842 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3843 </xsl:element> 3844 </xsl:template> 3845 <xsl:template match="text:editing-duration"> 3846 <xsl:element name="字:域开始"> 3847 <xsl:attribute name="字:类型"><xsl:value-of select="'edittime'"/></xsl:attribute> 3848 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3849 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3850 <xsl:choose> 3851 <xsl:when test="text:fixed='1'or text:fixed='true'"> 3852 <xsl:attribute name="字:锁定">true</xsl:attribute> 3853 </xsl:when> 3854 <xsl:otherwise> 3855 <xsl:attribute name="字:锁定">false</xsl:attribute> 3856 </xsl:otherwise> 3857 </xsl:choose> 3858 </xsl:element> 3859 <xsl:element name="字:域代码"> 3860 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3861 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3862 <字:句 uof:locID="t0085"> 3863 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 3864 <xsl:variable name="timefmt"> 3865 <xsl:variable name="aa" select="@style:data-style-name"/> 3866 <xsl:for-each select="key('geshi',$aa)/number:hours | key('geshi',$aa)/number:minutes | key('geshi',$aa)/number:am-pm | key('geshi',$aa)/number:seconds | key('geshi',$aa)/number:text"> 3867 <xsl:choose> 3868 <xsl:when test="@number:style='long' "> 3869 <xsl:if test="self::node( )[name(.)='number:hours']">HH</xsl:if> 3870 <xsl:if test="self::node( )[name(.)='number:minutes']">MM</xsl:if> 3871 <xsl:if test="self::node( )[name(.)='number:seconds']">SS</xsl:if> 3872 </xsl:when> 3873 <xsl:otherwise> 3874 <xsl:if test="self::node( )[name(.)='number:text']"> 3875 <xsl:value-of select="."/> 3876 </xsl:if> 3877 <xsl:if test="self::node( )[name(.)='number:hours']">H</xsl:if> 3878 <xsl:if test="self::node( )[name(.)='number:minutes']">M</xsl:if> 3879 <xsl:if test="self::node( )[name(.)='number:seconds']">S</xsl:if> 3880 <xsl:if test="self::node( )[name(.)='number:am-pm']">am/pm</xsl:if> 3881 </xsl:otherwise> 3882 </xsl:choose> 3883 </xsl:for-each> 3884 </xsl:variable> 3885 <xsl:variable name="quote">"</xsl:variable> 3886 <字:文本串> 3887 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3888 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3889 <xsl:value-of select="concat('EDITTIME \@ ',$quote,$timefmt,$quote,' \* MERGEFORMAT ')"/> 3890 </字:文本串> 3891 </字:句> 3892 </字:段落> 3893 </xsl:element> 3894 <字:句 uof:locID="t0085"> 3895 <字:文本串> 3896 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3897 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3898 <xsl:value-of select="."/> 3899 </字:文本串> 3900 </字:句> 3901 <xsl:element name="字:域结束"> 3902 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 3903 </xsl:element> 3904 </xsl:template> 3905 <xsl:key name="path" match="//office:document/office:automatic-styles/style:style" use="@style:name"/> 3906 <xsl:template name="text:table-of-content"> 3907 <xsl:element name="字:段落"> 3908 <xsl:attribute name="uof:locID">t0051</xsl:attribute> 3909 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3910 <xsl:element name="字:段落属性"> 3911 <xsl:attribute name="uof:locID">t0052</xsl:attribute> 3912 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 3913 <xsl:attribute name="字:式样引用"><xsl:value-of select="text:index-body/text:p/@text:style-name"/></xsl:attribute> 3914 <xsl:element name="字:制表位设置"> 3915 <xsl:attribute name="uof:locID">t0067</xsl:attribute> 3916 <xsl:element name="字:制表位"> 3917 <xsl:attribute name="uof:locID">t0068</xsl:attribute> 3918 <xsl:attribute name="uof:attrList">位置 类型 前导符 制表位字符</xsl:attribute> 3919 <xsl:variable name="aa" select="text:index-body/text:p/@text:style-name"/> 3920 <xsl:attribute name="字:位置"><xsl:value-of select="substring-before(key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:position,$ooUnit)"/></xsl:attribute> 3921 <xsl:attribute name="字:类型"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:type"/></xsl:attribute> 3922 <xsl:attribute name="字:制表位字符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-text"/></xsl:attribute> 3923 <xsl:if test="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"> 3924 <xsl:attribute name="字:前导符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"/></xsl:attribute> 3925 </xsl:if> 3926 </xsl:element> 3927 </xsl:element> 3928 <xsl:element name="字:是否行首标点压缩"> 3929 <xsl:attribute name="uof:locID">t0075</xsl:attribute> 3930 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3931 <xsl:attribute name="字:值">true</xsl:attribute> 3932 </xsl:element> 3933 <xsl:element name="字:中文习惯首尾字符"> 3934 <xsl:attribute name="字:值">true</xsl:attribute> 3935 <xsl:attribute name="uof:locID">t0076</xsl:attribute> 3936 <xsl:attribute name="uof:attrList">值</xsl:attribute> 3937 </xsl:element> 3938 </xsl:element> 3939 <xsl:element name="字:域开始"> 3940 <xsl:attribute name="字:类型"><xsl:value-of select="'REF'"/></xsl:attribute> 3941 <xsl:if test="@text:protected"> 3942 <xsl:attribute name="字:锁定"><xsl:value-of select="@text:protected"/></xsl:attribute> 3943 </xsl:if> 3944 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 3945 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 3946 </xsl:element> 3947 <xsl:element name="字:域代码"> 3948 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 3949 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 3950 <字:句 uof:locID="t0085"> 3951 <字:文本串> 3952 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3953 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3954 <xsl:value-of select="'TOC \o 1-10 \h \z'"/> 3955 </字:文本串> 3956 </字:句> 3957 </字:段落> 3958 <xsl:for-each select="text:index-body/text:index-title/text:p"> 3959 <xsl:element name="字:段落" uof:locID="t0051" uof:attrList="标识符"> 3960 <xsl:element name="字:段落属性"> 3961 <xsl:attribute name="uof:locID">t0052</xsl:attribute> 3962 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 3963 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 3964 </xsl:element> 3965 <xsl:element name="字:句"> 3966 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"> 3967 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 3968 </字:句属性> 3969 <xsl:element name="字:文本串"> 3970 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 3971 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 3972 <xsl:value-of select="self::node()"/> 3973 </xsl:element> 3974 </xsl:element> 3975 </xsl:element> 3976 </xsl:for-each> 3977 <xsl:for-each select="text:index-body/text:p"> 3978 <xsl:element name="字:段落" uof:locID="t0051" uof:attrList="标识符"> 3979 <xsl:element name="字:段落属性"> 3980 <xsl:attribute name="uof:locID">t0052</xsl:attribute> 3981 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 3982 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 3983 <xsl:element name="字:制表位设置"> 3984 <xsl:attribute name="uof:locID">t0067</xsl:attribute> 3985 <xsl:element name="字:制表位"> 3986 <xsl:attribute name="uof:locID">t0068</xsl:attribute> 3987 <xsl:attribute name="uof:attrList">位置 类型 前导符</xsl:attribute> 3988 <xsl:variable name="aa" select="@text:style-name"/> 3989 <xsl:attribute name="字:位置"><xsl:value-of select="substring-before(key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:position,$ooUnit)"/></xsl:attribute> 3990 <xsl:attribute name="字:类型"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:type"/></xsl:attribute> 3991 <xsl:attribute name="字:制表位字符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-text"/></xsl:attribute> 3992 <xsl:if test="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"> 3993 <xsl:attribute name="字:前导符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"/></xsl:attribute> 3994 </xsl:if> 3995 </xsl:element> 3996 </xsl:element> 3997 <xsl:element name="字:是否行首标点压缩"> 3998 <xsl:attribute name="uof:locID">t0075</xsl:attribute> 3999 <xsl:attribute name="uof:attrList">值</xsl:attribute> 4000 <xsl:attribute name="字:值">true</xsl:attribute> 4001 </xsl:element> 4002 <xsl:element name="字:中文习惯首尾字符"> 4003 <xsl:attribute name="字:值">true</xsl:attribute> 4004 <xsl:attribute name="uof:locID">t0076</xsl:attribute> 4005 <xsl:attribute name="uof:attrList">值</xsl:attribute> 4006 </xsl:element> 4007 </xsl:element> 4008 <xsl:if test="self::node()/text:a"> 4009 <字:句 uof:locID="t0085"> 4010 <xsl:variable name="num"> 4011 <xsl:number from="/office:document/office:body/office:text" level="any" count="text:a"/> 4012 </xsl:variable> 4013 <xsl:element name="字:区域开始"> 4014 <xsl:attribute name="字:标识符"><xsl:value-of select="concat('hlnk',$num + 1)"/></xsl:attribute> 4015 <xsl:attribute name="字:名称">Hyperlink</xsl:attribute> 4016 <xsl:attribute name="字:类型">hyperlink</xsl:attribute> 4017 <xsl:attribute name="uof:locID">t0121</xsl:attribute> 4018 <xsl:attribute name="uof:attrList">标识符 名称 类型</xsl:attribute> 4019 </xsl:element> 4020 <xsl:for-each select="text:a/node()"> 4021 <xsl:choose> 4022 <xsl:when test="name(.)='text:tab-stop' or name(.)='text:tab'"> 4023 <xsl:element name="字:制表符" uof:locID="t0123"/> 4024 </xsl:when> 4025 <xsl:otherwise> 4026 <xsl:element name="字:文本串"> 4027 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 4028 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 4029 <xsl:value-of select="."/> 4030 </xsl:element> 4031 </xsl:otherwise> 4032 </xsl:choose> 4033 </xsl:for-each> 4034 <xsl:element name="字:区域结束"> 4035 <xsl:attribute name="字:标识符引用"><xsl:value-of select="concat('hlnk',$num + 1)"/></xsl:attribute> 4036 <xsl:attribute name="uof:locID">t0122</xsl:attribute> 4037 <xsl:attribute name="uof:attrList">标识符引用</xsl:attribute> 4038 </xsl:element> 4039 <xsl:variable name="stt"> 4040 <xsl:value-of select="./text:a"/> 4041 </xsl:variable> 4042 <xsl:variable name="end"> 4043 <xsl:value-of select="."/> 4044 </xsl:variable> 4045 <xsl:variable name="bijiao"> 4046 <xsl:value-of select="substring-after($end,$stt)"/> 4047 </xsl:variable> 4048 <xsl:if test="not($bijiao='')"> 4049 <xsl:element name="字:文本串"> 4050 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 4051 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 4052 <xsl:value-of select="$bijiao"/> 4053 </xsl:element> 4054 </xsl:if> 4055 </字:句> 4056 </xsl:if> 4057 </xsl:element> 4058 </xsl:for-each> 4059 </xsl:element> 4060 <xsl:element name="字:域结束"> 4061 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 4062 </xsl:element> 4063 </xsl:element> 4064 </xsl:template> 4065 <xsl:template name="text:alphabetical-index"> 4066 <xsl:element name="字:段落"> 4067 <xsl:attribute name="uof:locID">t0051</xsl:attribute> 4068 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 4069 <xsl:element name="字:段落属性"> 4070 <xsl:attribute name="uof:locID">t0052</xsl:attribute> 4071 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 4072 <xsl:attribute name="字:式样引用"><xsl:value-of select="text:index-body/text:p/@text:style-name"/></xsl:attribute> 4073 <xsl:element name="字:制表位设置"> 4074 <xsl:attribute name="uof:locID">t0067</xsl:attribute> 4075 <xsl:element name="字:制表位"> 4076 <xsl:attribute name="uof:locID">t0068</xsl:attribute> 4077 <xsl:attribute name="uof:attrList">位置 类型 前导符 制表位字符</xsl:attribute> 4078 <xsl:variable name="aa" select="text:index-body/text:p/@text:style-name"/> 4079 <xsl:attribute name="字:位置"><xsl:value-of select="substring-before(key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:position,$ooUnit)"/></xsl:attribute> 4080 <xsl:attribute name="字:类型"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:type"/></xsl:attribute> 4081 <xsl:attribute name="字:制表位字符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-text"/></xsl:attribute> 4082 <xsl:if test="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"> 4083 <xsl:attribute name="字:前导符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"/></xsl:attribute> 4084 </xsl:if> 4085 </xsl:element> 4086 </xsl:element> 4087 </xsl:element> 4088 <xsl:element name="字:域开始"> 4089 <xsl:attribute name="字:类型"><xsl:value-of select="'INDEX'"/></xsl:attribute> 4090 <xsl:if test="@text:protected"> 4091 <xsl:attribute name="字:锁定"><xsl:value-of select="@text:protected"/></xsl:attribute> 4092 </xsl:if> 4093 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 4094 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 4095 </xsl:element> 4096 <xsl:element name="字:域代码"> 4097 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 4098 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 4099 <字:句 uof:locID="t0085"> 4100 <字:文本串> 4101 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 4102 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 4103 <xsl:value-of select="'TOC \o 1-10 \h \z'"/> 4104 </字:文本串> 4105 </字:句> 4106 </字:段落> 4107 <xsl:for-each select="text:index-body/text:index-title/text:p"> 4108 <xsl:element name="字:段落" uof:locID="t0051" uof:attrList="标识符"> 4109 <xsl:element name="字:段落属性"> 4110 <xsl:attribute name="uof:locID">t0052</xsl:attribute> 4111 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 4112 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 4113 </xsl:element> 4114 <xsl:element name="字:句"> 4115 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"> 4116 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 4117 </字:句属性> 4118 <xsl:element name="字:文本串"> 4119 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 4120 <xsl:value-of select="self::node()"/> 4121 </xsl:element> 4122 </xsl:element> 4123 </xsl:element> 4124 </xsl:for-each> 4125 <xsl:for-each select="text:index-body/text:p"> 4126 <xsl:element name="字:段落" uof:locID="t0051" uof:attrList="标识符"> 4127 <xsl:element name="字:段落属性"> 4128 <xsl:attribute name="uof:locID">t0052</xsl:attribute> 4129 <xsl:attribute name="uof:attrList">式样引用</xsl:attribute> 4130 <xsl:attribute name="字:式样引用"><xsl:value-of select="@text:style-name"/></xsl:attribute> 4131 <xsl:element name="字:制表位设置"> 4132 <xsl:attribute name="uof:locID">t0067</xsl:attribute> 4133 <xsl:element name="字:制表位"> 4134 <xsl:attribute name="uof:locID">t0068</xsl:attribute> 4135 <xsl:attribute name="uof:attrList">位置 类型 前导符 制表位字符</xsl:attribute> 4136 <xsl:variable name="aa" select="@text:style-name"/> 4137 <xsl:attribute name="字:位置"><xsl:value-of select="substring-before(key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:position,$ooUnit)"/></xsl:attribute> 4138 <xsl:attribute name="字:类型"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:type"/></xsl:attribute> 4139 <xsl:attribute name="字:制表位字符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-text"/></xsl:attribute> 4140 <xsl:if test="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"> 4141 <xsl:attribute name="字:前导符"><xsl:value-of select="key('path',$aa)/style:paragraph-properties/style:tab-stops/style:tab-stop/@style:leader-style"/></xsl:attribute> 4142 </xsl:if> 4143 </xsl:element> 4144 </xsl:element> 4145 </xsl:element> 4146 <xsl:for-each select="node()"> 4147 <字:句 uof:locID="t0085"> 4148 <xsl:choose> 4149 <xsl:when test="name(.)='text:tab-stop' or name(.)='text:tab'"> 4150 <xsl:element name="字:制表符" uof:locID="t0123"/> 4151 </xsl:when> 4152 <xsl:otherwise> 4153 <xsl:element name="字:文本串"> 4154 <xsl:attribute name="uof:locID">t0109</xsl:attribute> 4155 <xsl:attribute name="uof:attrList">标识符</xsl:attribute> 4156 <xsl:value-of select="."/> 4157 </xsl:element> 4158 </xsl:otherwise> 4159 </xsl:choose> 4160 </字:句> 4161 </xsl:for-each> 4162 </xsl:element> 4163 </xsl:for-each> 4164 </xsl:element> 4165 <xsl:element name="字:域结束"> 4166 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 4167 </xsl:element> 4168 </xsl:element> 4169 </xsl:template> 4170 <xsl:template name="oo数字格式"> 4171 <xsl:param name="oo_format"/> 4172 <xsl:choose> 4173 <xsl:when test="$oo_format='1'">decimal</xsl:when> 4174 <xsl:when test="$oo_format='I'">upper-roman</xsl:when> 4175 <xsl:when test="$oo_format='i'">lower-roman</xsl:when> 4176 <xsl:when test="$oo_format='A'">upper-letter</xsl:when> 4177 <xsl:when test="$oo_format='a'">lower-letter</xsl:when> 4178 <xsl:when test="$oo_format='1, 2, 3, ...'">decimal-full-width</xsl:when> 4179 <xsl:when test="$oo_format='①, ②, ③, ...'">decimal-enclosed-circle</xsl:when> 4180 <xsl:when test="$oo_format='一, 二, 三, ...'">chinese-counting</xsl:when> 4181 <xsl:when test="$oo_format='壹, 贰, 叁, ...'">chinese-legal-simplified</xsl:when> 4182 <xsl:when test="$oo_format='甲, 乙, 丙, ...'">ideograph-traditional</xsl:when> 4183 <xsl:when test="$oo_format='子, 丑, 寅, ...'">ideograph-zodiac</xsl:when> 4184 <xsl:otherwise>decimal</xsl:otherwise> 4185 </xsl:choose> 4186 </xsl:template> 4187 <xsl:template name="图:填充"> 4188 <xsl:param name="style-name"/> 4189 <xsl:choose> 4190 <xsl:when test="style:background-image/office:binary-data"> 4191 <图:图片 uof:locID="g0035" uof:attrList="位置 图形引用 类型 名称"> 4192 <xsl:attribute name="图:位置"><xsl:choose><xsl:when test="not(style:background-image/@style:repeat)">tile</xsl:when><xsl:otherwise><xsl:choose><xsl:when test="style:background-image/@style:repeat = 'stretch'">stretch</xsl:when><xsl:when test="style:background-image/@style:repeat = 'repeat'">tile</xsl:when><xsl:when test="style:background-image/@style:repeat = 'no-repeat'">center</xsl:when></xsl:choose></xsl:otherwise></xsl:choose></xsl:attribute> 4193 <xsl:attribute name="图:图形引用"><xsl:value-of select="concat('background-image_',count(preceding::style:background-image))"/></xsl:attribute> 4194 <xsl:attribute name="图:类型">png</xsl:attribute> 4195 <xsl:attribute name="图:名称">background-image</xsl:attribute> 4196 </图:图片> 4197 </xsl:when> 4198 <xsl:when test="@fo:background-color"> 4199 <图:颜色 uof:locID="g0034"> 4200 <xsl:choose> 4201 <xsl:when test="@fo:background-color='transparent' ">auto</xsl:when> 4202 <xsl:otherwise> 4203 <xsl:value-of select="@fo:background-color"/> 4204 </xsl:otherwise> 4205 </xsl:choose> 4206 </图:颜色> 4207 </xsl:when> 4208 <xsl:when test="@draw:fill='gradient'"> 4209 </xsl:when> 4210 <xsl:when test="@draw:fill='hatch'"> 4211 </xsl:when> 4212 <xsl:otherwise/> 4213 </xsl:choose> 4214 </xsl:template> 4215 <xsl:template name="字:缩进类型"> 4216 <xsl:if test="@text:space-before or @fo:margin-left"> 4217 <字:左 uof:locID="t0182"> 4218 <字:绝对 uof:locID="t0185" uof:attrList="值"> 4219 <xsl:if test="@text:space-before"> 4220 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(@text:space-before,$uofUnit)"/></xsl:attribute> 4221 </xsl:if> 4222 <xsl:if test="@fo:margin-left"> 4223 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(@fo:margin-left,$uofUnit)"/></xsl:attribute> 4224 </xsl:if> 4225 </字:绝对> 4226 </字:左> 4227 </xsl:if> 4228 <xsl:if test="@text:min-label-width or @fo:margin-right"> 4229 <字:右 uof:locID="t0183"> 4230 <字:绝对 uof:locID="t0187" uof:attrList="值"> 4231 <xsl:if test="@text:min-label-width"> 4232 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(@text:min-label-width,$uofUnit)"/></xsl:attribute> 4233 </xsl:if> 4234 <xsl:if test="@fo:margin-right"> 4235 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(@fo:margin-right,$uofUnit)"/></xsl:attribute> 4236 </xsl:if> 4237 </字:绝对> 4238 </字:右> 4239 </xsl:if> 4240 <xsl:if test="@text:min-label-distance or @fo:text-indent"> 4241 <字:首行 uof:locID="t0184"> 4242 <字:绝对 uof:locID="t0189" uof:attrList="值"> 4243 <xsl:if test="@text:min-label-distance"> 4244 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(@text:min-label-distance,$uofUnit)"/></xsl:attribute> 4245 </xsl:if> 4246 <xsl:if test="@fo:text-indent"> 4247 <xsl:attribute name="字:值"><xsl:value-of select="substring-before(@fo:text-indent,$uofUnit)"/></xsl:attribute> 4248 </xsl:if> 4249 </字:绝对> 4250 </字:首行> 4251 </xsl:if> 4252 </xsl:template> 4253 <xsl:template name="graphsize"> 4254 <xsl:param name="width"/> 4255 <xsl:param name="Unitofsize"/> 4256 <xsl:if test="$Unitofsize='pt'"> 4257 <xsl:choose> 4258 <xsl:when test="(not($width>1.42) and 0<$width)">1</xsl:when> 4259 <xsl:when test="(not($width>2.84) and 1.42<$width)">2</xsl:when> 4260 <xsl:when test="(not($width>4.26) and 2.84<$width)">3</xsl:when> 4261 <xsl:when test="(not($width>5.68) and 4.26<$width)">4</xsl:when> 4262 <xsl:when test="(not($width>7.10) and 5.68<$width)">5</xsl:when> 4263 <xsl:when test="(not($width>8.52) and 7.10<$width)">6</xsl:when> 4264 <xsl:when test="(not($width>9.94) and 8.52<$width)">7</xsl:when> 4265 <xsl:when test="(not($width>11.36) and 9.94<$width)">8</xsl:when> 4266 <xsl:otherwise>9</xsl:otherwise> 4267 </xsl:choose> 4268 </xsl:if> 4269 <xsl:if test="$uofUnit='in'"> 4270 <xsl:choose> 4271 <xsl:when test="(not($width>0.02) and 0<$width)">1</xsl:when> 4272 <xsl:when test="(not($width>0.04) and 0.02<$width)">2</xsl:when> 4273 <xsl:when test="(not($width>0.06) and 0.04<$width)">3</xsl:when> 4274 <xsl:when test="(not($width>0.08) and 0.06<$width)">4</xsl:when> 4275 <xsl:when test="(not($width>0.10) and 0.08<$width)">5</xsl:when> 4276 <xsl:when test="(not($width>0.12) and 0.10<$width)">6</xsl:when> 4277 <xsl:when test="(not($width>0.14) and 0.12<$width)">7</xsl:when> 4278 <xsl:when test="(not($width>0.16) and 0.14<$width)">8</xsl:when> 4279 <xsl:otherwise>9</xsl:otherwise> 4280 </xsl:choose> 4281 </xsl:if> 4282 <xsl:if test="$uofUnit='mm'"> 4283 <xsl:choose> 4284 <xsl:when test="(not($width>0.5) and 0<$width) or $width=0.5">1</xsl:when> 4285 <xsl:when test="(not($width>1.0) and 0.5<$width) or $width=1.0">2</xsl:when> 4286 <xsl:when test="(not($width>1.5) and 0.10<$width) or $width=1.5">3</xsl:when> 4287 <xsl:when test="(not($width>2.0) and 1.5<$width) or $width=2.0">4</xsl:when> 4288 <xsl:when test="(not($width>2.5) and 2.0<$width) or $width=2.5">5</xsl:when> 4289 <xsl:when test="(not($width>3.0) and 2.5<$width) or $width=3.0">6</xsl:when> 4290 <xsl:when test="(not($width>3.5) and 3.0<$width) or $width=3.5">7</xsl:when> 4291 <xsl:when test="(not($width>4.0) and 3.5<$width) or $width=4.0">8</xsl:when> 4292 <xsl:otherwise>9</xsl:otherwise> 4293 </xsl:choose> 4294 </xsl:if> 4295 <xsl:if test="$uofUnit='cm'"> 4296 <xsl:choose> 4297 <xsl:when test="(not($width>0.05) and 0<$width) or $width=0.05">1</xsl:when> 4298 <xsl:when test="(not($width>0.10) and 0.05<$width) or $width=0.10">2</xsl:when> 4299 <xsl:when test="(not($width>0.15) and 0.10<$width) or $width=0.15">3</xsl:when> 4300 <xsl:when test="(not($width>0.20) and 0.15<$width) or $width=0.20">4</xsl:when> 4301 <xsl:when test="(not($width>0.25) and 0.20<$width) or $width=0.25">5</xsl:when> 4302 <xsl:when test="(not($width>0.30) and 0.25<$width) or $width=0.30">6</xsl:when> 4303 <xsl:when test="(not($width>0.35) and 0.30<$width) or $width=0.35">7</xsl:when> 4304 <xsl:when test="(not($width>0.40) and 0.35<$width) or $width=0.40">8</xsl:when> 4305 <xsl:otherwise>9</xsl:otherwise> 4306 </xsl:choose> 4307 </xsl:if> 4308 </xsl:template> 4309 <xsl:template match="text:character-count"> 4310 <xsl:element name="字:域开始"> 4311 <xsl:attribute name="字:类型"><xsl:value-of select="'numchars'"/></xsl:attribute> 4312 <xsl:attribute name="uof:locID">t0079</xsl:attribute> 4313 <xsl:attribute name="uof:attrList">类型 锁定</xsl:attribute> 4314 <xsl:choose> 4315 <xsl:when test="text:fixed='1'or text:fixed='true'"> 4316 <xsl:attribute name="字:锁定">true</xsl:attribute> 4317 </xsl:when> 4318 <xsl:otherwise> 4319 <xsl:attribute name="字:锁定">false</xsl:attribute> 4320 </xsl:otherwise> 4321 </xsl:choose> 4322 </xsl:element> 4323 <xsl:element name="字:域代码"> 4324 <xsl:attribute name="uof:locID">t0080</xsl:attribute> 4325 <字:段落 uof:locID="t0051" uof:attrList="标识符"> 4326 <字:句 uof:locID="t0085"> 4327 <字:句属性 uof:locID="t0086" uof:attrList="式样引用"/> 4328 <xsl:variable name="quote" select="'"'"/> 4329 <xsl:variable name="fmt"> 4330 <xsl:call-template name="oo数字格式域开关"> 4331 <xsl:with-param name="oo_format" select="@style:num-format"/> 4332 </xsl:call-template> 4333 </xsl:variable> 4334 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 4335 <xsl:value-of select="concat('NUMCHARS \* ',$fmt,' \# ',$quote,0,$quote)"/> 4336 </字:文本串> 4337 </字:句> 4338 </字:段落> 4339 </xsl:element> 4340 <字:句 uof:locID="t0085"> 4341 <字:文本串 uof:locID="t0109" uof:attrList="标识符"> 4342 <xsl:value-of select="."/> 4343 </字:文本串> 4344 </字:句> 4345 <xsl:element name="字:域结束"> 4346 <xsl:attribute name="uof:locID">t0081</xsl:attribute> 4347 </xsl:element> 4348 </xsl:template> 4349 <!-- measure_conversion.xsl Begin--> 4350 <!--xsl:param name="dpi" select="111"/> 4351 <xsl:param name="centimeter-in-mm" select="10"/> 4352 <xsl:param name="inch-in-mm" select="25.4"/> 4353 <xsl:param name="didot-point-in-mm" select="0.376065"/> 4354 <xsl:param name="pica-in-mm" select="4.2333333"/> 4355 <xsl:param name="point-in-mm" select="0.3527778"/> 4356 <xsl:param name="twip-in-mm" select="0.017636684"/> 4357 <xsl:param name="pixel-in-mm" select="$inch-in-mm div $dpi"/--> 4358 <!-- ***** MEASUREMENT CONVERSIONS ***** 4359 PARAM 'value' 4360 The measure to be converted. 4361 The current measure is judged by a substring (e.g. 'mm', 'cm', 'in', 'pica'...) 4362 directly added to the number. 4363 4364 PARAM 'rounding-factor' 4365 Is used for the rounding of decimal places. 4366 The parameter number is the product of 1 and some '10', where 4367 every zero represents a decimal place. 4368 4369 For example, providing as parameter: 4370 <xsl:param name="rounding-factor" select="10000" /> 4371 Gives by default four decimal places. 4372 4373 To round two decimal places, basically the following is done: 4374 <xsl:value-of select="round(100 * value) div 100"/> 4375 4376 RETURN The converted number, by default rounded to four decimal places. 4377 In case the input measure could not be matched the same value is 4378 returned and a warning message is written out. 4379 4380 4381 4382 MEASURE LIST: 4383 * 1 milimeter (mm), the basic measure 4384 4385 * 1 centimeter (cm) = 10 mm 4386 4387 * 1 inch (in) = 25.4 mm 4388 While the English have already seen the light (read: the metric system), the US 4389 remains loyal to this medieval system. 4390 4391 * 1 point (pt) = 0.35277777.. mm 4392 Sometimes called PostScript point (ppt), as when Adobe created PostScript, they added their own system of points. 4393 There are exactly 72 PostScript points in 1 inch. 4394 4395 * 1 twip = twentieth of a (PostScript) point 4396 A twip (twentieth of a point) is a 1/20th of a PostScript point, a traditional measure in printing. 4397 4398 * 1 didot point (dpt) = 0.376065 mm 4399 Didot point after the French typographer Firmin Didot (1764-1836). 4400 4401 More details under 4402 http://www.unc.edu/~rowlett/units/dictP.html: 4403 "A unit of length used by typographers and printers. When printing was done 4404 from hand-set metal type, one point represented the smallest element of type 4405 that could be handled, roughly 1/64 inch. Eventually, the point was standardized 4406 in Britain and America as exactly 1/72.27 = 0.013 837 inch, which is 4407 about 0.35 mm (351.46 micrometers). In continental Europe, typographers 4408 traditionally used a slightly larger point of 0.014 83 inch (about 4409 1/72 pouce, 0.377 mm, or roughly 1/67 English inch), called a Didot point 4410 after the French typographer Firmin Didot (1764-1836). In the U.S., 4411 Adobe software defines the point to be exactly 1/72 inch (0.013 888 9 inch 4412 or 0.352 777 8 millimeters) and TeX software uses a slightly smaller point 4413 of 0.351 459 8035 mm. The German standards agency DIN has proposed that 4414 all these units be replaced by multiples of 0.25 millimeters (1/101.6 inch). 4415 4416 * 1 pica = 4.233333 mm 4417 1/6 inch or 12 points 4418 4419 * 1 pixel (px) = 0.26458333.. mm (relative to 'DPI', here: 96 dpi) 4420 Most pictures have the 96 dpi resolution, but the dpi variable may vary by stylesheet parameter 4421 4422 4423 --> 4424 <!-- changing measure to mm --> 4425 <!--xsl:template name="convert2cm"> 4426 <xsl:param name="value"/> 4427 <xsl:param name="rounding-factor" select="10000"/> 4428 <xsl:choose> 4429 <xsl:when test="contains($value, 'mm')"> 4430 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $centimeter-in-mm)) div $rounding-factor"/> 4431 </xsl:when> 4432 <xsl:when test="contains($value, $uofUnit)"> 4433 <xsl:value-of select="substring-before($value, $uofUnit)"/> 4434 </xsl:when> 4435 <xsl:when test="contains($value, 'in')"> 4436 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $centimeter-in-mm * $inch-in-mm)) div $rounding-factor"/> 4437 </xsl:when> 4438 <xsl:when test="contains($value, 'pt')"> 4439 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $centimeter-in-mm * $point-in-mm)) div $rounding-factor"/> 4440 </xsl:when> 4441 <xsl:when test="contains($value, 'dpt')"> 4442 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $centimeter-in-mm * $didot-point-in-mm)) div $rounding-factor"/> 4443 </xsl:when> 4444 <xsl:when test="contains($value, 'pica')"> 4445 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $centimeter-in-mm * $pica-in-mm)) div $rounding-factor"/> 4446 </xsl:when> 4447 <xsl:when test="contains($value, 'twip')"> 4448 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $centimeter-in-mm * $twip-in-mm)) div $rounding-factor"/> 4449 </xsl:when> 4450 <xsl:when test="contains($value, 'px')"> 4451 <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $centimeter-in-mm * $pixel-in-mm)) div $rounding-factor"/> 4452 </xsl:when> 4453 <xsl:otherwise> 4454 <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'cm'!</xsl:message> 4455 <xsl:value-of select="$value"/> 4456 </xsl:otherwise> 4457 </xsl:choose> 4458 </xsl:template--> 4459</xsl:stylesheet> 4460