xref: /AOO41X/main/filter/source/xslt/import/uof/uof2odf_text.xsl (revision ecd2ca4e0be70f541348445c62753174c0524fee)
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5
6 * Licensed to the Apache Software Foundation (ASF) under one
7 * or more contributor license agreements.  See the NOTICE file
8 * distributed with this work for additional information
9 * regarding copyright ownership.  The ASF licenses this file
10 * to you under the Apache License, Version 2.0 (the
11 * "License"); you may not use this file except in compliance
12 * with the License.  You may obtain a copy of the License at
13 *
14 *   http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an
18 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19 * KIND, either express or implied.  See the License for the
20 * specific language governing permissions and limitations
21 * under the License.
22 *
23 ***********************************************************-->
24
25<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:uof="http://schemas.uof.org/cn/2003/uof" xmlns:表="http://schemas.uof.org/cn/2003/uof-spreadsheet" xmlns:演="http://schemas.uof.org/cn/2003/uof-slideshow" xmlns:字="http://schemas.uof.org/cn/2003/uof-wordproc" xmlns:图="http://schemas.uof.org/cn/2003/graph" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" office:version="1.0">
26	<xsl:template match="uof:UOF">
27		<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" office:version="1.0">
28			<xsl:apply-templates select="uof:元数据"/>
29			<xsl:apply-templates select="uof:文字处理/字:公用处理规则/字:文档设置"/>
30			<xsl:apply-templates select="uof:字体集"/>
31			<xsl:apply-templates select="uof:式样集"/>
32			<xsl:apply-templates select="uof:文字处理"/>
33		</office:document>
34	</xsl:template>
35	<xsl:template match="uof:元数据">
36		<xsl:element name="office:meta">
37			<meta:generator>UOFText 2004</meta:generator>
38			<dc:title>
39				<xsl:value-of select="uof:标题"/>
40			</dc:title>
41			<dc:description>
42				<xsl:value-of select="uof:摘要"/>
43			</dc:description>
44			<dc:subject>
45				<xsl:value-of select="uof:主题"/>
46			</dc:subject>
47			<meta:initial-creator>
48				<xsl:value-of select="uof:创建者"/>
49			</meta:initial-creator>
50			<meta:creation-date>
51				<xsl:value-of select="substring-before( uof:创建日期, 'Z')"/>
52			</meta:creation-date>
53			<dc:creator>
54				<xsl:value-of select="uof:最后作者"/>
55			</dc:creator>
56			<dc:date>
57				<xsl:value-of select="substring-before( uof:编辑时间, 'Z')"/>
58			</dc:date>
59			<meta:printed-by/>
60			<meta:print-date/>
61			<meta:keywords>
62				<meta:keyword>
63					<xsl:value-of select="uof:关键字集/uof:关键字"/>
64				</meta:keyword>
65			</meta:keywords>
66			<dc:language/>
67			<meta:editing-cycles>
68				<xsl:value-of select="uof:编辑次数"/>
69			</meta:editing-cycles>
70			<meta:editing-duration>
71				<xsl:if test="uof:编辑时间">
72					<xsl:value-of select="concat('PT', floor(uof:编辑时间 div 60), 'H', uof:编辑时间 mod 60, 'M0S')"/>
73				</xsl:if>
74			</meta:editing-duration>
75			<meta:user-defined meta:name="Category">
76				<xsl:value-of select="uof:分类"/>
77			</meta:user-defined>
78			<meta:user-defined meta:name="Manager">
79				<xsl:value-of select="uof:经理名称"/>
80			</meta:user-defined>
81			<meta:user-defined meta:name="Company">
82				<xsl:value-of select="uof:公司名称"/>
83			</meta:user-defined>
84			<meta:user-defined meta:name="Version">
85				<xsl:value-of select="uof:创建应用程序"/>
86			</meta:user-defined>
87			<xsl:if test="uof:文档模板|child::*[@uof:locID='u0013']">
88				<meta:template xlink:type="simple" xlink:actuate="onRequest" xlink:href="{child::*[@uof:locID='u0013']}"/>
89			</xsl:if>
90			<xsl:if test="uof:用户自定义元数据集/uof:用户自定义元数据|child::*[@uof:locID='u0016']/*[@uof:locID='u0017']">
91				<xsl:for-each select="uof:用户自定义元数据集/uof:用户自定义元数据|child::*[@uof:locID='u0016']/*[@uof:locID='u0017']">
92					<xsl:element name="meta:user-defined">
93						<xsl:attribute name="meta:name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
94					</xsl:element>
95				</xsl:for-each>
96			</xsl:if>
97			<meta:document-statistic>
98				<xsl:attribute name="meta:page-count">
99					<xsl:choose>
100						<xsl:when test="child::*[@uof:locID='u0020']"><xsl:value-of select="uof:页数"/></xsl:when>
101						<xsl:otherwise>
102							<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体/字:段落/字:域开始[@字:类型='numpages']">
103								<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
104								<xsl:variable name="fmt">
105										<xsl:value-of select="substring-before($date0,' \*')"/>
106								</xsl:variable>
107								<xsl:if test="$fmt='Arabic'"><xsl:value-of select="following-sibling::字:句/字:文本串"/></xsl:if>
108								<xsl:if test="not($fmt='Arabic')">
109									<xsl:variable name="content">
110										<xsl:value-of select="following-sibling::字:句/字:文本串"/>
111									</xsl:variable>
112									<xsl:choose>
113										<xsl:when test="$content='I' or $content='i' or $content='A' or $content='a'">1</xsl:when>
114										<xsl:when test="$content='II' or $content='ii' or $content='B' or $content='b'">2</xsl:when>
115									</xsl:choose>
116								</xsl:if>
117							</xsl:for-each>
118						</xsl:otherwise>
119					</xsl:choose>
120				</xsl:attribute>
121				<xsl:attribute name="meta:paragraph-count"><xsl:if test="child::*[@uof:locID='u0025']"><xsl:value-of select="uof:段落数"/></xsl:if></xsl:attribute>
122				<xsl:attribute name="meta:word-count"><xsl:if test="child::*[@uof:locID='u0023']"><xsl:value-of select="uof:中文字符数"/></xsl:if></xsl:attribute>
123				<xsl:attribute name="meta:object-count"><xsl:if test="child::*[@uof:locID='u0026']"><xsl:value-of select="uof:对象数"/></xsl:if></xsl:attribute>
124				<xsl:attribute name="meta:character-count">
125					<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体/字:段落/字:域开始[@字:类型='numchars']">
126						<xsl:value-of select="following-sibling::字:句/字:文本串"/>
127					</xsl:for-each>
128					<xsl:if test="child::*[@uof:locID='u0021']"><xsl:value-of select="uof:字数"/></xsl:if>
129				</xsl:attribute>
130			</meta:document-statistic>
131			<meta:document-statistic/>
132		</xsl:element>
133	</xsl:template>
134	<xsl:variable name="uofUnit">
135		<xsl:variable name="uu">
136			<xsl:value-of select="/uof:UOF/uof:文字处理/字:公用处理规则/字:文档设置/字:度量单位"/>
137		</xsl:variable>
138		<xsl:choose>
139			<xsl:when test="$uu='cm'">cm</xsl:when>
140			<xsl:when test="$uu='mm'">mm</xsl:when>
141			<xsl:when test="$uu='pt'">pt</xsl:when>
142			<xsl:when test="$uu='inch'">in</xsl:when>
143			<xsl:otherwise>cm</xsl:otherwise>
144		</xsl:choose>
145	</xsl:variable>
146	<xsl:variable name="other-to-cm-conversion-factor">
147		<xsl:choose>
148			<xsl:when test="$uofUnit='cm'">1</xsl:when>
149			<xsl:when test="$uofUnit='mm'">0.1</xsl:when>
150			<xsl:when test="$uofUnit='pt'">0.03527</xsl:when>
151			<xsl:when test="$uofUnit='inch'">2.54</xsl:when>
152			<xsl:when test="$uofUnit='pica'">0.4233</xsl:when>
153			<xsl:otherwise>0.03527</xsl:otherwise>
154		</xsl:choose>
155	</xsl:variable>
156	<xsl:template match="uof:式样集">
157		<xsl:apply-templates select="uof:字体集"/>
158		<xsl:variable name="default_paragraph_style" select="uof:段落式样"/>
159		<xsl:variable name="default_character_style" select="uof:句式样"/>
160		<xsl:variable name="default_table_style" select="uof:文字表式样"/>
161		<office:styles>
162			<xsl:if test="uof:段落式样[@字:类型 = 'default']">
163				<style:default-style style:family="paragraph">
164					<xsl:element name="style:paragraph-properties">
165						<xsl:attribute name="style:tab-stop-distance"><xsl:value-of select="concat( number(/uof:UOF/uof:文字处理/字:公用处理规则/字:文档设置/字:默认制表位位置),$uofUnit)"/></xsl:attribute>
166					</xsl:element>
167					<xsl:element name="style:text-properties">
168						<xsl:choose>
169							<xsl:when test="/uof:UOF/uof:式样集/uof:字体集/uof:默认字体">
170								<xsl:attribute name="style:font-name"><xsl:value-of select="/uof:UOF//uof:字体集/uof:默认字体/@uof:ascii"/></xsl:attribute>
171								<xsl:attribute name="style:font-name-asian"><xsl:value-of select="/uof:UOF//uof:字体集/uof:默认字体/@uof:fareast"/></xsl:attribute>
172								<xsl:attribute name="style:font-name-complex"><xsl:value-of select="/uof:UOF//uof:字体集/uof:默认字体/@uof:cs"/></xsl:attribute>
173							</xsl:when>
174							<xsl:otherwise>
175								<xsl:attribute name="style:font-name">Times New Roman</xsl:attribute>
176							</xsl:otherwise>
177						</xsl:choose>
178						<xsl:apply-templates select="uof:UOF/uof:式样集/uof:句式样/字:字体"/>
179						<xsl:if test="not(uof:UOF/uof:式样集/uof:句式样/字:字体/@字:字号 or uof:UOF/uof:式样集/uof:句属性/字:字体/@字:字号)">
180							<xsl:attribute name="fo:font-size">10pt</xsl:attribute>
181							<xsl:attribute name="fo:font-size-asian">10pt</xsl:attribute>
182							<xsl:attribute name="fo:font-size-complex">10pt</xsl:attribute>
183						</xsl:if>
184					</xsl:element>
185				</style:default-style>
186			</xsl:if>
187			<xsl:for-each select="uof:段落式样[@字:类型='auto']">
188				<xsl:element name="style:style">
189					<xsl:attribute name="style:family">paragraph</xsl:attribute>
190					<xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
191					<xsl:if test="@字:基式样引用">
192						<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
193					</xsl:if>
194					<xsl:if test="@字:别名">
195						<xsl:attribute name="style:display-name"><xsl:value-of select="@字:别名"/></xsl:attribute>
196					</xsl:if>
197					<xsl:element name="style:paragraph-properties">
198						<xsl:call-template name="XDParagraphAttr"/>
199						<xsl:apply-templates select="*[not(name()='字:大纲级别')]"/>
200						<xsl:if test="字:制表位设置">
201							<xsl:call-template name="ootab"/>
202						</xsl:if>
203					</xsl:element>
204					<xsl:element name="style:text-properties">
205						<xsl:apply-templates select="字:句属性/*"/>
206					</xsl:element>
207					<xsl:variable name="biaoshi" select="@字:标识符"/>
208					<xsl:for-each select="../uof:句式样">
209						<xsl:if test="@字:标识符=$biaoshi">
210							<xsl:element name="style:text-properties">
211								<xsl:apply-templates select="*"/>
212							</xsl:element>
213						</xsl:if>
214					</xsl:for-each>
215				</xsl:element>
216			</xsl:for-each>
217			<xsl:for-each select="uof:句式样[@字:类型='auto']">
218				<xsl:element name="style:style">
219					<xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
220					<xsl:choose>
221						<xsl:when test="ancestor::字:段落式样">
222							<xsl:attribute name="style:family">paragraph</xsl:attribute>
223						</xsl:when>
224						<xsl:otherwise>
225							<xsl:attribute name="style:family">text</xsl:attribute>
226						</xsl:otherwise>
227					</xsl:choose>
228					<xsl:element name="style:text-properties">
229						<xsl:apply-templates select="*"/>
230					</xsl:element>
231				</xsl:element>
232			</xsl:for-each>
233			<style:style style:name="ColumnBreakPara" style:family="paragraph">
234				<style:text-properties fo:break-after="column"/>
235			</style:style>
236			<xsl:if test="uof:句式样">
237				<style:default-style style:family="text"/>
238			</xsl:if>
239			<style:style style:name="Numbering Symbols" style:family="text"/>
240			<style:style style:name="Bullet Symbols" style:family="text">
241				<style:text-properties style:font-name="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-size-complex="9pt"/>
242			</style:style>
243			<xsl:apply-templates select="uof:文字表式样" mode="table"/>
244			<xsl:apply-templates select="uof:式样"/>
245			<xsl:call-template name="脚注设置"/>
246			<xsl:call-template name="尾注设置"/>
247			<xsl:call-template name="行编号"/>
248		</office:styles>
249		<xsl:element name="office:automatic-styles">
250			<style:style style:name="PageBreak" style:family="paragraph">
251				<style:text-properties fo:break-before="page"/>
252			</style:style>
253			<xsl:apply-templates select="/uof:UOF/uof:文字处理/字:主体/字:段落/字:句/字:句属性" mode="style"/>
254			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:句">
255				<xsl:variable name="stylename1" select="字:句属性/@字:式样引用"/>
256				<xsl:element name="style:style">
257					<xsl:variable name="stylenum">
258						<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句" format="1"/>
259					</xsl:variable>
260					<xsl:attribute name="style:name"><xsl:value-of select="concat('T',$stylenum)"/></xsl:attribute>
261					<xsl:choose>
262						<xsl:when test="ancestor::字:段落式样">
263							<xsl:attribute name="style:family">paragraph</xsl:attribute>
264						</xsl:when>
265						<xsl:otherwise>
266							<xsl:attribute name="style:family">text</xsl:attribute>
267						</xsl:otherwise>
268					</xsl:choose>
269					<xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
270						<xsl:if test="$stylename1=@字:标识符">
271							<xsl:choose>
272								<xsl:when test="@字:标识符=/uof:UOF/uof:文字处理/字:主体/字:段落/字:句/字:句属性/字:格式修订/@字:修订信息引用">
273									<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
274								</xsl:when>
275								<xsl:otherwise>
276									<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
277								</xsl:otherwise>
278							</xsl:choose>
279						</xsl:if>
280					</xsl:for-each>
281					<xsl:element name="style:text-properties">
282						<xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
283							<xsl:if test="$stylename1=@字:标识符">
284								<xsl:apply-templates select="./字:位置" mode="oo"/>
285								<xsl:apply-templates select="*[not(name()='字:位置')]"/>
286							</xsl:if>
287						</xsl:for-each>
288					</xsl:element>
289				</xsl:element>
290			</xsl:for-each>
291			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:域开始[@字:类型 = 'date']">
292				<xsl:element name="number:date-style">
293					<xsl:attribute name="style:name">Date<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'date']"/></xsl:attribute>
294					<xsl:call-template name="日期域"/>
295				</xsl:element>
296			</xsl:for-each>
297			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:域开始[@字:类型 = 'createdate']">
298				<xsl:element name="number:date-style">
299					<xsl:attribute name="style:name">CreateDate<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'createdate']"/></xsl:attribute>
300					<xsl:call-template name="日期域"/>
301				</xsl:element>
302			</xsl:for-each>
303			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:域开始[@字:类型 = 'savedate']">
304				<xsl:element name="number:date-style">
305					<xsl:attribute name="style:name">SaveDate<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'savedate']"/></xsl:attribute>
306					<xsl:call-template name="日期域"/>
307				</xsl:element>
308			</xsl:for-each>
309			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:域开始[@字:类型 = 'time']">
310				<xsl:element name="number:date-style">
311					<xsl:attribute name="style:name">Time<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'time']"/></xsl:attribute>
312					<xsl:call-template name="时间域"/>
313				</xsl:element>
314			</xsl:for-each>
315			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:域开始[@字:类型 = 'edittime']">
316				<xsl:element name="number:time-style">
317					<xsl:attribute name="style:name">EditTime<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'edittime']"/></xsl:attribute>
318					<xsl:call-template name="编辑时间"/>
319				</xsl:element>
320			</xsl:for-each>
321			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:域开始[@字:类型 = 'createtime']">
322				<xsl:element name="number:time-style">
323					<xsl:attribute name="style:name">CREATETIME<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'createtime']"/></xsl:attribute>
324					<xsl:call-template name="创建时间"/>
325				</xsl:element>
326			</xsl:for-each>
327			<xsl:apply-templates select="/uof:UOF/uof:文字处理/字:主体//字:文字表[not(@字:类型='sub-table')]" mode="style"/>
328			<xsl:apply-templates select="/uof:UOF/uof:文字处理/字:主体//字:单元格" mode="style"/>
329			<xsl:apply-templates select="/uof:UOF/uof:文字处理/字:主体//字:行[not(../../@字:类型='sub-table')]" mode="style"/>
330			<xsl:apply-templates select="/uof:UOF/uof:文字处理/字:主体//字:列宽集[not(../../@字:类型='sub-table')]" mode="style"/>
331			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:自动编号信息">
332				<xsl:variable name="currlistid" select="@字:编号引用"/>
333				<xsl:variable name="currlist" select="."/>
334				<xsl:variable name="rootlist" select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符 =$currlistid]"/>
335				<xsl:if test="not(ancestor::字:段落/preceding-sibling::字:段落[1]/字:段落属性/字:自动编号信息/@字:编号引用= $currlistid)">
336					<xsl:element name="text:list-style">
337						<xsl:attribute name="style:name">List<xsl:value-of select="count(preceding::字:自动编号信息)"/></xsl:attribute>
338						<xsl:for-each select="$rootlist">
339							<xsl:for-each select="字:级别">
340								<xsl:choose>
341									<xsl:when test="字:项目符号">
342										<xsl:call-template name="xiangmufuhao">
343											<xsl:with-param name="biaoshifu" select="../@字:标识符"/>
344										</xsl:call-template>
345									</xsl:when>
346									<xsl:when test="字:图片符号引用">
347										<xsl:call-template name="imagefuhao">
348											<xsl:with-param name="biaoshifu" select="../@字:标识符"/>
349										</xsl:call-template>
350									</xsl:when>
351									<xsl:otherwise>
352										<xsl:call-template name="jibianhao">
353											<xsl:with-param name="biaoshifu" select="../@字:标识符"/>
354										</xsl:call-template>
355									</xsl:otherwise>
356								</xsl:choose>
357							</xsl:for-each>
358						</xsl:for-each>
359					</xsl:element>
360				</xsl:if>
361			</xsl:for-each>
362			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:节属性">
363				<xsl:element name="style:page-layout">
364					<xsl:attribute name="style:name">pm<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any"/></xsl:attribute>
365					<xsl:if test="字:对称页边距/@字:值='true'">
366						<xsl:attribute name="style:page-usage">mirrored</xsl:attribute>
367					</xsl:if>
368					<xsl:element name="style:page-layout-properties">
369						<xsl:if test="字:纸张方向">
370							<xsl:attribute name="style:print-orientation"><xsl:choose><xsl:when test="字:纸张方向='portrait'">portrait</xsl:when><xsl:when test="字:纸张方向='landscape'">landscape</xsl:when></xsl:choose></xsl:attribute>
371						</xsl:if>
372						<xsl:attribute name="fo:page-width"><xsl:value-of select="concat(字:纸张/@uof:宽度,$uofUnit)"/></xsl:attribute>
373						<xsl:attribute name="fo:page-height"><xsl:value-of select="concat(字:纸张/@uof:高度,$uofUnit)"/></xsl:attribute>
374						<xsl:choose>
375							<xsl:when test="字:页边距">
376								<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:页边距/@uof:上 ,$uofUnit)"/></xsl:attribute>
377								<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(字:页边距/@uof:左,$uofUnit)"/></xsl:attribute>
378								<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(字:页边距/@uof:右,$uofUnit)"/></xsl:attribute>
379								<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(字:页边距/@uof:下,$uofUnit)"/></xsl:attribute>
380							</xsl:when>
381							<xsl:when test="字:装订线/@字:位置='top'">
382								<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:页边距/@uof:上 ,$uofUnit)"/></xsl:attribute>
383								<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(字:页边距/@uof:左,$uofUnit)"/></xsl:attribute>
384								<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(字:页边距/@uof:右,$uofUnit)"/></xsl:attribute>
385							</xsl:when>
386							<xsl:when test="字:装订线/@字:位置='left' ">
387								<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:页边距/@uof:上,$uofUnit)"/></xsl:attribute>
388								<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat((字:页边距/@uof:左+ 字:装订线/@字:距边界),$uofUnit)"/></xsl:attribute>
389								<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(字:页边距/@uof:右,$uofUnit)"/></xsl:attribute>
390							</xsl:when>
391							<xsl:otherwise>
392								<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:页边距/@uof:上,$uofUnit)"/></xsl:attribute>
393								<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(字:页边距/@uof:左,$uofUnit)"/></xsl:attribute>
394								<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(字:页边距/@uof:右,$uofUnit)"/></xsl:attribute>
395							</xsl:otherwise>
396						</xsl:choose>
397						<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(字:页边距/@uof:下,$uofUnit)"/></xsl:attribute>
398						<xsl:if test="字:拼页/@字:值='1' or 字:拼页/@字:值='true'">
399							<xsl:attribute name="style:page-usage">mirrored</xsl:attribute>
400						</xsl:if>
401						<xsl:choose>
402							<xsl:when test="string(字:文字排列方向)='vert-r2l'">
403								<xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute>
404							</xsl:when>
405							<xsl:when test="string(字:文字排列方向)='vert-l2r'">
406								<xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute>
407							</xsl:when>
408							<xsl:when test="string(字:文字排列方向)='hori-l2r'">
409								<xsl:attribute name="style:writing-mode">lr-tb</xsl:attribute>
410							</xsl:when>
411							<xsl:when test="string(字:文字排列方向)='hori-r2l'">
412								<xsl:attribute name="style:writing-mode">lr-tb</xsl:attribute>
413							</xsl:when>
414							<xsl:otherwise>
415								<xsl:attribute name="style:writing-mode">page</xsl:attribute>
416							</xsl:otherwise>
417						</xsl:choose>
418						<xsl:if test="字:网格设置/@字:网格类型">
419							<xsl:attribute name="style:layout-grid-mode"><xsl:choose><xsl:when test="字:网格设置/@字:网格类型='line-char'">both-nosnap</xsl:when><xsl:when test="字:网格设置/@字:网格类型='char'">both</xsl:when><xsl:when test="字:网格设置/@字:网格类型='line'">line</xsl:when><xsl:when test="字:网格设置/@字:网格类型='none'">none</xsl:when></xsl:choose></xsl:attribute>
420						</xsl:if>
421						<xsl:if test="字:网格设置/@字:宽度">
422							<xsl:attribute name="style:layout-grid-base-width"><xsl:value-of select="concat(字:网格设置/@字:宽度,$uofUnit)"/></xsl:attribute>
423						</xsl:if>
424						<xsl:if test="字:网格设置/@字:高度">
425							<xsl:attribute name="style:layout-grid-base-height"><xsl:value-of select="concat(字:网格设置/@字:高度,$uofUnit)"/></xsl:attribute>
426						</xsl:if>
427						<xsl:if test="字:网格设置/@字:显示网格">
428							<xsl:attribute name="style:layout-grid-display"><xsl:value-of select="字:网格设置/@字:显示网格"/></xsl:attribute>
429						</xsl:if>
430						<xsl:if test="字:网格设置/@字:打印网格">
431							<xsl:attribute name="style:layout-grid-print"><xsl:value-of select="字:网格设置/@字:打印网格"/></xsl:attribute>
432						</xsl:if>
433						<xsl:if test="字:稿纸设置/@字:类型">
434							<xsl:attribute name="style:layout-grid-mode"><xsl:choose><xsl:when test="字:稿纸设置/@字:类型='draft-paper' ">both</xsl:when><xsl:when test="字:稿纸设置/@字:类型='letter-paper' ">line</xsl:when><xsl:otherwise>both</xsl:otherwise></xsl:choose></xsl:attribute>
435						</xsl:if>
436						<xsl:if test="字:稿纸设置/@字:格式">
437							<xsl:choose>
438								<xsl:when test="字:稿纸设置/@字:格式='fourth-gear'">
439									<xsl:attribute name="style:layout-grid-base-width">0.728cm</xsl:attribute>
440									<xsl:attribute name="style:layout-grid-base-height">0.728cm</xsl:attribute>
441									<xsl:attribute name="style:layout-grid-ruby-height">0.496cm</xsl:attribute>
442								</xsl:when>
443								<xsl:when test="字:稿纸设置/@字:格式='third-gear'">
444									<xsl:attribute name="style:layout-grid-base-width">0.584cm</xsl:attribute>
445									<xsl:attribute name="style:layout-grid-base-height">0.584cm</xsl:attribute>
446									<xsl:attribute name="style:layout-grid-ruby-height">0.64cm</xsl:attribute>
447								</xsl:when>
448								<xsl:when test="字:稿纸设置/@字:格式='second-gear'">
449									<xsl:attribute name="style:layout-grid-base-width">0.728cm</xsl:attribute>
450									<xsl:attribute name="style:layout-grid-base-height">0.728cm</xsl:attribute>
451									<xsl:attribute name="style:layout-grid-ruby-height">0.905cm</xsl:attribute>
452								</xsl:when>
453								<xsl:when test="字:稿纸设置/@字:格式='first-gear'">
454									<xsl:attribute name="style:layout-grid-base-width">0.728cm</xsl:attribute>
455									<xsl:attribute name="style:layout-grid-base-height">0.728cm</xsl:attribute>
456									<xsl:attribute name="style:layout-grid-ruby-height">1.633cm</xsl:attribute>
457								</xsl:when>
458							</xsl:choose>
459							<xsl:attribute name="style:layout-grid-display">true</xsl:attribute>
460							<xsl:attribute name="style:layout-grid-print">true</xsl:attribute>
461						</xsl:if>
462						<xsl:if test="字:稿纸设置/@字:颜色">
463							<xsl:attribute name="style:layout-grid-color"><xsl:value-of select="字:稿纸设置/@字:颜色"/></xsl:attribute>
464						</xsl:if>
465						<xsl:if test="字:边框">
466							<xsl:for-each select="字:边框">
467								<xsl:call-template name="uof:边框"/>
468							</xsl:for-each>
469						</xsl:if>
470						<xsl:if test="字:填充">
471							<xsl:for-each select="字:填充">
472								<xsl:call-template name="uof:填充"/>
473							</xsl:for-each>
474						</xsl:if>
475						<xsl:apply-templates select="字:填充"/>
476						<xsl:attribute name="style:num-format"><xsl:variable name="format"><xsl:value-of select="字:页码设置/@字:格式"/></xsl:variable><xsl:call-template name="oo数字格式"><xsl:with-param name="oo_format" select="$format"/></xsl:call-template></xsl:attribute>
477						<xsl:if test="字:纸张来源/@字:其他页">
478							<xsl:attribute name="style:paper-tray-name"><xsl:value-of select="字:纸张来源/@字:其他页"/></xsl:attribute>
479						</xsl:if>
480						<xsl:if test="字:分栏/@字:栏数">
481							<xsl:apply-templates select="字:分栏"/>
482						</xsl:if>
483					</xsl:element>
484					<xsl:if test="字:页眉位置">
485						<style:header-style>
486							<xsl:element name="style:header-footer-properties">
487								<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(字:页眉位置/@字:距边界,$uofUnit)"/></xsl:attribute>
488								<xsl:variable name="long1" select="字:页眉位置/@字:距边界"/>
489								<xsl:variable name="long2" select="字:页眉位置/@字:距版芯"/>
490								<xsl:variable name="long" select="$long1 + $long2"/>
491								<xsl:attribute name="svg:height"><xsl:value-of select="concat($long,$uofUnit)"/></xsl:attribute>
492								<xsl:attribute name="style:dynamic-spacing">false</xsl:attribute>
493							</xsl:element>
494						</style:header-style>
495					</xsl:if>
496					<xsl:if test="字:页脚位置">
497						<style:footer-style>
498							<xsl:element name="style:header-footer-properties">
499								<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:页脚位置/@字:距边界,$uofUnit)"/></xsl:attribute>
500								<xsl:variable name="long1" select="字:页脚位置/@字:距边界"/>
501								<xsl:variable name="long2" select="字:页脚位置/@字:距版芯"/>
502								<xsl:variable name="long" select="$long1 + $long2"/>
503								<xsl:attribute name="svg:height"><xsl:value-of select="concat($long,$uofUnit)"/></xsl:attribute>
504								<xsl:attribute name="style:dynamic-spacing">false</xsl:attribute>
505							</xsl:element>
506						</style:footer-style>
507					</xsl:if>
508				</xsl:element>
509				<xsl:if test="字:分栏/@字:栏数">
510					<xsl:element name="style:style">
511						<xsl:attribute name="style:name">sect<xsl:value-of select="count(preceding::字:节属性[字:分栏/@字:栏数])"/></xsl:attribute>
512						<xsl:attribute name="style:family">section</xsl:attribute>
513						<xsl:element name="style:page-layout-properties">
514							<xsl:element name="style:columns">
515								<xsl:attribute name="fo:column-count"><xsl:value-of select="number(字:分栏/@字:栏数)"/></xsl:attribute>
516								<xsl:attribute name="fo:column-gap"><xsl:value-of select="concat(number(字:分栏/@字:分割线宽度),$uofUnit)"/></xsl:attribute>
517							</xsl:element>
518						</xsl:element>
519					</xsl:element>
520				</xsl:if>
521			</xsl:for-each>
522			<xsl:if test="/uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='png' or /uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='jpg' or /uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='bmp' or /uof:UOF/uof:对象集/uof:其他对象/@uof:公有类型='gif' or /uof:UOF/uof:对象集/uof:其他对象/@uof:私有类型='图片'">
523				<style:style style:name="Graphics" style:family="graphic">
524					<style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
525				</style:style>
526			</xsl:if>
527			<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形"/>
528			<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形/图:文本内容/字:段落/字:句/字:句属性" mode="style"/>
529			<xsl:call-template name="duanluoshuxing"/>
530		</xsl:element>
531		<office:master-styles>
532			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体//字:节属性">
533				<xsl:element name="style:master-page">
534					<xsl:variable name="master-page-name">
535						<xsl:number count="字:节属性" from="/uof:UOF/uof:文字处理/字:主体" level="any"/>
536					</xsl:variable>
537					<xsl:attribute name="style:name"><xsl:choose>
538						<xsl:when test="../@字:名称"><xsl:value-of select="../@字:名称"/></xsl:when>
539						<xsl:otherwise>Standard</xsl:otherwise>
540					</xsl:choose></xsl:attribute>
541					<xsl:attribute name="style:page-layout-name"><xsl:value-of select="concat('pm', $master-page-name)"/></xsl:attribute>
542					<xsl:if test="following::字:节属性">
543						<xsl:attribute name="style:next-style-name">Standard<xsl:value-of select="$master-page-name +1"/></xsl:attribute>
544					</xsl:if>
545					<xsl:for-each select="字:页眉">
546						<xsl:if test="字:首页页眉 or 字:奇数页页眉">
547							<xsl:element name="style:header">
548								<xsl:apply-templates select="字:奇数页页眉/字:段落 | 字:首页页眉/字:段落 | 字:奇数页页眉/字:文字表 | 字:首页页眉/字:文字表"/>
549							</xsl:element>
550						</xsl:if>
551						<xsl:if test="字:偶数页页眉">
552							<xsl:element name="style:header-left">
553								<xsl:apply-templates select="字:偶数页页眉/字:段落 | 字:偶数页页眉/字:文字表"/>
554							</xsl:element>
555						</xsl:if>
556					</xsl:for-each>
557					<xsl:for-each select="字:页脚">
558						<xsl:if test="字:奇数页页脚 or 字:首页页脚">
559							<xsl:element name="style:footer">
560								<xsl:apply-templates select="字:奇数页页脚/字:段落 | 字:首页页脚/字:段落 | 字:奇数页页脚/字:文字表 | 字:首页页脚/字:文字表"/>
561							</xsl:element>
562						</xsl:if>
563						<xsl:if test="字:偶数页页脚">
564							<xsl:element name="style:footer-left">
565								<xsl:apply-templates select="字:偶数页页脚/字:段落 | 字:偶数页页脚/字:文字表"/>
566							</xsl:element>
567						</xsl:if>
568					</xsl:for-each>
569					<xsl:if test="字:奇偶页页眉页脚不同">
570						<xsl:element name="style:header-left">
571						</xsl:element>
572					</xsl:if>
573				</xsl:element>
574			</xsl:for-each>
575		</office:master-styles>
576	</xsl:template>
577	<xsl:template match="字:填充">
578		<xsl:choose>
579			<xsl:when test="图:颜色">
580				<xsl:attribute name="fo:background-color"><xsl:value-of select="图:颜色"/></xsl:attribute>
581			</xsl:when>
582			<xsl:when test="图:图案/@图:背景色">
583				<xsl:attribute name="style:text-background-color"><xsl:choose><xsl:when test="contains(图:图案/@图:背景色,'#')"><xsl:value-of select="图:图案/@图:背景色"/></xsl:when><xsl:otherwise>auto</xsl:otherwise></xsl:choose></xsl:attribute>
584			</xsl:when>
585			<xsl:when test="图:图案/@图:前景色">
586				<xsl:attribute name="fo:text-background-color"><xsl:choose><xsl:when test="contains(图:图案/@图:前景色,'#')"><xsl:value-of select="图:图案/@图:前景色"/></xsl:when><xsl:otherwise>auto</xsl:otherwise></xsl:choose></xsl:attribute>
587			</xsl:when>
588		</xsl:choose>
589	</xsl:template>
590	<xsl:template match="字:分栏">
591		<xsl:element name="style:columns">
592			<xsl:attribute name="fo:column-count"><xsl:value-of select="//字:分栏/@字:栏数"/></xsl:attribute>
593			<xsl:variable name="aa">
594				<xsl:value-of select="//字:分栏/字:栏[position()=1]/@字:间距"/>
595			</xsl:variable>
596			<xsl:if test="//字:分栏/@字:等宽='true' ">
597				<xsl:attribute name="fo:column-gap"><xsl:value-of select="concat($aa * 2,$uofUnit)"/></xsl:attribute>
598			</xsl:if>
599			<xsl:if test="//字:分栏/@字:分隔线宽度">
600				<xsl:element name="style:column-sep">
601					<xsl:attribute name="style:width"><xsl:value-of select="concat(@字:分隔线宽度,$uofUnit)"/></xsl:attribute>
602					<xsl:attribute name="style:color"><xsl:value-of select="@字:分隔线颜色"/></xsl:attribute>
603					<xsl:attribute name="style:height">100%</xsl:attribute>
604					<xsl:attribute name="style:vertical-align">top</xsl:attribute>
605				</xsl:element>
606			</xsl:if>
607			<xsl:for-each select="//字:分栏/字:栏">
608				<xsl:element name="style:column">
609					<xsl:attribute name="style:rel-width"><xsl:value-of select="@字:宽度"/>*</xsl:attribute>
610					<xsl:if test="parent::字:分栏/@字:宽度='true'">
611						<xsl:choose>
612							<xsl:when test="self::node()[not(preceding-sibling::字:栏)]">
613								<xsl:attribute name="fo:start-indent">0cm</xsl:attribute>
614								<xsl:attribute name="fo:end-indent"><xsl:value-of select="concat(@字:间距,$uofUnit)"/></xsl:attribute>
615							</xsl:when>
616							<xsl:when test="self::node()[not(following-sibling::字:栏)]">
617								<xsl:attribute name="fo:start-indent"><xsl:value-of select="concat(@字:间距,$uofUnit)"/></xsl:attribute>
618								<xsl:attribute name="fo:end-indent">0cm</xsl:attribute>
619							</xsl:when>
620							<xsl:otherwise>
621								<xsl:attribute name="fo:start-indent"><xsl:value-of select="concat(@字:间距,$uofUnit)"/></xsl:attribute>
622								<xsl:attribute name="fo:end-indent"><xsl:value-of select="concat(@字:间距,$uofUnit)"/></xsl:attribute>
623							</xsl:otherwise>
624						</xsl:choose>
625					</xsl:if>
626					<xsl:if test="parent::字:分栏/@字:等宽='false'">
627						<xsl:variable name="last" select="preceding-sibling::字:栏[1]/@字:间距"/>
628						<xsl:choose>
629							<xsl:when test="self::node()[not(preceding-sibling::字:栏)]">
630								<xsl:attribute name="fo:start-indent">0cm</xsl:attribute>
631								<xsl:attribute name="fo:end-indent"><xsl:value-of select="concat(@字:间距,$uofUnit)"/></xsl:attribute>
632							</xsl:when>
633							<xsl:when test="self::node()[not(following-sibling::字:栏)]">
634								<xsl:attribute name="fo:start-indent"><xsl:value-of select="concat($last,$uofUnit)"/></xsl:attribute>
635								<xsl:attribute name="fo:end-indent">0cm</xsl:attribute>
636							</xsl:when>
637							<xsl:otherwise>
638								<xsl:attribute name="fo:start-indent"><xsl:value-of select="concat($last,$uofUnit)"/></xsl:attribute>
639								<xsl:attribute name="fo:end-indent"><xsl:value-of select="concat(@字:间距,$uofUnit)"/></xsl:attribute>
640							</xsl:otherwise>
641						</xsl:choose>
642					</xsl:if>
643				</xsl:element>
644			</xsl:for-each>
645		</xsl:element>
646	</xsl:template>
647	<xsl:template match="uof:文字表式样" mode="table">
648		<style:style style:family="table">
649			<xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
650			<xsl:if test="@字:基式样引用">
651				<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
652			</xsl:if>
653			<style:table-properties>
654				<xsl:choose>
655					<xsl:when test="字:对齐">
656						<xsl:attribute name="table:align"><xsl:value-of select="字:对齐"/></xsl:attribute>
657					</xsl:when>
658					<xsl:otherwise>
659						<xsl:attribute name="table:align">margins</xsl:attribute>
660					</xsl:otherwise>
661				</xsl:choose>
662				<xsl:choose>
663					<xsl:when test="字:宽度/@字:相对宽度">
664						<xsl:variable name="reltblw">
665							<xsl:value-of select="concat(number(字:宽度/@字:相对宽度),'%')"/>
666						</xsl:variable>
667						<xsl:variable name="pagew">
668							<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:纸张/@uof:宽度"/>
669						</xsl:variable>
670						<xsl:variable name="leftm">
671							<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:左"/>
672						</xsl:variable>
673						<xsl:variable name="rightm">
674							<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:右"/>
675						</xsl:variable>
676						<xsl:attribute name="style:rel-width"><xsl:value-of select="concat(number(字:宽度/@字:相对宽度) * 100,'%')"/></xsl:attribute>
677						<xsl:attribute name="style:width"><xsl:value-of select="concat((number($pagew)-number($leftm)-number($rightm)) * number($reltblw),$uofUnit)"/></xsl:attribute>
678					</xsl:when>
679					<xsl:when test="字:宽度/@字:绝对宽度">
680						<xsl:attribute name="style:width"><xsl:value-of select="concat(number(字:宽度/@字:绝对宽度),$uofUnit)"/></xsl:attribute>
681					</xsl:when>
682					<xsl:otherwise/>
683				</xsl:choose>
684			</style:table-properties>
685		</style:style>
686	</xsl:template>
687	<xsl:template match="字:文字表" mode="style">
688		<xsl:element name="style:style">
689			<xsl:attribute name="style:name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/></xsl:attribute>
690			<xsl:attribute name="style:family">table</xsl:attribute>
691			<xsl:if test="@字:式样引用">
692				<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:式样引用"/></xsl:attribute>
693			</xsl:if>
694			<xsl:if test="name(preceding-sibling::*[1])='字:分节'">
695				<xsl:attribute name="style:master-page-name"><xsl:value-of select="preceding-sibling::*[1]/@字:名称"/></xsl:attribute>
696			</xsl:if>
697			<xsl:element name="style:table-properties">
698				<xsl:for-each select="字:文字表属性">
699					<xsl:variable name="biaoshi" select="@字:式样引用"/>
700					<xsl:choose>
701						<xsl:when test="字:对齐 = 'left' or 字:对齐 = 'center' or 字:对齐 = 'right'">
702							<xsl:attribute name="table:align"><xsl:value-of select="字:对齐"/></xsl:attribute>
703						</xsl:when>
704						<xsl:when test="/uof:UOF/uof:式样集/uof:文字表式样[@字:标识符=$biaoshi]/字:对齐">
705							<xsl:attribute name="table:align"><xsl:value-of select="/uof:UOF/uof:式样集/uof:文字表式样[@字:标识符=$biaoshi]/字:对齐"/></xsl:attribute>
706						</xsl:when>
707						<xsl:otherwise>
708							<xsl:attribute name="table:align">margins</xsl:attribute>
709						</xsl:otherwise>
710					</xsl:choose>
711					<xsl:if test="字:左缩进">
712						<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(number(字:左缩进),$uofUnit)"/></xsl:attribute>
713					</xsl:if>
714					<xsl:if test="字:绕排/@字:值='around'">
715						<xsl:if test="字:绕排边距/@字:上">
716							<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:绕排边距/@字:上,$uofUnit)"/></xsl:attribute>
717						</xsl:if>
718						<xsl:if test="字:绕排边距/@字:左">
719							<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(字:绕排边距/@字:左,$uofUnit)"/></xsl:attribute>
720						</xsl:if>
721						<xsl:if test="字:绕排边距/@字:右">
722							<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(字:绕排边距/@字:右,$uofUnit)"/></xsl:attribute>
723						</xsl:if>
724						<xsl:if test="字:绕排边距/@字:下">
725							<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(字:绕排边距/@字:下,$uofUnit)"/></xsl:attribute>
726						</xsl:if>
727					</xsl:if>
728					<xsl:if test="@字:式样引用">
729						<xsl:variable name="rootStyle" select="@字:式样引用"/>
730						<xsl:variable name="rootStyleNode" select="/uof:UOF/uof:式样集/字:文字表式样[@字:基式样引用 = $rootStyle]"/>
731						<xsl:variable name="paddingleft">
732							<xsl:value-of select="$rootStyleNode/字:文字表属性/字:边距/@uof:左"/>
733						</xsl:variable>
734						<xsl:variable name="paddingright">
735							<xsl:value-of select="$rootStyleNode/字:文字表属性/字:边距/@uof:右"/>
736						</xsl:variable>
737						<xsl:variable name="paddingtop">
738							<xsl:value-of select="$rootStyleNode/字:文字表属性/字:边距/@uof:上"/>
739						</xsl:variable>
740						<xsl:variable name="paddingbottom">
741							<xsl:value-of select="$rootStyleNode/字:文字表属性/字:边距/@uof:下"/>
742						</xsl:variable>
743						<xsl:if test="$rootStyleNode/字:文字表属性/字:边距/@uof:左">
744							<xsl:attribute name="fo:margin-left">-<xsl:value-of select="(number($paddingleft))* $other-to-cm-conversion-factor"/>cm</xsl:attribute>
745						</xsl:if>
746					</xsl:if>
747					<xsl:choose>
748						<xsl:when test="字:宽度/@字:相对宽度">
749							<xsl:variable name="reltblw">
750								<xsl:value-of select="字:宽度/@字:相对宽度"/>
751							</xsl:variable>
752							<xsl:variable name="pagew">
753								<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:纸张/@uof:宽度"/>
754							</xsl:variable>
755							<xsl:variable name="leftm">
756								<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:左"/>
757							</xsl:variable>
758							<xsl:variable name="rightm">
759								<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:右"/>
760							</xsl:variable>
761							<xsl:attribute name="style:rel-width"><xsl:value-of select="concat(number(字:宽度/@字:相对宽度) * 100,'%')"/></xsl:attribute>
762							<xsl:attribute name="style:width"><xsl:value-of select="concat((number($pagew)-number($leftm)-number($rightm)) * number($reltblw),$uofUnit)"/></xsl:attribute>
763						</xsl:when>
764						<xsl:when test="字:宽度/@字:绝对宽度">
765							<xsl:attribute name="style:width"><xsl:value-of select="concat(number(字:宽度/@字:绝对宽度),$uofUnit)"/></xsl:attribute>
766						</xsl:when>
767						<xsl:when test="/uof:UOF/uof:式样集/uof:文字表式样[@字:标识符=$biaoshi]/字:宽度/@字:相对宽度 or /uof:UOF/uof:式样集/uof:文字表式样[@字:标识符=$biaoshi]/字:宽度/@字:绝对宽度">
768							<xsl:attribute name="style:rel-width"><xsl:value-of select="concat(/uof:UOF/uof:式样集/uof:文字表式样[@字:标识符=$biaoshi]/字:宽度/@字:相对宽度 * 100,'%')"/></xsl:attribute>
769							<xsl:attribute name="style:width"><xsl:value-of select="/uof:UOF/uof:式样集/uof:文字表式样[@字:标识符=$biaoshi]/字:宽度/@字:绝对宽度"/></xsl:attribute>
770						</xsl:when>
771						<xsl:otherwise>
772							<xsl:variable name="pagew">
773								<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:纸张/@uof:宽度"/>
774							</xsl:variable>
775							<xsl:variable name="leftm">
776								<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:左"/>
777							</xsl:variable>
778							<xsl:variable name="rightm">
779								<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:右"/>
780							</xsl:variable>
781							<xsl:attribute name="style:width"><xsl:value-of select="concat((number($pagew)-number($leftm)-number($rightm)),$uofUnit)"/></xsl:attribute>
782						</xsl:otherwise>
783					</xsl:choose>
784					<xsl:variable name="tblsize" select="sum(字:列宽集/字:列宽)"/>
785					<xsl:if test="(not($tblsize='0')) and not(字:宽度) ">
786						<xsl:choose>
787							<xsl:when test="字:左缩进">
788								<xsl:attribute name="style:width"><xsl:value-of select="concat( number($tblsize -  字:左缩进), $uofUnit)"/></xsl:attribute>
789							</xsl:when>
790							<xsl:otherwise>
791								<xsl:attribute name="style:width"><xsl:value-of select="concat( number(sum(字:列宽集/字:列宽) ), $uofUnit)"/></xsl:attribute>
792							</xsl:otherwise>
793						</xsl:choose>
794					</xsl:if>
795					<xsl:if test="字:边框">
796						<xsl:for-each select="字:边框">
797							<xsl:call-template name="uof:边框"/>
798						</xsl:for-each>
799					</xsl:if>
800					<xsl:for-each select="字:填充">
801						<xsl:call-template name="uof:填充"/>
802					</xsl:for-each>
803				</xsl:for-each>
804			</xsl:element>
805		</xsl:element>
806	</xsl:template>
807	<xsl:template match="字:列宽集" mode="style">
808		<xsl:choose>
809			<xsl:when test="not(./字:列宽)">
810				<xsl:for-each select="../..">
811					<xsl:for-each select="字:行[1]/字:单元格">
812						<xsl:element name="style:style">
813							<xsl:attribute name="style:family">table-column</xsl:attribute>
814							<xsl:attribute name="style:name">Table<xsl:number count="字:文字表" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.C<xsl:number value="count(preceding::字:单元格)+1"/></xsl:attribute>
815							<xsl:element name="style:table-column-properties">
816								<xsl:choose>
817									<xsl:when test="字:单元格属性/字:宽度/@字:相对值">
818										<xsl:variable name="tblw1">
819											<xsl:choose>
820												<xsl:when test="../../字:文字表属性/字:宽度/@字:绝对宽度">
821													<xsl:value-of select="../../字:文字表属性/字:宽度/@字:绝对宽度"/>
822												</xsl:when>
823												<xsl:when test="../../字:文字表属性/字:宽度/@字:相对宽度">
824													<xsl:variable name="pagew">
825														<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:纸张/@uof:宽度"/>
826													</xsl:variable>
827													<xsl:variable name="leftm">
828														<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:左"/>
829													</xsl:variable>
830													<xsl:variable name="rightm">
831														<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:右"/>
832													</xsl:variable>
833													<xsl:variable name="relw">
834														<xsl:value-of select="../../字:文字表属性/字:宽度/@字:相对宽度"/>
835													</xsl:variable>
836													<xsl:value-of select=" ( number($pagew)-number($leftm)-number($rightm))* number($relw) div 100"/>
837												</xsl:when>
838												<xsl:otherwise>
839													<xsl:variable name="pagew">
840														<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:纸张/@uof:宽度"/>
841													</xsl:variable>
842													<xsl:variable name="leftm">
843														<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:左"/>
844													</xsl:variable>
845													<xsl:variable name="rightm">
846														<xsl:value-of select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页边距/@uof:右"/>
847													</xsl:variable>
848													<xsl:value-of select="(number($pagew)-number($leftm)-number($rightm))"/>
849												</xsl:otherwise>
850											</xsl:choose>
851										</xsl:variable>
852										<xsl:attribute name="style:column-width"><xsl:value-of select="concat(number(number($tblw1)*number(字:单元格属性/字:宽度/@字:相对值) div 100),$uofUnit)"/></xsl:attribute>
853									</xsl:when>
854									<xsl:when test="字:单元格属性/字:宽度/@字:绝对值">
855										<xsl:attribute name="style:column-width"><xsl:value-of select="concat(number(字:单元格属性/字:宽度/@字:绝对值),$uofUnit)"/></xsl:attribute>
856									</xsl:when>
857									<xsl:otherwise>
858										<xsl:attribute name="style:column-width"><xsl:value-of select="'1cm'"/></xsl:attribute>
859									</xsl:otherwise>
860								</xsl:choose>
861							</xsl:element>
862						</xsl:element>
863					</xsl:for-each>
864				</xsl:for-each>
865			</xsl:when>
866			<xsl:otherwise>
867				<xsl:for-each select="字:列宽">
868					<xsl:element name="style:style">
869						<xsl:attribute name="style:family">table-column</xsl:attribute>
870						<xsl:attribute name="style:name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.C<xsl:number count="字:列宽" from="/uof:UOF/uof:文字处理/字:主体" level="single" format="1"/></xsl:attribute>
871						<xsl:variable name="tableRoot" select="ancestor::字:文字表"/>
872						<xsl:element name="style:table-column-properties">
873							<xsl:choose>
874								<xsl:when test="string(.)">
875									<xsl:attribute name="style:column-width"><xsl:value-of select="concat(.,$uofUnit)"/></xsl:attribute>
876								</xsl:when>
877								<xsl:otherwise>
878									<xsl:attribute name="style:column-width"><xsl:value-of select="'1cm'"/></xsl:attribute>
879								</xsl:otherwise>
880							</xsl:choose>
881						</xsl:element>
882					</xsl:element>
883				</xsl:for-each>
884			</xsl:otherwise>
885		</xsl:choose>
886	</xsl:template>
887	<xsl:template match="字:行" mode="style">
888		<xsl:element name="style:style">
889			<xsl:attribute name="style:family">table-row</xsl:attribute>
890			<xsl:attribute name="style:name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.R<xsl:number count="字:行" from="/uof:UOF/uof:文字处理/字:主体/字:文字表[not (@字:类型='sub-table')]" level="any" format="1"/></xsl:attribute>
891			<xsl:element name="style:table-row-properties">
892				<xsl:for-each select="字:表行属性">
893					<xsl:choose>
894						<xsl:when test="字:高度/@字:固定值">
895							<xsl:attribute name="style:row-height"><xsl:value-of select="concat(number(字:高度/@字:固定值),$uofUnit)"/></xsl:attribute>
896						</xsl:when>
897						<xsl:when test="字:高度/@字:最小值">
898							<xsl:attribute name="style:min-row-height"><xsl:value-of select="concat(number(字:高度/@字:最小值), $uofUnit )"/></xsl:attribute>
899						</xsl:when>
900					</xsl:choose>
901					<xsl:attribute name="fo:keep-together"><xsl:value-of select="字:跨页/@字:值"/></xsl:attribute>
902				</xsl:for-each>
903			</xsl:element>
904		</xsl:element>
905	</xsl:template>
906	<xsl:template match="字:单元格" mode="style">
907		<style:style>
908			<xsl:attribute name="style:name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.R<xsl:number count="字:行" from="/uof:UOF/uof:文字处理/字:主体/字:文字表[not (@字:类型='sub-table')]" level="any" format="1"/>C<xsl:number count="字:单元格" from="/uof:UOF/uof:文字处理/字:主体/字:文字表[not (@字:类型='sub-table')]/字:行" level="any" format="1"/></xsl:attribute>
909			<xsl:attribute name="style:family">table-cell</xsl:attribute>
910			<xsl:element name="style:table-cell-properties">
911				<xsl:for-each select="字:单元格属性">
912					<xsl:choose>
913						<xsl:when test="字:单元格边距/@字:左">
914							<xsl:attribute name="fo:padding-left"><xsl:value-of select="concat(number(字:单元格边距/@字:左),$uofUnit)"/></xsl:attribute>
915						</xsl:when>
916						<xsl:otherwise>
917							<xsl:attribute name="fo:padding-left"><xsl:value-of select="../../../../字:文字表属性/字:默认单元格边距/@字:左"/></xsl:attribute>
918						</xsl:otherwise>
919					</xsl:choose>
920					<xsl:choose>
921						<xsl:when test="字:单元格边距/@字:右">
922							<xsl:attribute name="fo:padding-right"><xsl:value-of select="concat(number(字:单元格边距/@字:右),$uofUnit)"/></xsl:attribute>
923						</xsl:when>
924						<xsl:otherwise>
925							<xsl:attribute name="fo:padding-right"><xsl:value-of select="../../../../字:文字表属性/字:默认单元格边距/@字:右"/></xsl:attribute>
926						</xsl:otherwise>
927					</xsl:choose>
928					<xsl:choose>
929						<xsl:when test="字:单元格边距/@字:上">
930							<xsl:attribute name="fo:padding-top"><xsl:value-of select="concat(number(字:单元格边距/@字:上),$uofUnit)"/></xsl:attribute>
931						</xsl:when>
932						<xsl:otherwise>
933							<xsl:attribute name="fo:padding-top"><xsl:value-of select="../../../../字:文字表属性/字:默认单元格边距/@字:上"/></xsl:attribute>
934						</xsl:otherwise>
935					</xsl:choose>
936					<xsl:choose>
937						<xsl:when test="字:单元格边距/@字:下">
938							<xsl:attribute name="fo:padding-bottom"><xsl:value-of select="concat(number(字:单元格边距/@字:下),$uofUnit)"/></xsl:attribute>
939						</xsl:when>
940						<xsl:otherwise>
941							<xsl:attribute name="fo:padding-bottom"><xsl:value-of select="../../../../字:文字表属性/字:默认单元格边距/@字:下"/></xsl:attribute>
942						</xsl:otherwise>
943					</xsl:choose>
944					<xsl:variable name="cellbefore">
945						<xsl:value-of select="count(ancestor::字:单元格/preceding-sibling::字:单元格)"/>
946					</xsl:variable>
947					<xsl:variable name="cellafter">
948						<xsl:value-of select="count(ancestor::字:单元格/following-sibling::字:单元格)"/>
949					</xsl:variable>
950					<xsl:variable name="rowbefore">
951						<xsl:value-of select="count(ancestor::字:行/preceding-sibling::字:行)"/>
952					</xsl:variable>
953					<xsl:choose>
954						<xsl:when test="字:边框">
955							<xsl:for-each select="字:边框">
956								<xsl:call-template name="uof:边框"/>
957							</xsl:for-each>
958						</xsl:when>
959						<xsl:otherwise>
960							<xsl:choose>
961								<xsl:when test="number($cellafter) &gt; 0">
962									<xsl:attribute name="fo:border-right">none</xsl:attribute>
963								</xsl:when>
964								<xsl:otherwise>
965									<xsl:attribute name="fo:border-right">0.002cm solid #000000</xsl:attribute>
966								</xsl:otherwise>
967							</xsl:choose>
968							<xsl:attribute name="fo:border-left">0.002cm solid #000000</xsl:attribute>
969							<xsl:choose>
970								<xsl:when test="number($rowbefore) &gt; 0">
971									<xsl:attribute name="fo:border-top">none</xsl:attribute>
972								</xsl:when>
973								<xsl:otherwise>
974									<xsl:attribute name="fo:border-top">0.002cm solid #000000</xsl:attribute>
975								</xsl:otherwise>
976							</xsl:choose>
977							<xsl:attribute name="fo:border-bottom">0.002cm solid #000000</xsl:attribute>
978						</xsl:otherwise>
979					</xsl:choose>
980					<xsl:attribute name="style:vertical-align"><xsl:choose><xsl:when test="字:垂直对齐方式='center' ">middle</xsl:when><xsl:when test="字:垂直对齐方式='bottom' ">bottom</xsl:when><xsl:otherwise>top</xsl:otherwise></xsl:choose></xsl:attribute>
981					<xsl:for-each select="字:填充">
982						<xsl:call-template name="uof:填充"/>
983					</xsl:for-each>
984				</xsl:for-each>
985			</xsl:element>
986		</style:style>
987	</xsl:template>
988	<xsl:template match="uof:字体集">
989		<xsl:element name="office:font-face-decls">
990			<style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="roman" style:font-pitch="variable"/>
991			<style:font-face style:name="Times New Roman" svg:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable"/>
992			<style:font-face style:name="Symbol" svg:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
993			<style:font-face style:name="Courier New" svg:font-family="'Courier New'" style:font-family-generic="modern" style:font-pitch="fixed"/>
994			<xsl:if test="not(uof:字体声明[@uof:名称='StarSymbol'])">
995				<style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
996			</xsl:if>
997			<xsl:for-each select="uof:字体声明">
998				<xsl:element name="style:font-face">
999					<xsl:attribute name="style:name"><xsl:value-of select="@uof:标识符"/></xsl:attribute>
1000					<xsl:attribute name="svg:font-family"><xsl:value-of select="@uof:名称"/></xsl:attribute>
1001					<xsl:if test="@uof:字符集 = '02'">
1002						<xsl:attribute name="style:font-charset">x-symbol</xsl:attribute>
1003					</xsl:if>
1004					<xsl:if test="@uof:字体族">
1005						<xsl:choose>
1006							<xsl:when test="@uof:字体族 = 'Swiss'">
1007								<xsl:attribute name="style:font-family-generic">swiss</xsl:attribute>
1008							</xsl:when>
1009							<xsl:when test="@uof:字体族 ='Modern'">
1010								<xsl:attribute name="style:font-family-generic">modern</xsl:attribute>
1011							</xsl:when>
1012							<xsl:when test="@uof:字体族='Roman'">
1013								<xsl:attribute name="style:font-family-generic">roman</xsl:attribute>
1014							</xsl:when>
1015							<xsl:when test="@uof:字体族 ='Script'">
1016								<xsl:attribute name="style:font-family-generic">script</xsl:attribute>
1017							</xsl:when>
1018							<xsl:when test="@uof:字体族 ='Decorative'">
1019								<xsl:attribute name="style:font-family-generic">decorative</xsl:attribute>
1020							</xsl:when>
1021							<xsl:when test="@uof:字体族 ='System'">
1022								<xsl:attribute name="style:font-family-generic">system</xsl:attribute>
1023							</xsl:when>
1024							<xsl:otherwise>
1025								<xsl:attribute name="style:font-family-generic">system</xsl:attribute>
1026							</xsl:otherwise>
1027						</xsl:choose>
1028					</xsl:if>
1029					<xsl:attribute name="style:font-pitch">12</xsl:attribute>
1030				</xsl:element>
1031			</xsl:for-each>
1032			<xsl:apply-templates select="uof:字体声明"/>
1033		</xsl:element>
1034	</xsl:template>
1035	<xsl:template match="uof:式样">
1036		<xsl:element name="style:text-properties">
1037			<xsl:apply-templates select="uof:句式样/*"/>
1038			<xsl:apply-templates select="uof:段落式样/*"/>
1039			<xsl:call-template name="paragraph-properties"/>
1040		</xsl:element>
1041	</xsl:template>
1042	<xsl:template match="uof:段落式样"/>
1043	<xsl:template match="uof:句式样"/>
1044	<xsl:template match="字:公用处理规则">
1045		<xsl:apply-templates select="uof:文字处理/字:公用处理规则/字:文档设置"/>
1046	</xsl:template>
1047	<xsl:template match="uof:文字处理/字:公用处理规则/字:文档设置">
1048		<office:settings>
1049			<config:config-item-set config:name="ooo:view-settings">
1050				<config:config-item config:name="InBrowseMode" config:type="boolean">
1051					<xsl:choose>
1052						<xsl:when test="字:当前视图='web'">true</xsl:when>
1053						<xsl:otherwise>false</xsl:otherwise>
1054					</xsl:choose>
1055				</config:config-item>
1056				<config:config-item-map-indexed config:name="Views">
1057					<config:config-item-map-entry>
1058						<xsl:if test="字:缩放">
1059							<config:config-item config:name="VisibleRight" config:type="int">1</config:config-item>
1060							<config:config-item config:name="VisibleBottom" config:type="int">1</config:config-item>
1061							<xsl:choose>
1062								<xsl:when test="字:缩放 = 'best-fit'">
1063									<config:config-item config:name="ZoomType" config:type="short">3</config:config-item>
1064								</xsl:when>
1065								<xsl:when test="字:缩放 = 'full-page'">
1066									<config:config-item config:name="ZoomType" config:type="short">2</config:config-item>
1067								</xsl:when>
1068								<xsl:when test="字:缩放 = 'text-fit'">
1069									<config:config-item config:name="ZoomType" config:type="short">1</config:config-item>
1070								</xsl:when>
1071								<xsl:otherwise>
1072									<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
1073								</xsl:otherwise>
1074							</xsl:choose>
1075							<config:config-item config:name="ZoomFactor" config:type="short">
1076								<xsl:value-of select="字:缩放"/>
1077							</config:config-item>
1078						</xsl:if>
1079					</config:config-item-map-entry>
1080				</config:config-item-map-indexed>
1081			</config:config-item-set>
1082			<config:config-item-set config:name="configuration-settings">
1083				<config:config-item-map-indexed config:name="ForbiddenCharacters">
1084					<config:config-item-map-entry>
1085						<config:config-item config:name="Language" config:type="string">zh</config:config-item>
1086						<config:config-item config:name="Country" config:type="string">CN</config:config-item>
1087						<config:config-item config:name="Variant" config:type="string"/>
1088						<config:config-item config:name="BeginLine" config:type="string">
1089							<xsl:choose>
1090								<xsl:when test="字:标点禁则/字:行首字符 or *[@uof:locID='t0007']/*[@uof:locID='t0008']">
1091									<xsl:value-of select="*[@uof:locID='t0007']/*[@uof:locID='t0008']"/>
1092								</xsl:when>
1093								<xsl:otherwise>:!),.:;?]}_'"、。〉》」』】〕〗〞︰︱︳﹐_﹒﹔﹕﹖﹗﹚﹜﹞!),.:;?|}︴︶︸︺︼︾﹀﹂﹄﹏_~¢々‖_·ˇˉ―--′</xsl:otherwise>
1094							</xsl:choose>
1095						</config:config-item>
1096						<config:config-item config:name="EndLine" config:type="string">
1097							<xsl:choose>
1098								<xsl:when test="字:标点禁则/字:行尾字符 or  *[@uof:locID='t0007']/*[@uof:locID='t0009']">
1099									<xsl:value-of select="*[@uof:locID='t0007']/*[@uof:locID='t0009']"/>
1100								</xsl:when>
1101								<xsl:otherwise>([{__'"‵〈《「『【〔〖([{£¥〝︵︷︹︻︽︿﹁﹃﹙﹛﹝({</xsl:otherwise>
1102							</xsl:choose>
1103						</config:config-item>
1104					</config:config-item-map-entry>
1105				</config:config-item-map-indexed>
1106			</config:config-item-set>
1107		</office:settings>
1108	</xsl:template>
1109	<xsl:template match="uof:文字处理">
1110		<xsl:element name="office:body">
1111			<xsl:element name="office:text">
1112				<xsl:call-template name="GenerateTrackChanges"/>
1113				<text:sequence-decls>
1114					<xsl:call-template name="default_seqence_declaration"/>
1115				</text:sequence-decls>
1116				<xsl:apply-templates/>
1117			</xsl:element>
1118		</xsl:element>
1119	</xsl:template>
1120	<xsl:template name="default_seqence_declaration">
1121		<text:sequence-decl text:display-outline-level="0" text:name="Illustration">
1122			</text:sequence-decl>
1123		<text:sequence-decl text:display-outline-level="0" text:name="Table">
1124			</text:sequence-decl>
1125		<text:sequence-decl text:display-outline-level="0" text:name="Text">
1126			</text:sequence-decl>
1127		<text:sequence-decl text:display-outline-level="0" text:name="Drawing">
1128			</text:sequence-decl>
1129		<text:sequence-decl text:display-outline-level="0" text:name="AutoNr">
1130			</text:sequence-decl>
1131	</xsl:template>
1132	<xsl:template name="段落" match="字:段落[not((preceding-sibling::字:段落/字:域开始) and (not(preceding-sibling::字:段落/字:域结束)))][not(字:段落属性[字:自动编号信息])]">
1133		<xsl:if test="字:域开始/@字:类型='caption'">
1134			<xsl:apply-templates select="字:域代码"/>
1135		</xsl:if>
1136		<xsl:if test="字:域开始/@字:类型='REF'">
1137			<xsl:call-template name="目录域"/>
1138		</xsl:if>
1139		<xsl:if test="字:域开始/@字:类型='INDEX'">
1140			<xsl:call-template name="索引域"/>
1141		</xsl:if>
1142		<xsl:choose>
1143			<xsl:when test="string(parent::node()/@uof:locID)='t0107'">
1144				<xsl:apply-templates select="字:脚注"/>
1145			</xsl:when>
1146			<xsl:when test="string(parent::node()/@uof:locID)='t0108'">
1147				<xsl:apply-templates select="字:尾注"/>
1148			</xsl:when>
1149			<xsl:otherwise>
1150				<xsl:call-template name="commonParagraph"/>
1151			</xsl:otherwise>
1152		</xsl:choose>
1153	</xsl:template>
1154	<xsl:template match="字:脚注">
1155		<xsl:element name="text:note">
1156			<xsl:attribute name="text:note-class">footnote</xsl:attribute>
1157			<xsl:element name="text:note-citation">
1158				<xsl:attribute name="text:label"><xsl:value-of select="@字:引文体"/></xsl:attribute>
1159				<xsl:value-of select="@字:引文体"/>
1160			</xsl:element>
1161			<xsl:element name="text:note-body">
1162				<xsl:for-each select="字:段落">
1163					<xsl:call-template name="commonParagraph"/>
1164				</xsl:for-each>
1165			</xsl:element>
1166		</xsl:element>
1167	</xsl:template>
1168	<xsl:template match="字:尾注">
1169		<xsl:element name="text:note">
1170			<xsl:attribute name="text:note-class">endnote</xsl:attribute>
1171			<xsl:element name="text:note-citation">
1172				<xsl:attribute name="text:label"><xsl:value-of select="@字:引文体"/></xsl:attribute>
1173				<xsl:value-of select="@字:引文体"/>
1174			</xsl:element>
1175			<xsl:element name="text:note-body">
1176				<xsl:for-each select="字:段落">
1177					<xsl:call-template name="commonParagraph"/>
1178				</xsl:for-each>
1179			</xsl:element>
1180		</xsl:element>
1181	</xsl:template>
1182	<xsl:template match="字:锚点">
1183		<xsl:call-template name="图形解析"/>
1184	</xsl:template>
1185	<xsl:key match="/uof:UOF/uof:文字处理/字:主体/字:段落/字:句/字:锚点 | /uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页眉//字:锚点 | /uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:页脚//字:锚点" name="rel_graphic_name" use="字:图形/@字:图形引用"/>
1186	<xsl:template match="图:图形">
1187		<xsl:variable name="random-name">
1188			<xsl:value-of select="generate-id()"/>
1189		</xsl:variable>
1190		<xsl:variable name="draw-name">
1191			<xsl:value-of select="substring($random-name,string-length($random-name)-1)"/>
1192		</xsl:variable>
1193		<xsl:call-template name="graphic-fill">
1194			<xsl:with-param name="draw-name" select="$draw-name"/>
1195			<xsl:with-param name="gradient-name" select="图:预定义图形/图:属性/图:填充/图:渐变"/>
1196		</xsl:call-template>
1197		<xsl:choose>
1198			<xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变 | 图:预定义图形/图:属性/图:填充/图:颜色 | 图:预定义图形/图:属性/图:填充/图:图片 | 图:预定义图形/图:属性/图:填充/图:位图">
1199				<xsl:element name="style:style">
1200					<xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
1201					<xsl:attribute name="style:family">graphic</xsl:attribute>
1202					<xsl:if test="图:文本内容/@图:自动换行='true' or 图:文本内容/@图:自动换行='1'">
1203						<xsl:attribute name="draw:fit-to-contour">true</xsl:attribute>
1204					</xsl:if>
1205					<xsl:element name="style:graphic-properties">
1206						<xsl:call-template name="process-graphics">
1207							<xsl:with-param name="draw-name" select="$draw-name"/>
1208						</xsl:call-template>
1209					</xsl:element>
1210					<xsl:if test="图:文本内容/@图:文字排列方向">
1211						<xsl:choose>
1212							<xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'">
1213								<style:paragraph-properties style:writing-mode="tb-rl"/>
1214							</xsl:when>
1215							<xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'">
1216								<style:paragraph-properties style:writing-mode="tb-rl"/>
1217							</xsl:when>
1218						</xsl:choose>
1219					</xsl:if>
1220				</xsl:element>
1221			</xsl:when>
1222			<xsl:otherwise>
1223				<xsl:element name="style:style">
1224					<xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
1225					<xsl:attribute name="style:family">graphic</xsl:attribute>
1226					<xsl:element name="style:graphic-properties">
1227						<xsl:if test="@图:其他对象 or key('rel_graphic_name',@图:标识符)/字:锚点属性/字:锚点属性/字:位置/字:垂直/字:相对/@字:相对于">
1228							<xsl:attribute name="fo:clip">rect(0cm 0cm 0cm 0cm)</xsl:attribute>
1229							<xsl:attribute name="draw:color-mode">standard</xsl:attribute>
1230							<xsl:attribute name="draw:luminance">0%</xsl:attribute>
1231							<xsl:attribute name="draw:contrast">0%</xsl:attribute>
1232							<xsl:attribute name="draw:gamma">100%</xsl:attribute>
1233							<xsl:attribute name="draw:red">0%</xsl:attribute>
1234							<xsl:attribute name="draw:green">0%</xsl:attribute>
1235							<xsl:attribute name="draw:blue">0%</xsl:attribute>
1236							<xsl:attribute name="draw:image-opacity">100%</xsl:attribute>
1237							<xsl:attribute name="style:mirror">none</xsl:attribute>
1238						</xsl:if>
1239						<xsl:call-template name="process-graphics"/>
1240					</xsl:element>
1241					<xsl:if test="图:文本内容/@图:文字排列方向">
1242						<xsl:choose>
1243							<xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'">
1244								<style:paragraph-properties style:writing-mode="tb-rl"/>
1245							</xsl:when>
1246							<xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'">
1247								<style:paragraph-properties style:writing-mode="tb-rl"/>
1248							</xsl:when>
1249						</xsl:choose>
1250					</xsl:if>
1251				</xsl:element>
1252			</xsl:otherwise>
1253		</xsl:choose>
1254	</xsl:template>
1255	<xsl:template name="bina_graphic">
1256		<xsl:param name="refGraphic"/>
1257		<xsl:element name="office:binary-data">
1258			<xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符 = $refGraphic]">
1259				<xsl:value-of select="uof:数据"/>
1260			</xsl:for-each>
1261		</xsl:element>
1262		<text:p/>
1263	</xsl:template>
1264	<xsl:template name="graphic-fill">
1265		<xsl:param name="draw-name"/>
1266		<xsl:param name="gradient-name"/>
1267		<xsl:if test="图:预定义图形/图:属性/图:填充/图:渐变">
1268			<xsl:element name="draw:gradient">
1269				<xsl:attribute name="draw:name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
1270				<xsl:attribute name="draw:style"><xsl:choose><xsl:when test="$gradient-name/@图:种子类型='linear'"><xsl:value-of select="'linear'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='radar'"><xsl:value-of select="'radial'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='oval'"><xsl:value-of select="'ellipsoid'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='square'"><xsl:value-of select="'square'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='rectangle'"><xsl:value-of select="'rectangular'"/></xsl:when></xsl:choose></xsl:attribute>
1271				<xsl:attribute name="draw:start-color"><xsl:value-of select="$gradient-name/@图:起始色"/></xsl:attribute>
1272				<xsl:attribute name="draw:end-color"><xsl:value-of select="$gradient-name/@图:终止色"/></xsl:attribute>
1273				<xsl:attribute name="draw:start-intensity"><xsl:value-of select="concat($gradient-name/@图:起始浓度,'%')"/></xsl:attribute>
1274				<xsl:attribute name="draw:end-intensity"><xsl:value-of select="concat($gradient-name/@图:终止浓度,'%')"/></xsl:attribute>
1275				<xsl:attribute name="draw:angle"><xsl:value-of select="$gradient-name/@图:渐变方向 * 10"/></xsl:attribute>
1276				<xsl:attribute name="draw:border"><xsl:value-of select="concat($gradient-name/@图:边界,'%')"/></xsl:attribute>
1277				<xsl:if test="$gradient-name/@图:种子X位置">
1278					<xsl:attribute name="draw:cx"><xsl:value-of select="concat($gradient-name/@图:种子X位置,'%')"/></xsl:attribute>
1279				</xsl:if>
1280				<xsl:if test="$gradient-name/@图:种子Y位置">
1281					<xsl:attribute name="draw:cy"><xsl:value-of select="concat($gradient-name/@图:种子Y位置,'%')"/></xsl:attribute>
1282				</xsl:if>
1283			</xsl:element>
1284		</xsl:if>
1285		<xsl:if test="图:预定义图形/图:属性/图:前端箭头">
1286			<xsl:element name="draw:marker">
1287				<xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute>
1288				<xsl:choose>
1289					<xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">
1290						<xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute>
1291						<xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute>
1292					</xsl:when>
1293					<xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">
1294						<xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute>
1295						<xsl:attribute name="svg:d">m0 2108v17 17l12 42 30 34 38 21 43 4 29-8 30-21 25-26 13-34 343-1532 339 1520 13 42 29 34 39 21 42 4 42-12 34-30 21-42v-39-12l-4 4-440-1998-9-42-25-39-38-25-43-8-42 8-38 25-26 39-8 42z</xsl:attribute>
1296					</xsl:when>
1297					<xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">
1298						<xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute>
1299						<xsl:attribute name="svg:d">m1013 1491 118 89-567-1580-564 1580 114-85 136-68 148-46 161-17 161 13 153 46z</xsl:attribute>
1300					</xsl:when>
1301					<xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">
1302						<xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
1303						<xsl:attribute name="svg:d">m462 1118-102-29-102-51-93-72-72-93-51-102-29-102-13-105 13-102 29-106 51-102 72-89 93-72 102-50 102-34 106-9 101 9 106 34 98 50 93 72 72 89 51 102 29 106 13 102-13 105-29 102-51 102-72 93-93 72-98 51-106 29-101 13z</xsl:attribute>
1304					</xsl:when>
1305					<xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">
1306						<xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
1307						<xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute>
1308					</xsl:when>
1309				</xsl:choose>
1310			</xsl:element>
1311		</xsl:if>
1312		<xsl:if test="图:预定义图形/图:属性/图:后端箭头">
1313			<xsl:element name="draw:marker">
1314				<xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute>
1315				<xsl:choose>
1316					<xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">
1317						<xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute>
1318						<xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute>
1319					</xsl:when>
1320					<xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">
1321						<xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute>
1322						<xsl:attribute name="svg:d">m0 2108v17 17l12 42 30 34 38 21 43 4 29-8 30-21 25-26 13-34 343-1532 339 1520 13 42 29 34 39 21 42 4 42-12 34-30 21-42v-39-12l-4 4-440-1998-9-42-25-39-38-25-43-8-42 8-38 25-26 39-8 42z</xsl:attribute>
1323					</xsl:when>
1324					<xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">
1325						<xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute>
1326						<xsl:attribute name="svg:d">m1013 1491 118 89-567-1580-564 1580 114-85 136-68 148-46 161-17 161 13 153 46z</xsl:attribute>
1327					</xsl:when>
1328					<xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">
1329						<xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
1330						<xsl:attribute name="svg:d">m462 1118-102-29-102-51-93-72-72-93-51-102-29-102-13-105 13-102 29-106 51-102 72-89 93-72 102-50 102-34 106-9 101 9 106 34 98 50 93 72 72 89 51 102 29 106 13 102-13 105-29 102-51 102-72 93-93 72-98 51-106 29-101 13z</xsl:attribute>
1331					</xsl:when>
1332					<xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">
1333						<xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
1334						<xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute>
1335					</xsl:when>
1336				</xsl:choose>
1337			</xsl:element>
1338		</xsl:if>
1339		<xsl:if test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用 or 图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用">
1340			<xsl:element name="draw:fill-image">
1341				<xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:类型"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/></xsl:when></xsl:choose></xsl:when></xsl:choose></xsl:attribute>
1342				<xsl:call-template name="bina_graphic">
1343					<xsl:with-param name="refGraphic">
1344						<xsl:choose>
1345							<xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用">
1346								<xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"/>
1347							</xsl:when>
1348							<xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:名称">
1349								<xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/>
1350							</xsl:when>
1351							<xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用">
1352								<xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/>
1353							</xsl:when>
1354						</xsl:choose>
1355					</xsl:with-param>
1356				</xsl:call-template>
1357			</xsl:element>
1358		</xsl:if>
1359		<xsl:if test="not(图:预定义图形/图:属性/图:线型='single') and not(图:预定义图形/图:属性/图:线型='thick') and 图:预定义图形/图:属性/图:线型">
1360			<xsl:variable name="line" select="图:预定义图形/图:属性/图:线型"/>
1361			<xsl:element name="draw:stroke-dash">
1362				<xsl:choose>
1363					<xsl:when test="$line='dash-long' or $line='dash-long-heavy'">
1364						<xsl:attribute name="draw:name">Fine_20_Dashed</xsl:attribute>
1365						<xsl:attribute name="draw:style">rect</xsl:attribute>
1366						<xsl:attribute name="draw:dots1">1</xsl:attribute>
1367						<xsl:attribute name="draw:dots1-length">0.508cm</xsl:attribute>
1368						<xsl:attribute name="draw:dots2">1</xsl:attribute>
1369						<xsl:attribute name="draw:dots2-length">0.508cm</xsl:attribute>
1370						<xsl:attribute name="draw:distance">0.508cm</xsl:attribute>
1371					</xsl:when>
1372					<xsl:when test="$line='dot-dot-dash' or $line='dash-dot-dot-heavy'">
1373						<xsl:attribute name="draw:name">2 Dots 1 Dash</xsl:attribute>
1374						<xsl:attribute name="draw:style">rect</xsl:attribute>
1375						<xsl:attribute name="draw:dots1">2</xsl:attribute>
1376						<xsl:attribute name="draw:dots2">1</xsl:attribute>
1377						<xsl:attribute name="draw:dots2-length">0.203cm</xsl:attribute>
1378						<xsl:attribute name="draw:distance">0.203cm</xsl:attribute>
1379					</xsl:when>
1380					<xsl:when test="$line='dash' or $line='dashed-heavy'">
1381						<xsl:attribute name="draw:name">Ultrafine Dashed</xsl:attribute>
1382						<xsl:attribute name="draw:style">rect</xsl:attribute>
1383						<xsl:attribute name="draw:dots1">1</xsl:attribute>
1384						<xsl:attribute name="draw:dots1-length">0.051cm</xsl:attribute>
1385						<xsl:attribute name="draw:dots2">1</xsl:attribute>
1386						<xsl:attribute name="draw:dots2-length">0.051cm</xsl:attribute>
1387						<xsl:attribute name="draw:distance">0.051cm</xsl:attribute>
1388					</xsl:when>
1389					<xsl:when test="$line='dotted' or $line='dotted-heavy'">
1390						<xsl:attribute name="draw:name">Ultrafine Dotted (var)</xsl:attribute>
1391						<xsl:attribute name="draw:style">rect</xsl:attribute>
1392						<xsl:attribute name="draw:dots1">1</xsl:attribute>
1393						<xsl:attribute name="draw:distance">50%</xsl:attribute>
1394					</xsl:when>
1395					<xsl:when test="$line='wave' or $line='wavy-heavy'">
1396						<xsl:attribute name="draw:name">Ultrafine 2 Dots 3 Dashes</xsl:attribute>
1397						<xsl:attribute name="draw:style">rect</xsl:attribute>
1398						<xsl:attribute name="draw:dots1">2</xsl:attribute>
1399						<xsl:attribute name="draw:dots1-length">0.051cm</xsl:attribute>
1400						<xsl:attribute name="draw:dots2">3</xsl:attribute>
1401						<xsl:attribute name="draw:dots2-length">0.254cm</xsl:attribute>
1402						<xsl:attribute name="draw:distance">0.127cm</xsl:attribute>
1403					</xsl:when>
1404					<xsl:when test="$line='dot-dash' or $line='dash-dot-heavy'">
1405						<xsl:attribute name="draw:name">3 Dashes 3 Dots (var)</xsl:attribute>
1406						<xsl:attribute name="draw:style">rect</xsl:attribute>
1407						<xsl:attribute name="draw:dots1">3</xsl:attribute>
1408						<xsl:attribute name="draw:dots1-length">197%</xsl:attribute>
1409						<xsl:attribute name="draw:dots2">3</xsl:attribute>
1410						<xsl:attribute name="draw:distance">100%</xsl:attribute>
1411					</xsl:when>
1412					<xsl:when test="$line='double'">
1413						<xsl:attribute name="draw:name">Line with Fine Dots</xsl:attribute>
1414						<xsl:attribute name="draw:style">rect</xsl:attribute>
1415						<xsl:attribute name="draw:dots1">1</xsl:attribute>
1416						<xsl:attribute name="draw:dots1-length">2.007cm</xsl:attribute>
1417						<xsl:attribute name="draw:dots2">10</xsl:attribute>
1418						<xsl:attribute name="draw:distance">0.152cm</xsl:attribute>
1419					</xsl:when>
1420					<xsl:when test="$line='wavy-double'">
1421						<xsl:attribute name="draw:name">Fine Dashed (var)</xsl:attribute>
1422						<xsl:attribute name="draw:style">rect</xsl:attribute>
1423						<xsl:attribute name="draw:dots1">1</xsl:attribute>
1424						<xsl:attribute name="draw:dots1-length">197%</xsl:attribute>
1425						<xsl:attribute name="draw:distance">197%</xsl:attribute>
1426					</xsl:when>
1427					<xsl:otherwise>
1428						<xsl:attribute name="draw:name">Fine Dashed</xsl:attribute>
1429						<xsl:attribute name="draw:style">rect</xsl:attribute>
1430						<xsl:attribute name="draw:dots1">1</xsl:attribute>
1431						<xsl:attribute name="draw:dots1-length">0.508cm</xsl:attribute>
1432						<xsl:attribute name="draw:dots2">1</xsl:attribute>
1433						<xsl:attribute name="draw:dots2-length">0.508cm</xsl:attribute>
1434						<xsl:attribute name="draw:distance">0.508cm</xsl:attribute>
1435					</xsl:otherwise>
1436				</xsl:choose>
1437			</xsl:element>
1438		</xsl:if>
1439	</xsl:template>
1440	<xsl:template name="process-graphics">
1441		<xsl:param name="draw-name"/>
1442		<xsl:if test="图:预定义图形/图:类别">
1443		</xsl:if>
1444		<xsl:for-each select="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:位置/字:垂直">
1445			<xsl:attribute name="style:vertical-pos"><xsl:choose><xsl:when test="字:绝对">from-top</xsl:when><xsl:when test="字:相对/@字:值='bottom'">bottom</xsl:when><xsl:when test="字:相对/@字:值='center'">middle</xsl:when><xsl:when test="字:相对/@字:值='inside'">below</xsl:when><xsl:otherwise>top</xsl:otherwise></xsl:choose></xsl:attribute>
1446			<xsl:attribute name="style:vertical-rel"><xsl:choose><xsl:when test="@字:相对于='margin'">paragraph-content</xsl:when><xsl:otherwise><xsl:value-of select="@字:相对于"/></xsl:otherwise></xsl:choose></xsl:attribute>
1447		</xsl:for-each>
1448		<xsl:for-each select="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:位置/字:水平">
1449			<xsl:attribute name="style:horizontal-pos"><xsl:choose><xsl:when test="字:绝对">from-left</xsl:when><xsl:otherwise><xsl:value-of select="字:相对/@字:值"/></xsl:otherwise></xsl:choose></xsl:attribute>
1450			<xsl:attribute name="style:horizontal-rel"><xsl:choose><xsl:when test="@字:相对于='margin'">paragraph</xsl:when><xsl:when test="@字:相对于='page'">page</xsl:when><xsl:when test="@字:相对于='column'">paragraph</xsl:when><xsl:when test="@字:相对于='char'">char</xsl:when></xsl:choose></xsl:attribute>
1451		</xsl:for-each>
1452		<xsl:variable name="wrap_type">
1453			<xsl:value-of select="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:绕排/@字:绕排方式"/>
1454		</xsl:variable>
1455		<xsl:variable name="aa">
1456			<xsl:value-of select="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:绕排/@字:绕排顶点"/>
1457		</xsl:variable>
1458		<xsl:for-each select="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:绕排/@字:绕排方式">
1459			<xsl:attribute name="style:wrap"><xsl:choose><xsl:when test="$wrap_type = 'through'">run-through</xsl:when><xsl:when test="$wrap_type = 'tight'">right</xsl:when><xsl:when test="$wrap_type = 'square'">parallel</xsl:when><xsl:when test="$wrap_type = 'top-bottom'">dynamic</xsl:when><xsl:when test="$wrap_type = 'infrontoftext'">run-through</xsl:when><xsl:when test="$wrap_type = 'behindtext'">run-through</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute>
1460			<xsl:attribute name="style:run-through"><xsl:choose><xsl:when test="$wrap_type = 'behindtext'">background</xsl:when><xsl:otherwise>foreground</xsl:otherwise></xsl:choose></xsl:attribute>
1461		</xsl:for-each>
1462		<xsl:if test="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:边距">
1463			<xsl:for-each select="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:边距">
1464				<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(@字:上,$uofUnit)"/></xsl:attribute>
1465				<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(@字:下,$uofUnit)"/></xsl:attribute>
1466				<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(@字:右,$uofUnit)"/></xsl:attribute>
1467				<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(@字:左,$uofUnit)"/></xsl:attribute>
1468			</xsl:for-each>
1469		</xsl:if>
1470		<xsl:if test="key('rel_graphic_name',@图:标识符)/字:锚点属性/字:保护/@字:值='true'">
1471			<xsl:choose>
1472				<xsl:when test="图:预定义图形/图:名称">
1473					<xsl:attribute name="style:protect">position size</xsl:attribute>
1474				</xsl:when>
1475				<xsl:otherwise>
1476					<xsl:attribute name="style:protect">content size position</xsl:attribute>
1477					<xsl:attribute name="draw:size-protect">true</xsl:attribute>
1478					<xsl:attribute name="draw:move-protect">true</xsl:attribute>
1479				</xsl:otherwise>
1480			</xsl:choose>
1481		</xsl:if>
1482		<xsl:if test="图:预定义图形/图:名称">
1483			<xsl:choose>
1484				<xsl:when test="图:预定义图形/图:名称='椭圆'">
1485				</xsl:when>
1486			</xsl:choose>
1487		</xsl:if>
1488		<xsl:choose>
1489			<xsl:when test="not(图:预定义图形/图:属性/图:填充)">
1490				<xsl:attribute name="draw:fill">none</xsl:attribute>
1491			</xsl:when>
1492			<xsl:when test="图:预定义图形/图:属性/图:填充/图:图片">
1493				<xsl:choose>
1494					<xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:名称='background-image'">
1495						<xsl:element name="style:background-image">
1496							<xsl:element name="office:binary-data">
1497								<xsl:variable name="biaoshi">
1498									<xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/>
1499								</xsl:variable>
1500								<xsl:value-of select="ancestor::uof:对象集/uof:其他对象[@uof:标识符=$biaoshi]/uof:数据"/>
1501							</xsl:element>
1502						</xsl:element>
1503					</xsl:when>
1504					<xsl:otherwise>
1505						<xsl:attribute name="draw:fill">bitmap</xsl:attribute>
1506						<xsl:attribute name="draw:fill-image-name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/></xsl:when></xsl:choose></xsl:attribute>
1507						<xsl:if test="not(图:预定义图形/图:属性/图:填充/图:图片/@图:位置='tile')">
1508							<xsl:attribute name="style:repeat"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:位置='center'">no-repeat</xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:位置='stretch'">stretch</xsl:when></xsl:choose></xsl:attribute>
1509						</xsl:if>
1510					</xsl:otherwise>
1511				</xsl:choose>
1512			</xsl:when>
1513			<xsl:when test="图:预定义图形/图:属性/图:填充/图:图案">
1514				<xsl:attribute name="draw:fill">bitmap</xsl:attribute>
1515				<xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:前景色"/></xsl:attribute>
1516			</xsl:when>
1517			<xsl:when test="图:预定义图形/图:属性/图:填充/图:颜色">
1518				<xsl:attribute name="draw:fill">solid</xsl:attribute>
1519				<xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:颜色"/></xsl:attribute>
1520				<xsl:attribute name="fo:background-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:颜色"/></xsl:attribute>
1521			</xsl:when>
1522			<xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变">
1523				<xsl:attribute name="draw:fill">gradient</xsl:attribute>
1524				<xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:渐变/@图:起始色"/></xsl:attribute>
1525				<xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
1526			</xsl:when>
1527		</xsl:choose>
1528		<xsl:if test="图:预定义图形/图:属性/图:线颜色">
1529			<xsl:attribute name="svg:stroke-color"><xsl:value-of select="图:预定义图形/图:属性/图:线颜色"/></xsl:attribute>
1530		</xsl:if>
1531		<xsl:if test="图:预定义图形/图:属性/图:线型 and not(图:预定义图形/图:属性/图:线型 = 'single') and not(图:预定义图形/图:属性/图:线型 = 'thick')">
1532			<xsl:variable name="linetype" select="图:预定义图形/图:属性/图:线型"/>
1533			<xsl:attribute name="draw:stroke"><xsl:choose><xsl:when test="$linetype='none'">none</xsl:when><xsl:otherwise>dash</xsl:otherwise></xsl:choose></xsl:attribute>
1534			<xsl:if test="$linetype='none'">
1535				<xsl:attribute name="fo:border">none</xsl:attribute>
1536			</xsl:if>
1537			<xsl:attribute name="draw:stroke-dash"><xsl:choose><xsl:when test="$linetype='dot-dot-dash' or $linetype='dash-dot-dot-heavy'">2 Dots 1 Dash</xsl:when><xsl:when test="$linetype='dash' or $linetype='dashed-heavy'">Ultrafine_20_Dashed</xsl:when><xsl:when test="$linetype='dotted' or $linetype='dotted-heavy'">Ultrafine Dotted (var)</xsl:when><xsl:when test="$linetype='double'">Line with Fine Dots</xsl:when><xsl:when test="$linetype='dot-dash' or $linetype='dash-dot-heavy'">3 Dashes 3 Dots (var)</xsl:when><xsl:when test="$linetype='wave' or $linetype='wavy-heavy'">Ultrafine 2 Dots 3 Dashes</xsl:when><xsl:when test="$linetype='wavy-double'">Fine Dashed (var)</xsl:when><xsl:otherwise>Fine Dashed</xsl:otherwise></xsl:choose></xsl:attribute>
1538		</xsl:if>
1539		<xsl:if test="图:预定义图形/图:属性/图:线粗细">
1540			<xsl:attribute name="svg:stroke-width"><xsl:value-of select="concat(图:预定义图形/图:属性/图:线粗细,$uofUnit)"/></xsl:attribute>
1541		</xsl:if>
1542		<xsl:if test="图:预定义图形/图:属性/图:前端箭头">
1543			<xsl:attribute name="draw:marker-start"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute>
1544			<xsl:if test="图:预定义图形/图:属性/图:前端箭头/图:大小">
1545				<xsl:attribute name="draw:marker-start-width"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '1'"><xsl:value-of select="concat('0.05',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '2'"><xsl:value-of select="concat('0.10',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '3'"><xsl:value-of select="concat('0.15',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '4'"><xsl:value-of select="concat('0.20',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '5'"><xsl:value-of select="concat('0.25',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '6'"><xsl:value-of select="concat('0.30',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '7'"><xsl:value-of select="concat('0.35',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '8'"><xsl:value-of select="concat('0.40',$uofUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('0.45',$uofUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute>
1546			</xsl:if>
1547		</xsl:if>
1548		<xsl:if test="图:预定义图形/图:属性/图:后端箭头">
1549			<xsl:attribute name="draw:marker-end"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">Line Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">Arrow concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">Square 45</xsl:when></xsl:choose></xsl:attribute>
1550			<xsl:if test="图:预定义图形/图:属性/图:后端箭头/图:大小">
1551				<xsl:attribute name="draw:marker-end-width"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '1'"><xsl:value-of select="concat('0.05',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '2'"><xsl:value-of select="concat('0.10',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '3'"><xsl:value-of select="concat('0.15',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '4'"><xsl:value-of select="concat('0.20',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '5'"><xsl:value-of select="concat('0.25',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '6'"><xsl:value-of select="concat('0.30',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '7'"><xsl:value-of select="concat('0.35',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '8'"><xsl:value-of select="concat('0.40',$uofUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('0.45',$uofUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute>
1552			</xsl:if>
1553		</xsl:if>
1554		<xsl:if test="图:预定义图形/图:属性/图:宽度">
1555		</xsl:if>
1556		<xsl:if test="图:预定义图形/图:属性/图:高度">
1557		</xsl:if>
1558		<xsl:if test="图:预定义图形/图:属性/图:旋转角度">
1559		</xsl:if>
1560		<xsl:if test="图:预定义图形/图:属性/图:锁定纵横比">
1561		</xsl:if>
1562		<xsl:if test="图:预定义图形/图:属性/图:打印对象">
1563		</xsl:if>
1564		<xsl:if test="图:预定义图形/图:属性/图:透明度">
1565			<xsl:attribute name="draw:opacity"><xsl:value-of select="concat((100 - 图:预定义图形/图:属性/图:透明度),'%')"/></xsl:attribute>
1566		</xsl:if>
1567		<xsl:if test="图:文本内容">
1568			<xsl:if test="图:文本内容/@图:上边距">
1569				<xsl:attribute name="fo:padding-top"><xsl:value-of select="concat(图:文本内容/@图:上边距,$uofUnit)"/></xsl:attribute>
1570				<xsl:attribute name="fo:padding-bottom"><xsl:value-of select="concat(图:文本内容/@图:下边距,$uofUnit)"/></xsl:attribute>
1571				<xsl:attribute name="fo:padding-left"><xsl:value-of select="concat(图:文本内容/@图:左边距,$uofUnit)"/></xsl:attribute>
1572				<xsl:attribute name="fo:padding-right"><xsl:value-of select="concat(图:文本内容/@图:右边距,$uofUnit)"/></xsl:attribute>
1573			</xsl:if>
1574			<xsl:if test="图:文本内容/@图:文字排列方向">
1575				<xsl:choose>
1576					<xsl:when test="图:文本内容/@图:文字排列方向='vert-l2r'">
1577						<xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute>
1578					</xsl:when>
1579					<xsl:when test="图:文本内容/@图:文字排列方向='vert-r2l'">
1580						<xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute>
1581					</xsl:when>
1582				</xsl:choose>
1583			</xsl:if>
1584			<xsl:if test="图:文本内容/@图:水平对齐">
1585				<xsl:attribute name="draw:textarea-horizontal-align"><xsl:value-of select="图:文本内容/@图:水平对齐"/></xsl:attribute>
1586			</xsl:if>
1587			<xsl:if test="图:文本内容/@图:垂直对齐">
1588				<xsl:attribute name="draw:textarea-vertical-align"><xsl:value-of select="图:文本内容/@图:垂直对齐"/></xsl:attribute>
1589			</xsl:if>
1590			<xsl:if test="图:文本内容/@图:自动换行">
1591				<xsl:attribute name="fo:wrap-option"><xsl:choose><xsl:when test="图:文本内容/@图:自动换行='1' or 图:文本内容/@图:自动换行='true'">wrap</xsl:when><xsl:otherwise>no-wrap</xsl:otherwise></xsl:choose></xsl:attribute>
1592			</xsl:if>
1593			<xsl:choose>
1594				<xsl:when test="图:文本内容/@图:大小适应文字='true'">
1595					<xsl:attribute name="draw:auto-grow-width">true</xsl:attribute>
1596					<xsl:attribute name="draw:auto-grow-height">true</xsl:attribute>
1597				</xsl:when>
1598				<xsl:otherwise>
1599					<xsl:attribute name="draw:auto-grow-width">false</xsl:attribute>
1600					<xsl:attribute name="draw:auto-grow-height">false</xsl:attribute>
1601				</xsl:otherwise>
1602			</xsl:choose>
1603		</xsl:if>
1604		<xsl:if test="图:控制点">
1605	</xsl:if>
1606	</xsl:template>
1607	<xsl:template name="图形解析">
1608		<xsl:variable name="tuxing1" select="字:图形/@字:图形引用"/>
1609		<xsl:variable name="paiban">
1610			<xsl:value-of select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:名称"/>
1611		</xsl:variable>
1612		<xsl:variable name="otherobject">
1613			<xsl:value-of select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/@图:其他对象"/>
1614		</xsl:variable>
1615		<xsl:choose>
1616			<xsl:when test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]">
1617				<xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='png' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='jpg' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='bmp' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='gif' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:私有类型='图片'">
1618					<xsl:element name="draw:frame">
1619						<xsl:attribute name="draw:name"><xsl:variable name="pos"><xsl:value-of select="count(preceding::字:锚点)"/></xsl:variable><xsl:value-of select="concat('图形',$pos)"/></xsl:attribute>
1620						<xsl:if test="字:锚点属性/字:位置/字:水平/字:绝对">
1621							<xsl:attribute name="svg:x"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1622						</xsl:if>
1623						<xsl:if test="字:锚点属性/字:位置/字:垂直/字:绝对">
1624							<xsl:attribute name="svg:y"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1625						</xsl:if>
1626						<xsl:attribute name="svg:width"><xsl:value-of select="concat(字:锚点属性/字:宽度,$uofUnit)"/></xsl:attribute>
1627						<xsl:attribute name="svg:height"><xsl:value-of select="concat(字:锚点属性/字:高度,$uofUnit)"/></xsl:attribute>
1628						<xsl:attribute name="text:anchor-type"><xsl:choose><xsl:when test="@字:类型='inline'">as-char</xsl:when><xsl:otherwise>paragraph</xsl:otherwise></xsl:choose></xsl:attribute>
1629						<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]">
1630							<xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
1631							<xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
1632							<xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
1633								<xsl:variable name="jiaodu">
1634									<xsl:value-of select="图:预定义图形/图:属性/图:旋转角度"/>
1635								</xsl:variable>
1636								<xsl:variable name="shibie">
1637									<xsl:value-of select="图:预定义图形/图:生成软件"/>
1638								</xsl:variable>
1639								<xsl:variable name="rotate-angle">
1640									<xsl:choose>
1641										<xsl:when test="图:预定义图形/图:生成软件 and not($shibie='PNG')">
1642											<xsl:value-of select="((360 - $jiaodu)  *  2 * 3.14159265 ) div 360"/>
1643										</xsl:when>
1644										<xsl:otherwise>
1645											<xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 *  2 * 3.14159265 ) div 360"/>
1646										</xsl:otherwise>
1647									</xsl:choose>
1648								</xsl:variable>
1649								<xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
1650							</xsl:if>
1651							<xsl:if test="图:文本内容">
1652								<xsl:apply-templates select="图:文本内容/字:段落"/>
1653								<xsl:apply-templates select="图:文本内容/字:文字表"/>
1654							</xsl:if>
1655						</xsl:for-each>
1656						<xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据">
1657							<draw:image>
1658								<office:binary-data>
1659									<xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据"/>
1660								</office:binary-data>
1661							</draw:image>
1662						</xsl:if>
1663						<xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径">
1664							<xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"/></xsl:attribute>
1665						</xsl:if>
1666					</xsl:element>
1667				</xsl:if>
1668			</xsl:when>
1669			<xsl:when test="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/@图:其他对象 and /uof:UOF/uof:对象集/uof:其他对象/@uof:公共类型='jpg'">
1670				<xsl:variable name="bshi">
1671					<xsl:value-of select="/uof:UOF/uof:对象集/图:图形/@图:其他对象"/>
1672				</xsl:variable>
1673				<xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$bshi]/@uof:公共类型='jpg'">
1674					<xsl:element name="draw:frame">
1675						<xsl:attribute name="draw:name"><xsl:variable name="pos"><xsl:value-of select="count(preceding::字:锚点)"/></xsl:variable><xsl:value-of select="concat('图形',$pos)"/></xsl:attribute>
1676						<xsl:if test="字:锚点属性/字:位置/字:水平/字:绝对">
1677							<xsl:attribute name="svg:x"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1678						</xsl:if>
1679						<xsl:if test="字:锚点属性/字:位置/字:垂直/字:绝对">
1680							<xsl:attribute name="svg:y"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1681						</xsl:if>
1682						<xsl:attribute name="svg:width"><xsl:value-of select="concat(字:锚点属性/字:宽度,$uofUnit)"/></xsl:attribute>
1683						<xsl:attribute name="svg:height"><xsl:value-of select="concat(字:锚点属性/字:高度,$uofUnit)"/></xsl:attribute>
1684						<xsl:attribute name="text:anchor-type"><xsl:choose><xsl:when test="@字:类型='inline'">as-char</xsl:when><xsl:otherwise>paragraph</xsl:otherwise></xsl:choose></xsl:attribute>
1685						<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]">
1686							<xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
1687							<xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
1688							<xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
1689								<xsl:variable name="jiaodu">
1690									<xsl:value-of select="图:预定义图形/图:属性/图:旋转角度"/>
1691								</xsl:variable>
1692								<xsl:variable name="shibie">
1693									<xsl:value-of select="图:预定义图形/图:生成软件"/>
1694								</xsl:variable>
1695								<xsl:variable name="rotate-angle">
1696									<xsl:choose>
1697										<xsl:when test="图:预定义图形/图:生成软件 and not($shibie='PNG')">
1698											<xsl:value-of select="((360 - $jiaodu)  *  2 * 3.14159265 ) div 360"/>
1699										</xsl:when>
1700										<xsl:otherwise>
1701											<xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 *  2 * 3.14159265 ) div 360"/>
1702										</xsl:otherwise>
1703									</xsl:choose>
1704								</xsl:variable>
1705								<xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
1706							</xsl:if>
1707							<xsl:if test="图:文本内容">
1708								<xsl:apply-templates select="图:文本内容/字:段落"/>
1709								<xsl:apply-templates select="图:文本内容/字:文字表"/>
1710							</xsl:if>
1711							<xsl:variable name="qita">
1712								<xsl:value-of select="self::node()/@图:其他对象"/>
1713							</xsl:variable>
1714							<xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$qita]/uof:数据">
1715								<draw:image>
1716								<office:binary-data>
1717									<xsl:value-of select="."/>
1718								</office:binary-data>
1719								</draw:image>
1720							</xsl:for-each>
1721						</xsl:for-each>
1722						<xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径">
1723							<xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"/></xsl:attribute>
1724						</xsl:if>
1725					</xsl:element>
1726				</xsl:if>
1727			</xsl:when>
1728			<xsl:when test="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:文本内容[@图:文本框='true'] and not($paiban='排版框')">
1729				<draw:frame text:anchor-type="paragraph">
1730					<xsl:attribute name="draw:style-name"><xsl:value-of select="$tuxing1"/></xsl:attribute>
1731					<xsl:attribute name="svg:width"><xsl:value-of select="concat(字:锚点属性/字:宽度,$uofUnit)"/></xsl:attribute>
1732					<xsl:attribute name="svg:height"><xsl:value-of select="concat(字:锚点属性/字:高度,$uofUnit)"/></xsl:attribute>
1733					<xsl:if test="字:锚点属性/字:位置/字:水平/字:绝对">
1734						<xsl:attribute name="svg:x"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1735					</xsl:if>
1736					<xsl:if test="字:锚点属性/字:位置/字:垂直/字:绝对">
1737						<xsl:attribute name="svg:y"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1738					</xsl:if>
1739					<xsl:attribute name="draw:z-index">
1740						<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]"><xsl:value-of select="@图:层次"/></xsl:for-each>
1741					</xsl:attribute>
1742					<draw:text-box>
1743						<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:文本内容/字:段落"/>
1744						<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:文本内容/字:文字表"/>
1745					</draw:text-box>
1746				</draw:frame>
1747			</xsl:when>
1748			<xsl:otherwise>
1749				<xsl:variable name="leibie">
1750					<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]">
1751						<xsl:value-of select="图:预定义图形/图:类别"/>
1752					</xsl:for-each>
1753				</xsl:variable>
1754				<xsl:variable name="leibie2">
1755					<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]">
1756						<xsl:value-of select="图:预定义图形/图:名称"/>
1757					</xsl:for-each>
1758				</xsl:variable>
1759				<xsl:choose>
1760					<xsl:when test="$leibie='22'">
1761						<xsl:call-template name="排版框">
1762							<xsl:with-param name="biaoshi" select="$tuxing1"/>
1763							<xsl:with-param name="name" select="$leibie2"/>
1764						</xsl:call-template>
1765					</xsl:when>
1766					<xsl:when test="$leibie='23'">
1767						<xsl:call-template name="文本框">
1768							<xsl:with-param name="biaoshi" select="$tuxing1"/>
1769							<xsl:with-param name="name" select="$leibie2"/>
1770						</xsl:call-template>
1771					</xsl:when>
1772					<xsl:when test="$leibie='11'">
1773						<xsl:call-template name="Rectangle"/>
1774					</xsl:when>
1775					<xsl:when test="$leibie='19'">
1776						<xsl:call-template name="Oval"/>
1777					</xsl:when>
1778					<xsl:when test="$leibie='61'">
1779						<xsl:call-template name="Line"/>
1780					</xsl:when>
1781					<xsl:when test="$leibie='62'">
1782						<xsl:call-template name="Line"/>
1783					</xsl:when>
1784					<xsl:when test="$leibie='63'">
1785						<xsl:call-template name="Line"/>
1786					</xsl:when>
1787					<xsl:when test="$leibie='64'">
1788						<xsl:call-template name="Curve"/>
1789					</xsl:when>
1790					<xsl:when test="$leibie='65'">
1791						<xsl:call-template name="Freeform"/>
1792					</xsl:when>
1793					<xsl:when test="$leibie='66'">
1794						<xsl:call-template name="Scribble"/>
1795					</xsl:when>
1796				</xsl:choose>
1797			</xsl:otherwise>
1798		</xsl:choose>
1799	</xsl:template>
1800	<xsl:template name="文本框">
1801		<xsl:param name="biaoshi"/>
1802		<xsl:param name="name"/>
1803		<draw:frame text:anchor-type="paragraph">
1804			<xsl:attribute name="draw:style-name"><xsl:value-of select="$biaoshi"/></xsl:attribute>
1805			<xsl:attribute name="draw:name"><xsl:value-of select="$name"/></xsl:attribute>
1806			<xsl:attribute name="svg:width"><xsl:value-of select="concat(字:锚点属性/字:宽度,$uofUnit)"/></xsl:attribute>
1807			<xsl:if test="字:锚点属性/字:位置/字:水平/字:绝对">
1808				<xsl:attribute name="svg:x"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1809			</xsl:if>
1810			<xsl:if test="字:锚点属性/字:位置/字:垂直/字:绝对">
1811				<xsl:attribute name="svg:y"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1812			</xsl:if>
1813			<xsl:attribute name="draw:z-index">
1814				<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $biaoshi]">
1815					<xsl:value-of select="@图:层次"/>
1816				</xsl:for-each>
1817			</xsl:attribute>
1818			<draw:text-box>
1819				<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$biaoshi]/图:文本内容/字:段落"/>
1820				<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$biaoshi]/图:文本内容/字:文字表"/>
1821			</draw:text-box>
1822		</draw:frame>
1823	</xsl:template>
1824	<xsl:template name="Curve">
1825		<xsl:element name="draw:path">
1826			<xsl:variable name="tuxing1" select="字:图形/@字:图形引用"/>
1827			<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]">
1828				<xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/>
1829				<xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/>
1830				<xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
1831				<xsl:attribute name="svg:d"><xsl:value-of select="图:预定义图形/图:关键点坐标/@图:路径"/></xsl:attribute>
1832			</xsl:for-each>
1833			<xsl:call-template name="common"/>
1834		</xsl:element>
1835	</xsl:template>
1836	<xsl:template name="common">
1837		<xsl:if test="字:锚点属性/字:位置/字:水平/字:绝对">
1838			<xsl:attribute name="svg:x"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1839		</xsl:if>
1840		<xsl:if test="字:锚点属性/字:位置/字:垂直/字:绝对">
1841			<xsl:attribute name="svg:y"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1842		</xsl:if>
1843		<xsl:variable name="tuxing1" select="字:图形/@字:图形引用"/>
1844		<xsl:attribute name="svg:width"><xsl:value-of select="concat(字:锚点属性/字:宽度,$uofUnit)"/></xsl:attribute>
1845		<xsl:attribute name="svg:height"><xsl:value-of select="concat(字:锚点属性/字:高度,$uofUnit)"/></xsl:attribute>
1846		<xsl:attribute name="text:anchor-type"><xsl:choose><xsl:when test="@字:类型='inline'">as-char</xsl:when><xsl:otherwise>paragraph</xsl:otherwise></xsl:choose></xsl:attribute>
1847		<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]">
1848			<xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
1849			<xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
1850			<xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
1851				<xsl:variable name="jiaodu">
1852					<xsl:value-of select="图:预定义图形/图:属性/图:旋转角度"/>
1853				</xsl:variable>
1854				<xsl:variable name="shibie">
1855					<xsl:value-of select="图:预定义图形/图:生成软件"/>
1856				</xsl:variable>
1857				<xsl:variable name="rotate-angle">
1858					<xsl:choose>
1859						<xsl:when test="图:预定义图形/图:生成软件 and not($shibie='PNG')">
1860							<xsl:value-of select="((360 - $jiaodu)  *  2 * 3.14159265 ) div 360"/>
1861						</xsl:when>
1862						<xsl:otherwise>
1863							<xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 *  2 * 3.14159265 ) div 360"/>
1864						</xsl:otherwise>
1865					</xsl:choose>
1866				</xsl:variable>
1867				<xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
1868			</xsl:if>
1869			<xsl:if test="图:文本内容">
1870				<xsl:apply-templates select="图:文本内容/字:段落"/>
1871				<xsl:apply-templates select="图:文本内容/字:文字表"/>
1872			</xsl:if>
1873		</xsl:for-each>
1874	</xsl:template>
1875	<xsl:template name="common1">
1876		<xsl:if test="字:锚点属性/字:位置/字:水平/字:绝对">
1877			<xsl:attribute name="svg:x"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1878		</xsl:if>
1879		<xsl:if test="字:锚点属性/字:位置/字:垂直/字:绝对">
1880			<xsl:attribute name="svg:y"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1881		</xsl:if>
1882		<xsl:variable name="tuxing1" select="字:图形/@字:图形引用"/>
1883		<xsl:attribute name="svg:width"><xsl:value-of select="concat(/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:预定义图形/图:属性/图:宽度,$uofUnit)"/></xsl:attribute>
1884		<xsl:attribute name="svg:height"><xsl:value-of select="concat(/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]/图:预定义图形/图:属性/图:高度,$uofUnit)"/></xsl:attribute>
1885		<xsl:attribute name="text:anchor-type"><xsl:choose><xsl:when test="@字:类型='inline'">as-char</xsl:when><xsl:otherwise>paragraph</xsl:otherwise></xsl:choose></xsl:attribute>
1886		<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]">
1887			<xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
1888			<xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
1889			<xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
1890				<xsl:variable name="jiaodu">
1891					<xsl:value-of select="图:预定义图形/图:属性/图:旋转角度"/>
1892				</xsl:variable>
1893				<xsl:variable name="shibie">
1894					<xsl:value-of select="图:预定义图形/图:生成软件"/>
1895				</xsl:variable>
1896				<xsl:variable name="rotate-angle">
1897					<xsl:choose>
1898						<xsl:when test="图:预定义图形/图:生成软件 and not($shibie='PNG')">
1899							<xsl:value-of select="((360 - $jiaodu)  *  2 * 3.14159265 ) div 360"/>
1900						</xsl:when>
1901						<xsl:otherwise>
1902							<xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 *  2 * 3.14159265 ) div 360"/>
1903						</xsl:otherwise>
1904					</xsl:choose>
1905				</xsl:variable>
1906				<xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
1907			</xsl:if>
1908			<xsl:if test="图:文本内容">
1909				<xsl:apply-templates select="图:文本内容/字:段落"/>
1910				<xsl:apply-templates select="图:文本内容/字:文字表"/>
1911			</xsl:if>
1912		</xsl:for-each>
1913	</xsl:template>
1914	<xsl:template name="Freeform">
1915		<xsl:element name="draw:polygon">
1916			<xsl:variable name="tuxing1" select="字:图形/@字:图形引用"/>
1917			<xsl:variable name="width" select="number(/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:属性/图:宽度)*1000"/>
1918			<xsl:variable name="height" select="number(/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:属性/图:高度)*1000"/>
1919			<xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
1920			<xsl:attribute name="draw:points"><xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:关键点坐标"><xsl:call-template name="drawpoints"><xsl:with-param name="points" select="concat(number(图:坐标[1]/@x坐标)*1000,',',number(图:坐标[1]/@y坐标)*1000)"/><xsl:with-param name="point-pos" select="2"/></xsl:call-template></xsl:for-each></xsl:attribute>
1921			<xsl:call-template name="common"/>
1922		</xsl:element>
1923	</xsl:template>
1924	<xsl:template name="drawpoints">
1925		<xsl:param name="points"/>
1926		<xsl:param name="point-pos"/>
1927		<xsl:choose>
1928			<xsl:when test="图:坐标[$point-pos]">
1929				<xsl:variable name="points1" select="concat($points,' ',number(图:坐标[$point-pos]/@x坐标)*1000,',',number(图:坐标[$point-pos]/@y坐标)*1000)"/>
1930				<xsl:call-template name="drawpoints">
1931					<xsl:with-param name="points" select="$points1"/>
1932					<xsl:with-param name="point-pos" select="$point-pos+1"/>
1933				</xsl:call-template>
1934			</xsl:when>
1935			<xsl:otherwise>
1936				<xsl:value-of select="$points"/>
1937			</xsl:otherwise>
1938		</xsl:choose>
1939	</xsl:template>
1940	<xsl:template name="Scribble">
1941		<xsl:element name="draw:polyline">
1942			<xsl:variable name="tuxing1" select="字:图形/@字:图形引用"/>
1943			<xsl:variable name="width" select="number(/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:属性/图:宽度)*1000"/>
1944			<xsl:variable name="height" select="number(/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:属性/图:高度)*1000"/>
1945			<xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
1946			<xsl:attribute name="draw:points"><xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:关键点坐标"><xsl:call-template name="drawpoints"><xsl:with-param name="points" select="concat(number(图:坐标[1]/@x坐标)*1000,',',number(图:坐标[1]/@y坐标)*1000)"/><xsl:with-param name="point-pos" select="2"/></xsl:call-template></xsl:for-each></xsl:attribute>
1947			<xsl:call-template name="common"/>
1948		</xsl:element>
1949	</xsl:template>
1950	<xsl:template name="Oval">
1951		<xsl:element name="draw:ellipse">
1952			<xsl:call-template name="common1"/>
1953		</xsl:element>
1954	</xsl:template>
1955	<xsl:template name="排版框">
1956		<xsl:param name="biaoshi"/>
1957		<xsl:param name="name"/>
1958		<draw:frame text:anchor-type="paragraph">
1959			<xsl:attribute name="draw:style-name"><xsl:value-of select="$biaoshi"/></xsl:attribute>
1960			<xsl:attribute name="draw:name"><xsl:value-of select="$name"/></xsl:attribute>
1961			<xsl:attribute name="svg:width"><xsl:value-of select="concat(字:锚点属性/字:宽度,$uofUnit)"/></xsl:attribute>
1962			<xsl:if test="字:锚点属性/字:位置/字:水平/字:绝对">
1963				<xsl:attribute name="svg:x"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1964			</xsl:if>
1965			<xsl:if test="字:锚点属性/字:位置/字:垂直/字:绝对">
1966				<xsl:attribute name="svg:y"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1967			</xsl:if>
1968			<xsl:attribute name="draw:z-index">
1969				<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $biaoshi]">
1970					<xsl:value-of select="@图:层次"/>
1971				</xsl:for-each>
1972			</xsl:attribute>
1973			<draw:text-box>
1974				<xsl:attribute name="fo:min-height"><xsl:value-of select="concat(字:锚点属性/字:高度,$uofUnit)"/></xsl:attribute>
1975				<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$biaoshi]/图:文本内容/字:段落"/>
1976				<xsl:apply-templates select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$biaoshi]/图:文本内容/字:文字表"/>
1977			</draw:text-box>
1978		</draw:frame>
1979	</xsl:template>
1980	<xsl:template name="Rectangle">
1981		<xsl:element name="draw:rect">
1982			<xsl:call-template name="common1"/>
1983		</xsl:element>
1984	</xsl:template>
1985	<xsl:template name="Line">
1986		<xsl:element name="draw:line">
1987			<xsl:variable name="tuxing1" select="字:图形/@字:图形引用"/>
1988			<xsl:attribute name="svg:x1"><xsl:value-of select="concat(字:锚点属性/字:位置/字:水平/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1989			<xsl:attribute name="svg:y1"><xsl:value-of select="concat(字:锚点属性/字:位置/字:垂直/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
1990			<xsl:attribute name="svg:x2"><xsl:value-of select="concat((字:锚点属性/字:位置/字:水平/字:绝对/@字:值 + 字:锚点属性/字:宽度),$uofUnit)"/></xsl:attribute>
1991			<xsl:attribute name="svg:y2"><xsl:value-of select="concat((字:锚点属性/字:位置/字:垂直/字:绝对/@字:值 + 字:锚点属性/字:高度),$uofUnit)"/></xsl:attribute>
1992			<xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]">
1993				<xsl:attribute name="text:anchor-type">paragraph</xsl:attribute>
1994				<xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
1995				<xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
1996				<xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
1997					<xsl:variable name="jiaodu">
1998						<xsl:value-of select="图:预定义图形/图:属性/图:旋转角度"/>
1999					</xsl:variable>
2000					<xsl:variable name="shibie">
2001						<xsl:value-of select="图:预定义图形/图:生成软件"/>
2002					</xsl:variable>
2003					<xsl:variable name="rotate-angle">
2004						<xsl:choose>
2005							<xsl:when test="图:预定义图形/图:生成软件 and not($shibie='PNG')">
2006								<xsl:value-of select="((360 - $jiaodu)  *  2 * 3.14159265 ) div 360"/>
2007							</xsl:when>
2008							<xsl:otherwise>
2009								<xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 *  2 * 3.14159265 ) div 360"/>
2010							</xsl:otherwise>
2011						</xsl:choose>
2012					</xsl:variable>
2013					<xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
2014				</xsl:if>
2015				<xsl:if test="图:文本内容">
2016					<xsl:apply-templates select="图:文本内容/字:段落"/>
2017					<xsl:apply-templates select="图:文本内容/字:文字表"/>
2018				</xsl:if>
2019			</xsl:for-each>
2020		</xsl:element>
2021	</xsl:template>
2022	<xsl:template name="processPageBreaks">
2023		<xsl:variable name="pageBreak" select="字:句/字:分页符"/>
2024		<xsl:call-template name="createSubParagraph">
2025			<xsl:with-param name="list" select="$pageBreak[1]/preceding-sibling::字:句"/>
2026			<xsl:with-param name="pageBreak"/>
2027			<xsl:with-param name="needsPageBreak">false</xsl:with-param>
2028		</xsl:call-template>
2029		<xsl:for-each select="$pageBreak">
2030			<xsl:call-template name="createSubParagraph">
2031				<xsl:with-param name="list" select="./following-sibling::字:句[preceding::字:句/字:分页符 = '.']"/>
2032				<xsl:with-param name="pageBreak" select="."/>
2033				<xsl:with-param name="needsPageBreak">true</xsl:with-param>
2034			</xsl:call-template>
2035		</xsl:for-each>
2036	</xsl:template>
2037	<xsl:template name="createSubParagraph">
2038		<xsl:param name="list"/>
2039		<xsl:param name="pageBreak"/>
2040		<xsl:param name="needsPageBreak"/>
2041		<xsl:if test="(count($list) &gt; 0) or ($needsPageBreak ='true') ">
2042			<xsl:element name="text:p">
2043				<xsl:choose>
2044					<xsl:when test="$needsPageBreak = 'true'">
2045						<xsl:choose>
2046							<xsl:when test="ancestor::字:段落/字:段落属性">
2047								<xsl:attribute name="text:style-name">P<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落属性"/></xsl:attribute>
2048							</xsl:when>
2049							<xsl:otherwise>
2050								<xsl:attribute name="text:style-name">PageBreak</xsl:attribute>
2051							</xsl:otherwise>
2052						</xsl:choose>
2053					</xsl:when>
2054				</xsl:choose>
2055				<xsl:if test="$pageBreak">
2056					<xsl:apply-templates select="$pageBreak"/>
2057				</xsl:if>
2058				<xsl:apply-templates select="$list"/>
2059			</xsl:element>
2060		</xsl:if>
2061	</xsl:template>
2062	<xsl:template match="字:句/字:区域开始[@字:类型='bookmark']">
2063		<xsl:variable name="biaoshi">
2064			<xsl:value-of select="@字:标识符"/>
2065		</xsl:variable>
2066		<xsl:choose>
2067			<xsl:when test="not(@字:名称)">
2068				<text:bookmark-start text:name="{/uof:UOF/uof:书签集/uof:书签[uof:文本位置/@字:区域引用=$biaoshi]/@uof:名称}"/>
2069			</xsl:when>
2070			<xsl:otherwise>
2071				<text:bookmark-start text:name="{@字:名称}"/>
2072			</xsl:otherwise>
2073		</xsl:choose>
2074	</xsl:template>
2075	<xsl:template match="字:句/字:区域结束[preceding::字:区域开始[1]/@字:类型='bookmark']">
2076		<xsl:variable name="biaoshi">
2077			<xsl:value-of select="@字:标识符引用"/>
2078		</xsl:variable>
2079		<xsl:choose>
2080			<xsl:when test="not(@字:名称)">
2081				<text:bookmark-end text:name="{/uof:UOF/uof:书签集/uof:书签[uof:文本位置/@字:区域引用=$biaoshi]/@uof:名称}"/>
2082			</xsl:when>
2083			<xsl:otherwise>
2084				<text:bookmark-end text:name="{@字:名称}"/>
2085			</xsl:otherwise>
2086		</xsl:choose>
2087	</xsl:template>
2088	<xsl:template match="字:区域开始[@字:类型='annotation']">
2089		<text:bookmark-start text:name="{@字:标识符}"/>
2090	</xsl:template>
2091	<xsl:template match="字:区域结束[preceding::字:区域开始[1]/@字:类型='annotation']">
2092		<text:bookmark-end text:name="{@字:标识符引用}"/>
2093	</xsl:template>
2094	<xsl:template match="字:区域开始[@字:类型='user-data']">
2095		<text:alphabetical-index-mark-start text:id="{@字:标识符}" text:string-value-phonetic="{@字:名称}"/>
2096	</xsl:template>
2097	<xsl:template match="字:区域结束[preceding::字:区域开始[1]/@字:类型='user-data']">
2098		<text:alphabetical-index-mark-end text:id="{@字:标识符引用}"/>
2099	</xsl:template>
2100	<xsl:template match="字:段落/字:域开始">
2101		<xsl:choose>
2102			<xsl:when test="@字:类型='createdate'">
2103				<xsl:variable name="datestr" select="../字:句[preceding-sibling::字:域代码]/字:文本串"/>
2104				<xsl:element name="text:creation-date">
2105					<xsl:attribute name="style:data-style-name">CreateDate<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'createdate']"/></xsl:attribute>
2106					<xsl:attribute name="text:date-value"><xsl:value-of select="$datestr"/></xsl:attribute>
2107					<xsl:value-of select="$datestr"/>
2108				</xsl:element>
2109			</xsl:when>
2110			<xsl:when test="@字:类型='savedate'">
2111				<xsl:variable name="datestr" select="../字:句[preceding-sibling::字:域代码]/字:文本串"/>
2112				<xsl:element name="text:date">
2113					<xsl:attribute name="style:data-style-name">SaveDate<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'savedate']"/></xsl:attribute>
2114					<xsl:attribute name="text:date-value"><xsl:value-of select="$datestr"/></xsl:attribute>
2115					<xsl:attribute name="text:fixed">true</xsl:attribute>
2116					<xsl:value-of select="$datestr"/>
2117				</xsl:element>
2118			</xsl:when>
2119			<xsl:when test="@字:类型='date'">
2120				<xsl:variable name="datestr" select="../字:句[preceding-sibling::字:域代码]/字:文本串"/>
2121				<xsl:element name="text:date">
2122					<xsl:attribute name="style:data-style-name">Date<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'date']"/></xsl:attribute>
2123					<xsl:attribute name="text:date-value"><xsl:value-of select="$datestr"/></xsl:attribute>
2124					<xsl:value-of select="$datestr"/>
2125				</xsl:element>
2126			</xsl:when>
2127			<xsl:when test="@字:类型='time'">
2128				<xsl:variable name="datestr" select="../字:句[preceding-sibling::字:域代码]/字:文本串"/>
2129				<xsl:element name="text:time">
2130					<xsl:attribute name="style:data-style-name">Time<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'time']"/></xsl:attribute>
2131					<xsl:attribute name="text:time-value"><xsl:value-of select="$datestr"/></xsl:attribute>
2132					<xsl:value-of select="$datestr"/>
2133				</xsl:element>
2134			</xsl:when>
2135			<xsl:when test="@字:类型='edittime'">
2136				<xsl:variable name="datestr" select="../字:句[preceding-sibling::字:域代码]/字:文本串"/>
2137				<xsl:element name="text:editing-duration">
2138					<xsl:attribute name="style:data-style-name">EditTime<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'edittime']"/></xsl:attribute>
2139					<xsl:value-of select="$datestr"/>
2140				</xsl:element>
2141			</xsl:when>
2142			<xsl:when test="@字:类型='createtime'">
2143				<xsl:variable name="datestr" select="../字:句[preceding-sibling::字:域代码]/字:文本串"/>
2144				<xsl:element name="text:creation-time">
2145					<xsl:attribute name="style:data-style-name">CREATETIME<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'createtime']"/></xsl:attribute>
2146					<xsl:value-of select="$datestr"/>
2147				</xsl:element>
2148			</xsl:when>
2149			<xsl:when test="@字:类型='page'">
2150				<xsl:call-template name="页码域"/>
2151			</xsl:when>
2152			<xsl:when test="@字:类型='numpages'">
2153				<xsl:call-template name="页数域"/>
2154			</xsl:when>
2155			<xsl:when test="@字:类型='author'">
2156				<xsl:call-template name="作者域"/>
2157			</xsl:when>
2158			<xsl:when test="@字:类型='username'">
2159				<xsl:call-template name="用户域"/>
2160			</xsl:when>
2161			<xsl:when test="@字:类型='userinitials'">
2162				<xsl:call-template name="缩写域"/>
2163			</xsl:when>
2164			<xsl:when test="@字:类型='title'">
2165				<xsl:call-template name="标题域"/>
2166			</xsl:when>
2167			<xsl:when test="@字:类型='subject'">
2168				<xsl:call-template name="主题域"/>
2169			</xsl:when>
2170			<xsl:when test="@字:类型='numchars'">
2171				<xsl:call-template name="字符数"/>
2172			</xsl:when>
2173			<xsl:when test="@字:类型='filename'">
2174				<xsl:call-template name="文件名"/>
2175			</xsl:when>
2176			<xsl:when test="@字:类型='edittime'">
2177				<xsl:call-template name="编辑时间"/>
2178			</xsl:when>
2179			<xsl:when test="@字:类型='creation-time'">
2180				<xsl:call-template name="创建时间"/>
2181			</xsl:when>
2182			<xsl:when test="@字:类型='seq'">
2183				<xsl:call-template name="题注"/>
2184			</xsl:when>
2185		</xsl:choose>
2186	</xsl:template>
2187	<xsl:template name="commonParagraph">
2188		<xsl:choose>
2189			<xsl:when test="字:段落属性/字:大纲级别">
2190				<xsl:element name="text:h">
2191					<xsl:call-template name="commonParagraphAttributes"/>
2192					<xsl:apply-templates/>
2193				</xsl:element>
2194			</xsl:when>
2195			<xsl:when test="not (字:域开始/@字:类型='ref') and not(字:域开始/@字:类型='index')">
2196				<xsl:element name="text:p">
2197					<xsl:call-template name="commonParagraphAttributes"/>
2198					<xsl:apply-templates/>
2199				</xsl:element>
2200			</xsl:when>
2201			<xsl:otherwise/>
2202		</xsl:choose>
2203	</xsl:template>
2204	<xsl:template name="commonParagraphAttributes">
2205		<xsl:choose>
2206			<xsl:when test="字:段落属性">
2207				<xsl:variable name="pp">
2208					<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/>
2209				</xsl:variable>
2210				<xsl:variable name="aa">
2211					<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:域结束]"/>
2212				</xsl:variable>
2213				<xsl:variable name="stylename" select="字:段落属性/@字:式样引用"/>
2214				<xsl:choose>
2215					<xsl:when test="preceding-sibling::字:段落/字:域结束">
2216						<xsl:attribute name="text:style-name"><xsl:value-of select="concat('P',$pp+$aa)"/></xsl:attribute>
2217					</xsl:when>
2218					<xsl:when test="contains($stylename,'Heading')">
2219						<xsl:attribute name="text:style-name"><xsl:value-of select="$stylename"/></xsl:attribute>
2220					</xsl:when>
2221					<xsl:otherwise>
2222						<xsl:attribute name="text:style-name"><xsl:value-of select="concat('P',$pp)"/></xsl:attribute>
2223					</xsl:otherwise>
2224				</xsl:choose>
2225				<xsl:if test="字:段落属性/字:大纲级别">
2226					<xsl:attribute name="text:outline-level"><xsl:value-of select="字:段落属性/字:大纲级别"/></xsl:attribute>
2227				</xsl:if>
2228			</xsl:when>
2229			<xsl:when test="generate-id(ancestor::字:主体/descendant::字:段落[1]) = generate-id(.)">
2230				<xsl:variable name="paragraph-number">
2231					<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/>
2232				</xsl:variable>
2233				<xsl:attribute name="text:style-name">P<xsl:value-of select="number($paragraph-number)"/>_1</xsl:attribute>
2234			</xsl:when>
2235			<xsl:when test="not(字:段落属性) and (descendant::字:分栏符 or ancestor::字:分节/descendant::字:节属性[字:分栏/@字:栏数 &gt; 1])">
2236				<xsl:attribute name="text:style-name">ColumnBreakPara</xsl:attribute>
2237			</xsl:when>
2238			<xsl:when test="字:句">
2239				<xsl:apply-templates select="字:文本串"/>
2240			</xsl:when>
2241		</xsl:choose>
2242	</xsl:template>
2243	<xsl:template match="字:段落属性"/>
2244	<xsl:template match="字:句/字:句属性"/>
2245	<xsl:template match="字:句属性" mode="style">
2246		<xsl:if test="not(@字:式样引用)">
2247			<xsl:element name="style:style">
2248				<xsl:attribute name="style:name">T<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句属性" format="1"/></xsl:attribute>
2249				<xsl:attribute name="style:family">text</xsl:attribute>
2250				<xsl:if test="@字:式样引用">
2251					<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:式样引用"/></xsl:attribute>
2252				</xsl:if>
2253				<xsl:element name="style:text-properties">
2254					<xsl:apply-templates select="./*"/>
2255				</xsl:element>
2256			</xsl:element>
2257		</xsl:if>
2258	</xsl:template>
2259	<xsl:template match="字:句/字:文本串">
2260		<xsl:choose>
2261			<xsl:when test="string(.) = ' ' ">
2262				<xsl:element name="text:s"/>
2263			</xsl:when>
2264			<xsl:when test="contains(.,'  ')">
2265				<xsl:call-template name="replace-spaces">
2266					<xsl:with-param name="curr-string" select="."/>
2267				</xsl:call-template>
2268			</xsl:when>
2269			<xsl:otherwise>
2270				<xsl:value-of select="."/>
2271			</xsl:otherwise>
2272		</xsl:choose>
2273	</xsl:template>
2274	<xsl:template name="replace-spaces">
2275		<xsl:param name="curr-string"/>
2276		<xsl:if test="contains($curr-string,'  ')">
2277			<xsl:value-of select="substring-before($curr-string,'  ')"/>
2278			<text:s text:c="2"/>
2279			<xsl:variable name="next-string" select="substring-after($curr-string,'  ')"/>
2280			<xsl:choose>
2281				<xsl:when test="contains($next-string, '  ')">
2282					<xsl:call-template name="replace-spaces">
2283						<xsl:with-param name="curr-string" select="$next-string"/>
2284					</xsl:call-template>
2285				</xsl:when>
2286				<xsl:otherwise>
2287					<xsl:value-of select="$next-string"/>
2288				</xsl:otherwise>
2289			</xsl:choose>
2290		</xsl:if>
2291	</xsl:template>
2292	<xsl:template match="字:空格符[parent::字:句]">
2293		<xsl:element name="text:s">
2294			<xsl:attribute name="text:c"><xsl:value-of select="@字:个数"/></xsl:attribute>
2295		</xsl:element>
2296	</xsl:template>
2297	<xsl:template match="字:制表符[parent::字:句]">
2298		<xsl:element name="text:tab"/>
2299	</xsl:template>
2300	<xsl:template match="字:句">
2301		<xsl:if test="name(following-sibling::*[1])!='字:域结束'">
2302			<xsl:if test="字:换行符">
2303				<xsl:element name="text:line-break"/>
2304			</xsl:if>
2305			<xsl:variable name="currently-node" select="./字:锚点"/>
2306			<xsl:choose>
2307				<xsl:when test="字:句属性//字:隐藏文字/@字:值='true'">
2308					<text:hidden-text text:is-hidden="true" text:string-value="{.}"/>
2309				</xsl:when>
2310				<xsl:when test="字:区域开始[@字:类型='hyperlink']">
2311					<xsl:element name="text:a">
2312						<xsl:attribute name="xlink:type">simple</xsl:attribute>
2313						<xsl:variable name="hyperDest" select="字:区域开始/@字:标识符"/>
2314						<xsl:attribute name="xlink:href"><xsl:for-each select="/uof:UOF/uof:链接集/uof:超级链接"><xsl:if test="@uof:链源=$hyperDest"><xsl:if test="@uof:提示"><xsl:attribute name="office:name"><xsl:value-of select="@uof:提示"/></xsl:attribute></xsl:if><xsl:if test="@uof:目标"><xsl:variable name="bsh" select="@uof:目标"/><xsl:choose><xsl:when test="contains($bsh,'\')"><xsl:value-of select="concat('/',translate($bsh,'\','/'))"/></xsl:when><xsl:otherwise><xsl:value-of select="$bsh"/></xsl:otherwise></xsl:choose></xsl:if><xsl:if test="@uof:书签"><xsl:variable name="bookmarkDest" select="@uof:书签"/><xsl:choose><xsl:when test="/uof:UOF/uof:书签集/uof:书签"><xsl:for-each select="/uof:UOF/uof:书签集/uof:书签"><xsl:if test="@uof:名称=$bookmarkDest"><xsl:value-of select="concat('#',@uof:名称)"/></xsl:if></xsl:for-each></xsl:when><xsl:otherwise><xsl:value-of select="concat('#',$bookmarkDest)"/></xsl:otherwise></xsl:choose></xsl:if></xsl:if></xsl:for-each></xsl:attribute>
2315						<xsl:for-each select="/uof:UOF/uof:链接集/uof:超级链接">
2316							<xsl:if test="@uof:链源=$hyperDest">
2317								<xsl:if test="@uof:提示">
2318									<xsl:attribute name="office:name"><xsl:value-of select="@uof:提示"/></xsl:attribute>
2319								</xsl:if>
2320							</xsl:if>
2321						</xsl:for-each>
2322						<xsl:choose>
2323							<xsl:when test="./字:文本串">
2324								<xsl:apply-templates select="字:文本串"/>
2325							</xsl:when>
2326							<xsl:when test="following-sibling::字:句/字:文本串">
2327								<xsl:value-of select="following-sibling::字:句/字:文本串"/>
2328							</xsl:when>
2329						</xsl:choose>
2330					</xsl:element>
2331				</xsl:when>
2332				<xsl:when test="字:区域结束 and preceding::字:区域开始[1]/@字:类型='bookmark' and not(self::node()/字:区域开始)">
2333					<xsl:variable name="aa">
2334						<xsl:value-of select="字:区域结束/@字:标识符引用"/>
2335					</xsl:variable>
2336					<xsl:choose>
2337						<xsl:when test="preceding::字:区域开始[1]/@字:类型='bookmark' and not(preceding::字:区域开始[1]/@字:名称)">
2338							<text:bookmark-end text:name="{/uof:UOF/uof:书签集/uof:书签[uof:文本位置/@字:区域引用=$aa]/@uof:名称}"/>
2339						</xsl:when>
2340						<xsl:when test="preceding::字:区域开始[1]/@字:类型='bookmark'">
2341							<text:bookmark-end text:name="{preceding::字:区域开始[1]/@字:名称}"/>
2342						</xsl:when>
2343					</xsl:choose>
2344				</xsl:when>
2345				<xsl:when test="preceding-sibling::字:句[position()=1]/字:区域开始[@字:类型='hyperlink'] and  not(preceding-sibling::字:句[position()=1]/字:区域结束)"/>
2346				<xsl:when test="(preceding-sibling::字:句)  or (字:句属性)or(字:区域开始)">
2347					<xsl:element name="text:span">
2348						<xsl:choose>
2349							<xsl:when test="字:区域开始[@字:类型='annotation']">
2350								<xsl:variable name="ref_comment">
2351									<xsl:value-of select="字:区域开始/@字:标识符"/>
2352								</xsl:variable>
2353								<xsl:apply-templates/>
2354								<xsl:apply-templates select="/uof:UOF/uof:文字处理/字:公用处理规则/字:批注集/字:批注[@字:区域引用 = $ref_comment]"/>
2355							</xsl:when>
2356							<xsl:otherwise>
2357								<xsl:variable name="stylenum">
2358									<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句" format="1"/>
2359								</xsl:variable>
2360								<xsl:attribute name="text:style-name"><xsl:value-of select="concat('T',$stylenum)"/></xsl:attribute>
2361								<xsl:apply-templates select="*[not(name()='字:引文符号')]"/>
2362							</xsl:otherwise>
2363						</xsl:choose>
2364					</xsl:element>
2365				</xsl:when>
2366				<xsl:otherwise>
2367					<xsl:apply-templates select="字:文本串|字:锚点|字:空格符|字:换行符|字:制表符|字:区域开始|字:区域结束|字:脚注|字:尾注"/>
2368				</xsl:otherwise>
2369			</xsl:choose>
2370		</xsl:if>
2371	</xsl:template>
2372	<xsl:template match="node()[name() =  '字:位置']">
2373		<xsl:attribute name="style:text-position"><xsl:variable name="val"><xsl:value-of select="."/></xsl:variable><xsl:choose><xsl:when test="$val='sub' or $val='super'"><xsl:value-of select="concat($val,' 58%')"/></xsl:when><xsl:when test="contains($val,'sub ') or contains($val,'super ')"><xsl:value-of select="concat($val,'%')"/></xsl:when><xsl:when test="not(contains($val,' '))"><xsl:value-of select="concat($val,'% 100%')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat(substring-before($val,' '),'% ',substring-after($val,' '),'%' )"/></xsl:otherwise></xsl:choose></xsl:attribute>
2374	</xsl:template>
2375	<xsl:template match="字:批注">
2376		<office:annotation office:display="true">
2377			<xsl:variable name="name" select="@字:作者"/>
2378			<dc:creator>
2379				<xsl:value-of select="/uof:UOF/uof:文字处理/字:公用处理规则/字:用户集/字:用户[@字:标识符=$name]/@字:姓名"/>
2380			</dc:creator>
2381			<dc:date>
2382				<xsl:value-of select="@字:日期"/>
2383			</dc:date>
2384			<xsl:apply-templates select="字:段落"/>
2385		</office:annotation>
2386	</xsl:template>
2387	<xsl:template match="字:字体">
2388		<xsl:if test="@字:字号">
2389			<xsl:attribute name="fo:font-size"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
2390			<xsl:attribute name="style:font-size-asian"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
2391			<xsl:attribute name="style:font-size-complex"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
2392		</xsl:if>
2393		<xsl:if test="@字:相对字号 and self::node( )[not(parent::字:句属性)]">
2394			<xsl:variable name="stylename" select="parent::node()/@字:基式样引用"/>
2395			<xsl:variable name="zihao">
2396				<xsl:for-each select="/uof:UOF/uof:式样集//uof:段落式样[@字:标识符=$stylename]">
2397					<xsl:value-of select="字:字体/@字:字号"/>
2398				</xsl:for-each>
2399			</xsl:variable>
2400			<xsl:variable name="font-size" select="@字:相对字号"/>
2401			<xsl:attribute name="fo:font-size"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
2402			<xsl:attribute name="style:font-size-asian"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
2403			<xsl:attribute name="style:font-size-complex"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
2404		</xsl:if>
2405		<xsl:if test="@字:颜色">
2406			<xsl:attribute name="fo:color"><xsl:value-of select="@字:颜色"/></xsl:attribute>
2407		</xsl:if>
2408		<xsl:if test="@字:中文字体引用">
2409			<xsl:attribute name="style:font-name-asian"><xsl:value-of select="@字:中文字体引用"/></xsl:attribute>
2410		</xsl:if>
2411		<xsl:if test="@字:西文字体引用">
2412			<xsl:variable name="xiwen" select="@字:西文字体引用"/>
2413			<xsl:attribute name="style:font-name"><xsl:value-of select="translate($xiwen,'_',' ')"/></xsl:attribute>
2414		</xsl:if>
2415	</xsl:template>
2416	<xsl:template match="字:斜体">
2417		<xsl:if test="@字:值='true'">
2418			<xsl:attribute name="fo:font-style">italic</xsl:attribute>
2419			<xsl:attribute name="fo:font-style-asian">italic</xsl:attribute>
2420			<xsl:attribute name="style:font-style-asian">italic</xsl:attribute>
2421			<xsl:attribute name="style:font-style-complex">italic</xsl:attribute>
2422		</xsl:if>
2423	</xsl:template>
2424	<xsl:template match="字:粗体">
2425		<xsl:if test="@字:值='true'or @字:值='1'">
2426			<xsl:attribute name="fo:font-weight">bold</xsl:attribute>
2427			<xsl:attribute name="style:font-weight-asian">bold</xsl:attribute>
2428			<xsl:attribute name="style:font-weight-complex">bold</xsl:attribute>
2429		</xsl:if>
2430	</xsl:template>
2431	<xsl:template match="字:下划线">
2432		<xsl:choose>
2433			<xsl:when test="@字:类型 = 'single'">
2434				<xsl:attribute name="style:text-underline-style">solid</xsl:attribute>
2435				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2436			</xsl:when>
2437			<xsl:when test="@字:类型 = 'double'">
2438				<xsl:attribute name="style:text-underline-style">solid</xsl:attribute>
2439				<xsl:attribute name="style:text-underline-type">double</xsl:attribute>
2440				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2441			</xsl:when>
2442			<xsl:when test="@字:类型 = 'thick'">
2443				<xsl:attribute name="style:text-underline-style">solid</xsl:attribute>
2444				<xsl:attribute name="style:text-underline-width">bold</xsl:attribute>
2445			</xsl:when>
2446			<xsl:when test="@字:类型 = 'dotted'">
2447				<xsl:attribute name="style:text-underline-style">dotted</xsl:attribute>
2448				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2449			</xsl:when>
2450			<xsl:when test="@字:类型 = 'dotted-heavy'">
2451				<xsl:attribute name="style:text-underline-style">dotted</xsl:attribute>
2452				<xsl:attribute name="style:text-underline-width">bold</xsl:attribute>
2453			</xsl:when>
2454			<xsl:when test="@字:类型 = 'dash'">
2455				<xsl:attribute name="style:text-underline-style">dash</xsl:attribute>
2456				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2457			</xsl:when>
2458			<xsl:when test="@字:类型 = 'dashed-heavy'">
2459				<xsl:attribute name="style:text-underline-style">dash</xsl:attribute>
2460				<xsl:attribute name="style:text-underline-width">bold</xsl:attribute>
2461			</xsl:when>
2462			<xsl:when test="@字:类型 = 'dash-long'">
2463				<xsl:attribute name="style:text-underline-style">long-dash</xsl:attribute>
2464				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2465			</xsl:when>
2466			<xsl:when test="@字:类型 = 'dash-long-heavy'">
2467				<xsl:attribute name="style:text-underline-style">long-dash</xsl:attribute>
2468				<xsl:attribute name="style:text-underline-width">bold</xsl:attribute>
2469			</xsl:when>
2470			<xsl:when test="@字:类型 = 'dot-dash'">
2471				<xsl:attribute name="style:text-underline-style">dot-dash</xsl:attribute>
2472				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2473			</xsl:when>
2474			<xsl:when test="@字:类型 = 'dash-dot-heavy'">
2475				<xsl:attribute name="style:text-underline-style">dot-dash</xsl:attribute>
2476				<xsl:attribute name="style:text-underline-width">bold</xsl:attribute>
2477			</xsl:when>
2478			<xsl:when test="@字:类型 = 'dot-dot-dash'">
2479				<xsl:attribute name="style:text-underline-style">dot-dot-dash</xsl:attribute>
2480				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2481			</xsl:when>
2482			<xsl:when test="@字:类型 = 'dash-dot-dot-heavy'">
2483				<xsl:attribute name="style:text-underline-style">dot-dot-dash</xsl:attribute>
2484				<xsl:attribute name="style:text-underline-width">bold</xsl:attribute>
2485			</xsl:when>
2486			<xsl:when test="@字:类型 = 'wave'">
2487				<xsl:attribute name="style:text-underline-style">wave</xsl:attribute>
2488				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2489			</xsl:when>
2490			<xsl:when test="@字:类型 = 'wavy-heavy'">
2491				<xsl:attribute name="style:text-underline-style">wave</xsl:attribute>
2492				<xsl:attribute name="style:text-underline-width">bold</xsl:attribute>
2493			</xsl:when>
2494			<xsl:when test="@字:类型 = 'wavy-double'">
2495				<xsl:attribute name="style:text-underline-style">wave</xsl:attribute>
2496				<xsl:attribute name="style:text-underline-type">double</xsl:attribute>
2497				<xsl:attribute name="style:text-underline-width">auto</xsl:attribute>
2498			</xsl:when>
2499			<xsl:otherwise/>
2500		</xsl:choose>
2501		<xsl:choose>
2502			<xsl:when test="@字:颜色">
2503				<xsl:attribute name="style:text-underline-color"><xsl:choose><xsl:when test="@字:颜色='auto'">font-color</xsl:when><xsl:otherwise><xsl:value-of select="@字:颜色"/></xsl:otherwise></xsl:choose></xsl:attribute>
2504			</xsl:when>
2505			<xsl:otherwise>
2506				<xsl:attribute name="style:text-underline-color">font-color</xsl:attribute>
2507			</xsl:otherwise>
2508		</xsl:choose>
2509	</xsl:template>
2510	<xsl:template match="字:着重号">
2511		<xsl:if test="not(@字:类型='none')">
2512			<xsl:choose>
2513				<xsl:when test="@字:类型='dot'">
2514					<xsl:attribute name="style:text-emphasize">dot below</xsl:attribute>
2515				</xsl:when>
2516				<xsl:when test="@字:类型='accent above' ">
2517					<xsl:attribute name="style:text-emphasize">accent above</xsl:attribute>
2518				</xsl:when>
2519				<xsl:when test="@字:类型='dot above' ">
2520					<xsl:attribute name="style:text-emphasize">dot above</xsl:attribute>
2521				</xsl:when>
2522				<xsl:when test="@字:类型='disc above' ">
2523					<xsl:attribute name="style:text-emphasize">disc above</xsl:attribute>
2524				</xsl:when>
2525				<xsl:when test="@字:类型='circle above' ">
2526					<xsl:attribute name="style:text-emphasize">circle above</xsl:attribute>
2527				</xsl:when>
2528				<xsl:when test="@字:类型='accent below' ">
2529					<xsl:attribute name="style:text-emphasize">accent below</xsl:attribute>
2530				</xsl:when>
2531				<xsl:when test="@字:类型='dot below' ">
2532					<xsl:attribute name="style:text-emphasize">dot below</xsl:attribute>
2533				</xsl:when>
2534				<xsl:when test="@字:类型='disc below' ">
2535					<xsl:attribute name="style:text-emphasize">disc below</xsl:attribute>
2536				</xsl:when>
2537				<xsl:when test="@字:类型='circle below' ">
2538					<xsl:attribute name="style:text-emphasize">circle below</xsl:attribute>
2539				</xsl:when>
2540				<xsl:otherwise>none</xsl:otherwise>
2541			</xsl:choose>
2542		</xsl:if>
2543		<xsl:if test="字:颜色">
2544			<xsl:attribute name="fo:color"><xsl:value-of select="@字:颜色"/></xsl:attribute>
2545		</xsl:if>
2546	</xsl:template>
2547	<xsl:template match="字:隐藏文字">
2548		<xsl:attribute name="text:display"><xsl:value-of select="@字:值"/></xsl:attribute>
2549	</xsl:template>
2550	<xsl:template match="字:空心">
2551		<xsl:attribute name="style:text-outline"><xsl:value-of select="@字:值"/></xsl:attribute>
2552	</xsl:template>
2553	<xsl:template match="字:阴影">
2554		<xsl:if test="not(@字:值='false')">
2555			<xsl:attribute name="fo:text-shadow">1pt 1pt</xsl:attribute>
2556		</xsl:if>
2557	</xsl:template>
2558	<xsl:template match="字:闪动的">
2559		<xsl:attribute name="style:text-blinking"><xsl:value-of select="@字:闪动的"/></xsl:attribute>
2560	</xsl:template>
2561	<xsl:template match="字:删除线">
2562		<xsl:choose>
2563			<xsl:when test="@字:类型 = 'single' ">
2564				<xsl:attribute name="style:text-line-through-style">solid</xsl:attribute>
2565			</xsl:when>
2566			<xsl:when test="@字:类型 = 'double' ">
2567				<xsl:attribute name="style:text-line-through-type">double</xsl:attribute>
2568			</xsl:when>
2569			<xsl:when test="@字:类型 = 'bold' ">
2570				<xsl:attribute name="style:text-line-through-width">bold</xsl:attribute>
2571			</xsl:when>
2572			<xsl:when test="@字:类型 = 'xl' ">
2573				<xsl:attribute name="style:text-line-through-text">X</xsl:attribute>
2574			</xsl:when>
2575			<xsl:when test="@字:类型 = '/l' ">
2576				<xsl:attribute name="style:text-line-through-text">/</xsl:attribute>
2577			</xsl:when>
2578			<xsl:otherwise>
2579				<xsl:attribute name="style:text-crossing-out">none</xsl:attribute>
2580			</xsl:otherwise>
2581		</xsl:choose>
2582	</xsl:template>
2583	<xsl:template match="字:突出显示">
2584		<xsl:attribute name="fo:background-color">
2585			<xsl:choose>
2586				<xsl:when test="@字:颜色='auto'">transparent</xsl:when>
2587				<xsl:otherwise><xsl:value-of select="@字:颜色"/></xsl:otherwise>
2588			</xsl:choose>
2589		</xsl:attribute>
2590	</xsl:template>
2591	<xsl:template match="@字:颜色[not(.='auto')]">
2592		<xsl:attribute name="fo:color">#<xsl:value-of select="."/></xsl:attribute>
2593	</xsl:template>
2594	<xsl:template match="字:浮雕">
2595		<xsl:attribute name="style:font-relief"><xsl:choose><xsl:when test="@字:类型='engrave'">engraved</xsl:when><xsl:when test="@字:类型='emboss'">embossed</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute>
2596	</xsl:template>
2597	<xsl:template match="字:醒目字体">
2598		<xsl:choose>
2599			<xsl:when test="@字:类型='small-caps'">
2600				<xsl:attribute name="fo:font-variant">small-caps</xsl:attribute>
2601			</xsl:when>
2602			<xsl:when test="@字:类型='none'">
2603				<xsl:attribute name="fo:font-variant">normal</xsl:attribute>
2604				<xsl:attribute name="fo:text-transform">none</xsl:attribute>
2605			</xsl:when>
2606			<xsl:otherwise>
2607				<xsl:attribute name="fo:text-transform"><xsl:choose><xsl:when test="@字:类型='uppercase'">uppercase</xsl:when><xsl:when test="@字:类型='lowercase'">lowercase</xsl:when><xsl:when test="@字:类型='capital'">capitalize</xsl:when></xsl:choose></xsl:attribute>
2608			</xsl:otherwise>
2609		</xsl:choose>
2610	</xsl:template>
2611	<xsl:template match="字:位置" mode="oo">
2612		<xsl:attribute name="style:text-position"><xsl:variable name="val"><xsl:value-of select="."/></xsl:variable><xsl:choose><xsl:when test="$val='sub' or $val='super'"><xsl:value-of select="concat($val,' 58%')"/></xsl:when><xsl:when test="contains($val,'sub ') or contains($val,'super ')"><xsl:value-of select="concat($val,'%')"/></xsl:when><xsl:when test="not(contains($val,' '))"><xsl:value-of select="concat($val,'% 100%')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat(substring-before($val,' '),'% ',substring-after($val,' '),'%' )"/></xsl:otherwise></xsl:choose></xsl:attribute>
2613	</xsl:template>
2614	<xsl:template match="字:缩放">
2615		<xsl:attribute name="style:text-scale"><xsl:value-of select="."/>%</xsl:attribute>
2616	</xsl:template>
2617	<xsl:template match="字:字符间距">
2618		<xsl:attribute name="fo:letter-spacing"><xsl:value-of select="."/>cm</xsl:attribute>
2619	</xsl:template>
2620	<xsl:template match="字:调整字间距">
2621		<xsl:variable name="tt" select="字:调整字间距"/>
2622		<xsl:attribute name="style:letter-kerning"><xsl:choose><xsl:when test="$tt='1'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
2623	</xsl:template>
2624	<xsl:template match="字:外框">
2625		<xsl:attribute name="style:text-outline">true</xsl:attribute>
2626	</xsl:template>
2627	<xsl:template match="字:字符间距[parent::字:句属性]">
2628		<xsl:variable name="aa">
2629			<xsl:value-of select="."/>
2630		</xsl:variable>
2631		<xsl:attribute name="fo:letter-spacing"><xsl:value-of select="concat( $aa, $uofUnit)"/></xsl:attribute>
2632	</xsl:template>
2633	<xsl:template match="字:分节">
2634		<xsl:if test="字:节属性/字:脚注设置">
2635			<xsl:call-template name="脚注设置"/>
2636		</xsl:if>
2637		<xsl:if test="字:节属性/字:尾注设置">
2638			<xsl:call-template name="尾注设置"/>
2639		</xsl:if>
2640		<xsl:if test="字:节属性/字:行号设置">
2641			<xsl:call-template name="行编号"/>
2642		</xsl:if>
2643	</xsl:template>
2644	<xsl:template name="行编号">
2645		<xsl:element name="text:linenumbering-configuration">
2646			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:行号设置">
2647				<xsl:choose>
2648					<xsl:when test="@字:使用行号='false'">
2649						<xsl:attribute name="text:number-lines">false</xsl:attribute>
2650					</xsl:when>
2651					<xsl:otherwise>
2652						<xsl:attribute name="text:style-name">Line numbering</xsl:attribute>
2653					</xsl:otherwise>
2654				</xsl:choose>
2655				<xsl:if test="@字:编号方式">
2656					<xsl:choose>
2657						<xsl:when test="@字:编号方式='section'">
2658							<xsl:attribute name="text:count-in-floating-frames">true</xsl:attribute>
2659						</xsl:when>
2660						<xsl:when test="@字:编号方式='page'">
2661							<xsl:attribute name="text:restart-on-page">true</xsl:attribute>
2662						</xsl:when>
2663						<xsl:when test="字:编号方式='continuous'">
2664							<xsl:attribute name="text:count-empty-lines">true</xsl:attribute>
2665						</xsl:when>
2666					</xsl:choose>
2667				</xsl:if>
2668				<xsl:if test="@字:起始编号">
2669					<xsl:attribute name="style:num-format"><xsl:value-of select="@字:起始编号"/></xsl:attribute>
2670				</xsl:if>
2671				<xsl:if test="@字:距边界">
2672					<xsl:attribute name="text:offset"><xsl:value-of select="concat(@字:距边界,$uofUnit)"/></xsl:attribute>
2673				</xsl:if>
2674				<xsl:if test="@字:行号间隔">
2675					<xsl:attribute name="text:increment"><xsl:value-of select="@字:行号间隔"/></xsl:attribute>
2676				</xsl:if>
2677			</xsl:for-each>
2678		</xsl:element>
2679	</xsl:template>
2680	<xsl:template name="脚注设置">
2681		<xsl:element name="text:notes-configuration">
2682			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:脚注设置">
2683				<xsl:attribute name="text:note-class">footnote</xsl:attribute>
2684				<xsl:attribute name="text:master-page-name">Footnote</xsl:attribute>
2685				<xsl:attribute name="text:footnotes-position"><xsl:choose><xsl:when test="@字:位置='page-bottom'">page</xsl:when><xsl:when test="@字:位置='below-text'">document</xsl:when></xsl:choose></xsl:attribute>
2686				<xsl:attribute name="text:start-numbering-at"><xsl:choose><xsl:when test="@字:编号方式='continuous'">document</xsl:when><xsl:when test="@字:编号方式='section'">chapter</xsl:when><xsl:when test="@字:编号方式='page'">page</xsl:when></xsl:choose></xsl:attribute>
2687				<xsl:attribute name="text:start-value"><xsl:value-of select="@字:起始编号 - 1"/></xsl:attribute>
2688				<xsl:attribute name="style:num-format"><xsl:call-template name="oo数字格式"><xsl:with-param name="oo_format" select="@字:格式"/></xsl:call-template></xsl:attribute>
2689			</xsl:for-each>
2690		</xsl:element>
2691	</xsl:template>
2692	<xsl:template name="尾注设置">
2693		<xsl:element name="text:notes-configuration">
2694			<xsl:for-each select="/uof:UOF/uof:文字处理/字:主体/字:分节/字:节属性/字:尾注设置">
2695				<xsl:attribute name="text:note-class">endnote</xsl:attribute>
2696				<xsl:attribute name="text:master-page-name">Endnote</xsl:attribute>
2697				<xsl:attribute name="style:num-format"><xsl:call-template name="oo数字格式"><xsl:with-param name="oo_format" select="@字:格式"/></xsl:call-template></xsl:attribute>
2698				<xsl:attribute name="text:start-value"><xsl:value-of select="@字:起始编号 - 1"/></xsl:attribute>
2699			</xsl:for-each>
2700		</xsl:element>
2701	</xsl:template>
2702	<xsl:template name="paragraph-properties">
2703		<xsl:choose>
2704			<xsl:when test="descendant::字:页边距[@uof:左]">
2705				<xsl:attribute name="fo:margin-left"><xsl:value-of select="number((descendant::字:页边距/@uof:左)) * $other-to-cm-conversion-factor"/>cm</xsl:attribute>
2706			</xsl:when>
2707			<xsl:otherwise>
2708				<xsl:attribute name="fo:margin-left">0cm</xsl:attribute>
2709			</xsl:otherwise>
2710		</xsl:choose>
2711		<xsl:choose>
2712			<xsl:when test="descendant::字:页边距[@uof:右]">
2713				<xsl:attribute name="fo:margin-right"><xsl:value-of select="number((descendant::字:页边距/@uof:右)) * $other-to-cm-conversion-factor"/>cm</xsl:attribute>
2714			</xsl:when>
2715			<xsl:otherwise>
2716				<xsl:attribute name="fo:margin-right">0cm</xsl:attribute>
2717			</xsl:otherwise>
2718		</xsl:choose>
2719		<xsl:attribute name="fo:text-indent">0cm</xsl:attribute>
2720		<xsl:call-template name="bidi"/>
2721	</xsl:template>
2722	<xsl:template name="bidi">
2723	</xsl:template>
2724	<xsl:template match="字:文字表">
2725		<xsl:choose>
2726			<xsl:when test="@字:类型 = 'sub-table'">
2727				<xsl:element name="table:table">
2728					<xsl:attribute name="table:is-sub-table">true</xsl:attribute>
2729					<xsl:apply-templates select="字:文字表属性">
2730						<xsl:with-param name="sub-table" select="@字:类型"/>
2731					</xsl:apply-templates>
2732					<xsl:if test="字:行[position()=1]/字:表行属性/字:表头行/@字:值='true'">
2733						<xsl:element name="table:table-header-rows">
2734							<xsl:for-each select="字:行">
2735								<xsl:if test="字:表行属性/字:表头行/@字:值='true'">
2736									<xsl:apply-templates select="."/>
2737								</xsl:if>
2738							</xsl:for-each>
2739						</xsl:element>
2740					</xsl:if>
2741					<xsl:for-each select="字:行[not(字:表行属性/字:表头行) or (字:表行属性/字:表头行/@字:值='false')]">
2742						<xsl:apply-templates select="."/>
2743					</xsl:for-each>
2744				</xsl:element>
2745			</xsl:when>
2746			<xsl:otherwise>
2747				<xsl:element name="table:table">
2748					<xsl:if test="字:文字表属性">
2749						<xsl:attribute name="table:style-name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/></xsl:attribute>
2750					</xsl:if>
2751					<xsl:if test="not(字:文字表属性/字:列宽集/字:列宽)">
2752						<xsl:for-each select="字:行[1]/字:单元格">
2753							<xsl:element name="table:table-column">
2754								<xsl:attribute name="table:style-name">Table<xsl:number count="字:文字表" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.C<xsl:number value="count(preceding::字:单元格)+1"/></xsl:attribute>
2755							</xsl:element>
2756						</xsl:for-each>
2757					</xsl:if>
2758					<xsl:apply-templates select="字:文字表属性"/>
2759					<xsl:if test="字:行[position()=1]/字:表行属性/字:表头行/@字:值='true'">
2760						<xsl:element name="table:table-header-rows">
2761							<xsl:for-each select="字:行">
2762								<xsl:if test="字:表行属性/字:表头行/@字:值='true'">
2763									<xsl:apply-templates select="."/>
2764								</xsl:if>
2765							</xsl:for-each>
2766						</xsl:element>
2767					</xsl:if>
2768					<xsl:for-each select="字:行[not(字:表行属性/字:表头行) or (字:表行属性/字:表头行/@字:值='false')]">
2769						<xsl:apply-templates select="."/>
2770					</xsl:for-each>
2771				</xsl:element>
2772			</xsl:otherwise>
2773		</xsl:choose>
2774	</xsl:template>
2775	<xsl:template match="字:文字表属性">
2776		<xsl:param name="sub-table"/>
2777		<xsl:apply-templates select="字:列宽集">
2778			<xsl:with-param name="sub-table" select="$sub-table"/>
2779		</xsl:apply-templates>
2780	</xsl:template>
2781	<xsl:template match="字:列宽集">
2782		<xsl:param name="sub-table"/>
2783		<xsl:apply-templates select="字:列宽">
2784			<xsl:with-param name="sub-table" select="$sub-table"/>
2785		</xsl:apply-templates>
2786	</xsl:template>
2787	<xsl:template match="字:列宽">
2788		<xsl:param name="sub-table"/>
2789		<xsl:element name="table:table-column">
2790			<xsl:choose>
2791				<xsl:when test="$sub-table='sub-table'">
2792					<xsl:variable name="subtable-leikuan" select="."/>
2793					<xsl:variable name="weizi">
2794						<xsl:for-each select="ancestor::*[name()='字:文字表' and not(@字:类型='sub-table')]/字:文字表属性/字:列宽集/字:列宽">
2795							<xsl:variable name="yyyyy" select="."/>
2796							<xsl:if test="substring(string($yyyyy),1,string-length(string($yyyyy))-1)=substring(string($subtable-leikuan),1,string-length(string($subtable-leikuan))-1)">
2797								<xsl:value-of select="concat(position(),';')"/>
2798							</xsl:if>
2799						</xsl:for-each>
2800					</xsl:variable>
2801					<xsl:variable name="xxxxx">
2802						<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>
2803					</xsl:variable>
2804					<xsl:attribute name="table:style-name"><xsl:value-of select="concat('Table',$xxxxx,'.C',substring-before($weizi,';'))"/></xsl:attribute>
2805				</xsl:when>
2806				<xsl:otherwise>
2807					<xsl:attribute name="table:style-name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.C<xsl:number count="字:列宽" from="/uof:UOF/uof:文字处理/字:主体" level="single" format="1"/></xsl:attribute>
2808				</xsl:otherwise>
2809			</xsl:choose>
2810		</xsl:element>
2811	</xsl:template>
2812	<xsl:template match="字:行">
2813		<xsl:element name="table:table-row">
2814			<xsl:attribute name="table:style-name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.R<xsl:number count="字:行" from="/uof:UOF/uof:文字处理/字:主体/字:文字表[not (@字:类型='sub-table')]" level="any" format="1"/></xsl:attribute>
2815			<xsl:for-each select="node()">
2816				<xsl:choose>
2817					<xsl:when test="name()='字:单元格'">
2818						<xsl:call-template name="字:单元格"/>
2819					</xsl:when>
2820					<xsl:when test="name()='字:单元格覆盖'">
2821
2822					</xsl:when>
2823					<xsl:otherwise/>
2824				</xsl:choose>
2825			</xsl:for-each>
2826		</xsl:element>
2827	</xsl:template>
2828	<xsl:template name="字:单元格">
2829		<xsl:element name="table:table-cell">
2830			<xsl:attribute name="table:style-name">Table<xsl:number count="字:文字表[not (@字:类型='sub-table')]" from="/uof:UOF/uof:文字处理/字:主体" level="any" format="1"/>.R<xsl:number count="字:行" from="/uof:UOF/uof:文字处理/字:主体/字:文字表[not (@字:类型='sub-table')]" level="any" format="1"/>C<xsl:number count="字:单元格" from="/uof:UOF/uof:文字处理/字:主体/字:文字表[not (@字:类型='sub-table')]/字:行" level="any" format="1"/></xsl:attribute>
2831			<xsl:if test="字:单元格属性">
2832				<xsl:apply-templates select="字:单元格属性"/>
2833			</xsl:if>
2834			<xsl:for-each select="node( )">
2835				<xsl:choose>
2836					<xsl:when test="name( )='字:段落'">
2837						<xsl:apply-templates select="."/>
2838					</xsl:when>
2839					<xsl:when test="name( )='字:文字表'">
2840						<xsl:apply-templates select="."/>
2841					</xsl:when>
2842					<xsl:otherwise>
2843					</xsl:otherwise>
2844				</xsl:choose>
2845			</xsl:for-each>
2846		</xsl:element>
2847	</xsl:template>
2848	<xsl:template match="字:单元格属性/字:边框">
2849		<xsl:apply-templates/>
2850	</xsl:template>
2851	<xsl:template match="字:对齐[parent::字:文字表属性]">
2852
2853	</xsl:template>
2854	<xsl:template match="uof:上">
2855		<xsl:choose>
2856			<xsl:when test="@uof:宽度='nil' ">
2857				<xsl:attribute name="fo:border-top">none</xsl:attribute>
2858			</xsl:when>
2859			<xsl:when test="@uof:宽度 and @uof:颜色">
2860				<xsl:attribute name="fo:border-top"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/><xsl:text> </xsl:text><xsl:choose><xsl:when test="@uof:颜色 ='auto'"><xsl:text>solid #000000</xsl:text></xsl:when><xsl:otherwise><xsl:text>solid </xsl:text><xsl:value-of select="@uof:颜色"/></xsl:otherwise></xsl:choose></xsl:attribute>
2861			</xsl:when>
2862			<xsl:when test="@uof:宽度">
2863				<xsl:attribute name="fo:border-top"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/></xsl:attribute>
2864			</xsl:when>
2865		</xsl:choose>
2866	</xsl:template>
2867	<xsl:template match="uof:下">
2868		<xsl:choose>
2869			<xsl:when test="@uof:宽度='nil' ">
2870				<xsl:attribute name="fo:border-bottom">none</xsl:attribute>
2871			</xsl:when>
2872			<xsl:when test="@uof:宽度 and @uof:颜色">
2873				<xsl:attribute name="fo:border-bottom"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/><xsl:text> </xsl:text><xsl:choose><xsl:when test="@uof:颜色 ='auto'"><xsl:text>solid #000000</xsl:text></xsl:when><xsl:otherwise><xsl:text>solid </xsl:text><xsl:value-of select="@uof:颜色"/></xsl:otherwise></xsl:choose></xsl:attribute>
2874			</xsl:when>
2875			<xsl:when test="@uof:宽度">
2876				<xsl:attribute name="fo:border-bottom"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/></xsl:attribute>
2877			</xsl:when>
2878		</xsl:choose>
2879	</xsl:template>
2880	<xsl:template match="uof:左">
2881		<xsl:choose>
2882			<xsl:when test="@uof:宽度='nil'">
2883				<xsl:attribute name="fo:border-left">none</xsl:attribute>
2884			</xsl:when>
2885			<xsl:when test="@uof:宽度 and @uof:颜色">
2886				<xsl:attribute name="fo:border-left"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/><xsl:text> </xsl:text><xsl:choose><xsl:when test="@uof:颜色 ='auto'"><xsl:text>solid #000000</xsl:text></xsl:when><xsl:otherwise><xsl:text>solid </xsl:text><xsl:value-of select="@uof:颜色"/></xsl:otherwise></xsl:choose></xsl:attribute>
2887			</xsl:when>
2888			<xsl:when test="@uof:宽度">
2889				<xsl:attribute name="fo:border-left"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/></xsl:attribute>
2890			</xsl:when>
2891		</xsl:choose>
2892	</xsl:template>
2893	<xsl:template match="uof:右">
2894		<xsl:choose>
2895			<xsl:when test="@uof:宽度='nil' ">
2896				<xsl:attribute name="fo:border-right">none</xsl:attribute>
2897			</xsl:when>
2898			<xsl:when test="@uof:宽度 and @uof:颜色">
2899				<xsl:attribute name="fo:border-right"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/><xsl:text> </xsl:text><xsl:choose><xsl:when test="@uof:颜色 ='auto'"><xsl:text>solid #000000</xsl:text></xsl:when><xsl:otherwise><xsl:text>solid </xsl:text><xsl:value-of select="@uof:颜色"/></xsl:otherwise></xsl:choose></xsl:attribute>
2900			</xsl:when>
2901			<xsl:when test="@uof:宽度">
2902				<xsl:attribute name="fo:border-right"><xsl:value-of select="concat(number(@uof:宽度),$uofUnit)"/></xsl:attribute>
2903			</xsl:when>
2904		</xsl:choose>
2905	</xsl:template>
2906	<xsl:template match="字:文字表属性/字:边框">
2907		<xsl:apply-templates/>
2908	</xsl:template>
2909	<xsl:template match="字:单元格属性/字:边框">
2910		<xsl:call-template name="uof:边框"/>
2911	</xsl:template>
2912	<xsl:template match="字:左缩进">
2913	</xsl:template>
2914	<xsl:template match="字:单元格属性">
2915		<xsl:if test="字:跨列/@字:值">
2916			<xsl:attribute name="table:number-columns-spanned"><xsl:value-of select="字:跨列/@字:值"/></xsl:attribute>
2917		</xsl:if>
2918	</xsl:template>
2919	<xsl:template name="编号风格">
2920		<xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号">
2921			<xsl:element name="style:style">
2922				<xsl:attribute name="style:name"><xsl:value-of select="concat('P',@字:标识符)"/></xsl:attribute>
2923				<xsl:attribute name="style:family">paragraph</xsl:attribute>
2924				<xsl:attribute name="style:parent-style-name">Standard</xsl:attribute>
2925				<xsl:attribute name="style:list-style-name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
2926				<xsl:element name="style:text-properties">
2927					<xsl:attribute name="fo:margin-left">0cm</xsl:attribute>
2928					<xsl:attribute name="fo:margin-right">0cm</xsl:attribute>
2929					<xsl:attribute name="fo:color"><xsl:value-of select="字:级别/字:符号字体/字:字体/字:颜色"/></xsl:attribute>
2930					<xsl:attribute name="fo:text-indent"/>
2931					<xsl:attribute name="style:auto-text-indent">false</xsl:attribute>
2932				</xsl:element>
2933			</xsl:element>
2934		</xsl:for-each>
2935	</xsl:template>
2936	<xsl:template name="编号格式">
2937		<xsl:attribute name="style:num-format"><xsl:choose><xsl:when test="string(字:编号格式)='lower-letter'">a</xsl:when><xsl:when test="string(字:编号格式)='upper-letter'">A</xsl:when><xsl:when test="string(字:编号格式)='lower-roman'">i</xsl:when><xsl:when test="string(字:编号格式)='upper-roman'">I</xsl:when><xsl:when test="string(字:编号格式)='decimal-enclosed-circle'">①, ②, ③, ...</xsl:when><xsl:when test="string(字:编号格式)='ideograph-traditional'">甲, 乙, 丙, ...</xsl:when><xsl:when test="string(字:编号格式)='ideograph-zodiac'">子, 丑, 寅, ...</xsl:when><xsl:when test="string(字:编号格式)='chinese-counting'">一, 二, 三, ...</xsl:when><xsl:when test="string(字:编号格式)='chinese-legal-simplified'">壹, 贰, 叁, ...</xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:attribute>
2938	</xsl:template>
2939	<xsl:template name="图形style">
2940		<xsl:for-each select="/uof:UOF/uof:对象集/图:图形">
2941			<xsl:element name="style:style">
2942				<xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
2943				<xsl:attribute name="style:family">graphic</xsl:attribute>
2944				<xsl:attribute name="style:parent-style-name">Graphics</xsl:attribute>
2945				<xsl:element name="style:text-properties">
2946					<xsl:attribute name="svg:stroke-width"><xsl:value-of select="图:预定义图形/图:属性/图:线粗细"/></xsl:attribute>
2947					<xsl:attribute name="svg:stroke-color"><xsl:value-of select="图:预定义图形/图:属性/图:线颜色"/></xsl:attribute>
2948					<xsl:attribute name="draw:stroke-dash"><xsl:value-of select="图:预定义图形/图:属性/图:线型"/></xsl:attribute>
2949					<xsl:attribute name="draw:marker-start"><xsl:value-of select="图:预定义图形/图:属性/图:前端箭头/图:式样"/></xsl:attribute>
2950					<xsl:attribute name="draw:marker-end"><xsl:value-of select="图:预定义图形/图:属性/图:后端箭头/图:式样"/></xsl:attribute>
2951				</xsl:element>
2952			</xsl:element>
2953		</xsl:for-each>
2954	</xsl:template>
2955	<xsl:template name="duanluoshuxing">
2956		<xsl:for-each select="/uof:UOF/uof:文字处理//字:段落">
2957			<xsl:choose>
2958				<xsl:when test="count(字:句)&lt;=1">
2959					<xsl:call-template name="单个或者没有句"/>
2960				</xsl:when>
2961				<xsl:otherwise>
2962					<xsl:call-template name="多个句"/>
2963				</xsl:otherwise>
2964			</xsl:choose>
2965		</xsl:for-each>
2966	</xsl:template>
2967	<xsl:template name="单个或者没有句">
2968		<xsl:variable name="stylename" select="字:段落属性/@字:式样引用"/>
2969		<xsl:element name="style:style">
2970			<xsl:attribute name="style:name">P<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落"/></xsl:attribute>
2971			<xsl:attribute name="style:family">paragraph</xsl:attribute>
2972			<xsl:if test="name(preceding-sibling::*[1])='字:分节'">
2973				<xsl:attribute name="style:master-page-name"><xsl:value-of select="preceding-sibling::字:分节[1]/@字:名称"/></xsl:attribute>
2974			</xsl:if>
2975			<xsl:if test="字:段落属性/@字:式样引用">
2976				<xsl:variable name="duanluoyinyong">
2977					<xsl:value-of select="字:段落属性/@字:式样引用"/>
2978				</xsl:variable>
2979				<xsl:for-each select="/uof:UOF//uof:段落式样">
2980					<xsl:if test="$duanluoyinyong=@字:标识符">
2981						<xsl:if test="@字:基式样引用">
2982							<xsl:choose>
2983								<xsl:when test="@字:标识符=/uof:UOF/uof:文字处理/字:主体/字:段落/字:段落属性/字:格式修订/@字:修订信息引用">
2984									<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
2985								</xsl:when>
2986								<xsl:otherwise>
2987									<xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
2988									<xsl:variable name="aa">
2989										<xsl:value-of select="@字:基式样引用"/>
2990									</xsl:variable>
2991									<xsl:for-each select="/uof:UOF//uof:段落式样">
2992										<xsl:if test="$aa=@字:标识符">
2993											<xsl:attribute name="style:display-name"><xsl:choose><xsl:when test="@字:别名"><xsl:value-of select="@字:别名"/></xsl:when><xsl:otherwise><xsl:value-of select="@字:名称"/></xsl:otherwise></xsl:choose></xsl:attribute>
2994											<xsl:element name="style:paragraph-properties">
2995												<xsl:if test="字:对齐">
2996													<xsl:if test="字:对齐/@字:文字对齐">
2997														<xsl:attribute name="style:vertical-align"><xsl:choose><xsl:when test="字:对齐/@字:文字对齐='base'">baseline</xsl:when><xsl:when test="字:对齐/@字:文字对齐='center'">middle</xsl:when><xsl:otherwise><xsl:value-of select="字:对齐/@字:文字对齐"/></xsl:otherwise></xsl:choose></xsl:attribute>
2998													</xsl:if>
2999													<xsl:if test="字:对齐/@字:水平对齐">
3000														<xsl:attribute name="fo:text-align"><xsl:choose><xsl:when test="字:对齐/@字:水平对齐='left'">start</xsl:when><xsl:when test="字:对齐/@字:水平对齐='right'">end</xsl:when><xsl:when test="字:对齐/@字:水平对齐='center'">center</xsl:when><xsl:otherwise>justify</xsl:otherwise></xsl:choose></xsl:attribute>
3001														<xsl:if test="字:对齐/@字:水平对齐='distributed'">
3002															<xsl:attribute name="fo:text-align-last">justify</xsl:attribute>
3003														</xsl:if>
3004														<xsl:attribute name="style:justify-single-word">false</xsl:attribute>
3005													</xsl:if>
3006												</xsl:if>
3007												<xsl:call-template name="ParagraphAttr"/>
3008												<xsl:if test="字:段落属性/字:制表位设置">
3009													<xsl:call-template name="ootab"/>
3010												</xsl:if>
3011											</xsl:element>
3012											<xsl:if test="字:句属性">
3013												<xsl:variable name="bsh">
3014													<xsl:value-of select="字:句属性/@字:式样引用"/>
3015												</xsl:variable>
3016												<xsl:element name="style:text-properties">
3017													<xsl:for-each select="/uof:UOF//uof:句式样">
3018														<xsl:if test="$bsh=@字:标识符">
3019															<xsl:apply-templates select="./*"/>
3020														</xsl:if>
3021													</xsl:for-each>
3022												</xsl:element>
3023											</xsl:if>
3024										</xsl:if>
3025									</xsl:for-each>
3026								</xsl:otherwise>
3027							</xsl:choose>
3028						</xsl:if>
3029						<xsl:if test="字:边框">
3030							<xsl:call-template name="uof:边框"/>
3031						</xsl:if>
3032					</xsl:if>
3033				</xsl:for-each>
3034			</xsl:if>
3035			<xsl:element name="style:text-properties">
3036				<xsl:if test="字:句/字:句属性/字:字体">
3037					<xsl:variable name="ziti">
3038						<xsl:value-of select="字:句/字:句属性/字:字体/@字:中文字体引用"/>
3039					</xsl:variable>
3040					<xsl:for-each select="/uof:UOF/uof:式样集/uof:字体集/uof:字体声明">
3041						<xsl:if test="@uof:标识符=$ziti">
3042							<xsl:attribute name="style:font-name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
3043							<xsl:attribute name="style:font-name-asian"><xsl:value-of select="@uof:名称"/></xsl:attribute>
3044						</xsl:if>
3045					</xsl:for-each>
3046					<xsl:if test="字:句/字:句属性/字:字体/@字:字号">
3047						<xsl:attribute name="fo:font-size"><xsl:value-of select="字:句/字:句属性/字:字体/@字:字号"/></xsl:attribute>
3048						<xsl:attribute name="style:font-size-asian"><xsl:value-of select="字:句/字:句属性/字:字体/@字:字号"/></xsl:attribute>
3049					</xsl:if>
3050				</xsl:if>
3051				<xsl:if test="字:段落属性/字:句属性">
3052					<xsl:for-each select="字:段落属性/字:句属性">
3053						<xsl:apply-templates select="./*"/>
3054					</xsl:for-each>
3055				</xsl:if>
3056				<xsl:apply-templates select="字:句/字:句属性/字:浮雕 | 字:句/字:句属性/字:边框 | 字:句/字:句属性/字:缩放 | 字:句/字:句属性/字:阴影 | 字:句/字:句属性/字:删除线 | 字:句/字:句属性/字:下划线 |  字:句/字:填充"/>
3057				<xsl:call-template name="ParagraphAttr"/>
3058				<xsl:if test="字:段落属性/字:制表位设置">
3059					<xsl:call-template name="ootab"/>
3060				</xsl:if>
3061				<xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样[@字:标识符=$stylename]">
3062					<xsl:apply-templates select="./*"/>
3063				</xsl:for-each>
3064			</xsl:element>
3065			<style:paragraph-properties>
3066				<xsl:if test="字:句/字:分栏符">
3067					<xsl:attribute name="fo:break-before">column</xsl:attribute>
3068				</xsl:if>
3069				<xsl:if test="字:句/字:分页符">
3070					<xsl:attribute name="fo:break-before">page</xsl:attribute>
3071				</xsl:if>
3072				<xsl:call-template name="ParagraphAttr"/>
3073				<xsl:if test="字:段落属性/字:制表位设置">
3074					<xsl:call-template name="ootab"/>
3075				</xsl:if>
3076			</style:paragraph-properties>
3077		</xsl:element>
3078	</xsl:template>
3079	<xsl:template name="ParagraphAttr">
3080		<xsl:apply-templates select="字:段落属性/字:填充"/>
3081		<xsl:if test="字:段落属性/字:对齐">
3082			<xsl:if test="字:段落属性/字:对齐/@字:文字对齐">
3083				<xsl:attribute name="style:vertical-align"><xsl:choose><xsl:when test="字:段落属性/字:对齐/@字:文字对齐='base'">baseline</xsl:when><xsl:when test="字:段落属性/字:对齐/@字:文字对齐='center'">middle</xsl:when><xsl:otherwise><xsl:value-of select="字:段落属性/字:对齐/@字:文字对齐"/></xsl:otherwise></xsl:choose></xsl:attribute>
3084			</xsl:if>
3085			<xsl:if test="字:段落属性/字:对齐/@字:水平对齐">
3086				<xsl:attribute name="fo:text-align"><xsl:choose><xsl:when test="字:段落属性/字:对齐/@字:水平对齐='left'">start</xsl:when><xsl:when test="字:段落属性/字:对齐/@字:水平对齐='right'">end</xsl:when><xsl:when test="字:段落属性/字:对齐/@字:水平对齐='center'">center</xsl:when><xsl:otherwise>justify</xsl:otherwise></xsl:choose></xsl:attribute>
3087				<xsl:if test="字:段落属性/字:对齐/@字:水平对齐='distributed'">
3088					<xsl:attribute name="fo:text-align-last">justify</xsl:attribute>
3089				</xsl:if>
3090				<xsl:attribute name="style:justify-single-word">false</xsl:attribute>
3091			</xsl:if>
3092		</xsl:if>
3093		<xsl:choose>
3094			<xsl:when test="字:段落属性/字:缩进">
3095				<xsl:variable name="a1">
3096					<xsl:value-of select="字:段落属性/字:缩进/字:左/字:相对/@字:值"/>
3097				</xsl:variable>
3098				<xsl:variable name="a2">
3099					<xsl:value-of select="字:段落属性/字:缩进/字:右/字:相对/@字:值"/>
3100				</xsl:variable>
3101				<xsl:choose>
3102					<xsl:when test="字:段落属性/字:缩进/字:左/字:相对 or 字:段落属性/字:缩进/字:右/字:相对">
3103						<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat($a1 * 0.37,'cm')"/></xsl:attribute>
3104						<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat($a2 * 0.37,'cm')"/></xsl:attribute>
3105					</xsl:when>
3106					<xsl:otherwise>
3107						<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(字:段落属性/字:缩进/字:左/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3108						<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(字:段落属性/字:缩进/字:右/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3109					</xsl:otherwise>
3110				</xsl:choose>
3111				<xsl:attribute name="fo:text-indent"><xsl:value-of select="concat(字:段落属性/字:缩进/字:首行/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3112			</xsl:when>
3113			<xsl:when test="ancestor::uof:UOF/uof:式样集/uof:自动编号集/字:自动编号/字:级别[following-sibling::字:级别[position()=1]/@字:级别值='1']/字:缩进">
3114				<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(ancestor::uof:UOF/uof:式样集/uof:自动编号集/字:自动编号/字:级别[following-sibling::字:级别[position()=1]/@字:级别值='1']/字:缩进/字:左/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3115				<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(ancestor::uof:UOF/uof:式样集/uof:自动编号集/字:自动编号/字:级别[following-sibling::字:级别[position()=1]/@字:级别值='1']/字:缩进/字:右/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3116				<xsl:attribute name="fo:text-indent"><xsl:value-of select="concat(ancestor::uof:UOF/uof:式样集/uof:自动编号集/字:自动编号/字:级别[following-sibling::字:级别[position()=1]/@字:级别值='1']/字:缩进/字:首行/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3117			</xsl:when>
3118		</xsl:choose>
3119		<xsl:if test="字:段落属性/字:行距">
3120			<xsl:variable name="type">
3121				<xsl:value-of select="字:段落属性/字:行距/@字:类型"/>
3122			</xsl:variable>
3123			<xsl:variable name="val">
3124				<xsl:value-of select="字:段落属性/字:行距/@字:值"/>
3125			</xsl:variable>
3126			<xsl:choose>
3127				<xsl:when test="$type='fixed'">
3128					<xsl:attribute name="fo:line-height"><xsl:value-of select="concat($val,$uofUnit)"/></xsl:attribute>
3129				</xsl:when>
3130				<xsl:when test="$type='multi-lines'">
3131					<xsl:attribute name="fo:line-height"><xsl:value-of select="concat($val * 100,'%')"/></xsl:attribute>
3132				</xsl:when>
3133				<xsl:when test="$type='at-least'">
3134					<xsl:attribute name="style:line-height-at-least"><xsl:value-of select="concat($val,$uofUnit)"/></xsl:attribute>
3135				</xsl:when>
3136				<xsl:when test="$type='line-space'">
3137					<xsl:attribute name="style:line-spacing"><xsl:value-of select="concat($val,$uofUnit)"/></xsl:attribute>
3138				</xsl:when>
3139			</xsl:choose>
3140		</xsl:if>
3141		<xsl:if test="字:段落属性/字:段间距">
3142			<xsl:if test="字:段落属性/字:段间距/字:段前距/字:绝对值/@字:值">
3143				<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:段落属性/字:段间距/字:段前距/字:绝对值/@字:值,$uofUnit)"/></xsl:attribute>
3144			</xsl:if>
3145			<xsl:if test="字:段落属性/字:段间距/字:段后距/字:绝对值/@字:值">
3146				<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(字:段落属性/字:段间距/字:段后距/字:绝对值/@字:值,$uofUnit)"/></xsl:attribute>
3147			</xsl:if>
3148			<xsl:variable name="aa">
3149				<xsl:value-of select="字:段落属性/字:段间距/字:段前距/字:相对值/@字:值"/>
3150			</xsl:variable>
3151			<xsl:variable name="bb">
3152				<xsl:value-of select="字:段落属性/字:段间距/字:段后距/字:相对值/@字:值"/>
3153			</xsl:variable>
3154			<xsl:if test="字:段落属性/字:段间距/字:段前距/字:相对值/@字:值">
3155				<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat($aa * 15.6,$uofUnit)"/></xsl:attribute>
3156			</xsl:if>
3157			<xsl:if test="字:段落属性/字:段间距/字:段后距/字:相对值/@字:值">
3158				<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat($bb * 15.6,$uofUnit)"/></xsl:attribute>
3159			</xsl:if>
3160		</xsl:if>
3161		<xsl:if test="字:段落属性/字:孤行控制">
3162			<xsl:attribute name="fo:widows"><xsl:value-of select="字:段落属性/字:孤行控制"/></xsl:attribute>
3163		</xsl:if>
3164		<xsl:if test="字:段落属性/字:寡行控制">
3165			<xsl:attribute name="fo:orphans"><xsl:value-of select="字:段落属性/字:寡行控制"/></xsl:attribute>
3166		</xsl:if>
3167		<xsl:if test="字:段落属性/字:段中不分页">
3168			<xsl:attribute name="fo:keep-together"><xsl:choose><xsl:when test="字:段落属性/字:段中不分页/@字:值='1' or 字:段落属性/字:段中不分页/@字:值='true'">always</xsl:when><xsl:otherwise>auto</xsl:otherwise></xsl:choose></xsl:attribute>
3169		</xsl:if>
3170		<xsl:if test="字:段落属性/字:与下段同页">
3171			<xsl:attribute name="fo:keep-with-next"><xsl:choose><xsl:when test="字:段落属性/字:与下段同页/@字:值='1' or 字:段落属性/字:与下段同页/@字:值='true'">always</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3172		</xsl:if>
3173		<xsl:for-each select="字:段落属性/字:边框">
3174			<xsl:call-template name="uof:边框"/>
3175		</xsl:for-each>
3176		<xsl:for-each select="字:段落属性/字:填充">
3177			<xsl:call-template name="uof:填充"/>
3178		</xsl:for-each>
3179		<xsl:if test="字:段落属性/字:对齐网格">
3180			<xsl:attribute name="style:snap-to-layout-grid"><xsl:choose><xsl:when test="字:段落属性/字:对齐网格/@字:值='1' or 字:段落属性/字:对齐网格/@字:值='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3181		</xsl:if>
3182		<xsl:if test="字:段落属性/字:取消断字">
3183			<xsl:attribute name="fo:hyphenation-ladder-count">no-limit</xsl:attribute>
3184			<xsl:attribute name="fo:hyphenation-remain-char-count">2</xsl:attribute>
3185			<xsl:attribute name="fo:hyphenation-push-char-count">2</xsl:attribute>
3186			<xsl:attribute name="fo:hyphenate"><xsl:choose><xsl:when test="字:段落属性/字:取消断字/@字:值='1' or 字:段落属性/字:取消断字/@字:值='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3187		</xsl:if>
3188		<xsl:if test="字:段落属性/字:取消行号">
3189			<xsl:attribute name="text:number-lines"><xsl:choose><xsl:when test="字:段落属性/字:取消行号/@字:值='1' or 字:段落属性/字:取消行号/@字:值='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3190		</xsl:if>
3191		<xsl:if test="字:段落属性/字:行首尾标点控制">
3192			<xsl:attribute name="style:punctuation-wrap"><xsl:choose><xsl:when test="字:段落属性/字:行首尾标点控制/@字:值='1' or 字:段落属性/字:行首尾标点控制/@字:值='true'">hanging</xsl:when><xsl:otherwise>simple</xsl:otherwise></xsl:choose></xsl:attribute>
3193		</xsl:if>
3194		<xsl:if test="字:段落属性/字:是否行首标点压缩/@字:值='true'">
3195			<xsl:attribute name="style:punctuation-compress">false</xsl:attribute>
3196		</xsl:if>
3197		<xsl:if test="字:段落属性/字:中文习惯首尾字符">
3198			<xsl:attribute name="style:line-break"><xsl:choose><xsl:when test="字:段落属性/字:中文习惯首尾字符/@字:值='1' or 字:段落属性/字:中文习惯首尾字符/@字:值='true'">strict</xsl:when><xsl:otherwise>normal</xsl:otherwise></xsl:choose></xsl:attribute>
3199		</xsl:if>
3200		<xsl:if test="字:段落属性/字:自动调整中英文字符间距 or 字:段落属性/字:自动调整中文与数字间距">
3201			<xsl:attribute name="style:text-autospace"><xsl:choose><xsl:when test="字:段落属性/字:自动调整中英文字符间距/@字:值='1' or 字:段落属性/字:自动调整中文与数字间距/@字:值='1'or 字:段落属性/字:自动调整中英文字符间距/@字:值='true' or 字:段落属性/字:自动调整中文与数字间距/@字:值='true'">ideograph-alpha</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute>
3202		</xsl:if>
3203		<xsl:if test="字:段落属性/字:首字下沉">
3204			<xsl:element name="style:drop-cap">
3205				<xsl:if test="字:段落属性/字:首字下沉/@字:行数">
3206					<xsl:attribute name="style:lines"><xsl:value-of select="字:段落属性/字:首字下沉/@字:行数"/></xsl:attribute>
3207				</xsl:if>
3208				<xsl:if test="字:段落属性/字:首字下沉/@字:间距">
3209					<xsl:attribute name="style:distance"><xsl:value-of select="concat(字:段落属性/字:首字下沉/@字:间距,$uofUnit)"/></xsl:attribute>
3210				</xsl:if>
3211				<xsl:if test="字:段落属性/字:首字下沉/@字:字体引用">
3212					<xsl:attribute name="style:style-name"><xsl:value-of select="translate(字:段落属性/字:首字下沉/@字:字体引用,'_',' ')"/></xsl:attribute>
3213				</xsl:if>
3214				<xsl:if test="字:段落属性/字:首字下沉/@字:字符数">
3215					<xsl:attribute name="style:length"><xsl:choose><xsl:when test="字:段落属性/字:首字下沉/@字:字符数='1'">word</xsl:when><xsl:otherwise><xsl:value-of select="字:段落属性/字:首字下沉/@字:字符数"/></xsl:otherwise></xsl:choose></xsl:attribute>
3216				</xsl:if>
3217			</xsl:element>
3218		</xsl:if>
3219	</xsl:template>
3220	<xsl:template name="XDParagraphAttr">
3221		<xsl:apply-templates select="字:填充"/>
3222		<xsl:if test="字:对齐">
3223			<xsl:if test="字:对齐/@字:文字对齐">
3224				<xsl:attribute name="style:vertical-align"><xsl:choose><xsl:when test="字:对齐/@字:文字对齐='base'">baseline</xsl:when><xsl:when test="字:对齐/@字:文字对齐='center'">middle</xsl:when><xsl:otherwise><xsl:value-of select="字:对齐/@字:文字对齐"/></xsl:otherwise></xsl:choose></xsl:attribute>
3225			</xsl:if>
3226			<xsl:if test="字:对齐/@字:水平对齐">
3227				<xsl:attribute name="fo:text-align"><xsl:choose><xsl:when test="字:对齐/@字:水平对齐='left'">start</xsl:when><xsl:when test="字:对齐/@字:水平对齐='right'">end</xsl:when><xsl:when test="字:对齐/@字:水平对齐='center'">center</xsl:when><xsl:otherwise>justify</xsl:otherwise></xsl:choose></xsl:attribute>
3228				<xsl:if test="字:对齐/@字:水平对齐='distributed'">
3229					<xsl:attribute name="fo:text-align-last">justify</xsl:attribute>
3230				</xsl:if>
3231				<xsl:attribute name="style:justify-single-word">false</xsl:attribute>
3232			</xsl:if>
3233		</xsl:if>
3234		<xsl:if test="字:缩进">
3235			<xsl:if test="字:缩进/字:左/字:绝对/@字:值">
3236				<xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(字:缩进/字:左/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3237			</xsl:if>
3238			<xsl:if test="字:缩进/字:右/字:绝对/@字:值">
3239				<xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(字:缩进/字:右/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3240			</xsl:if>
3241			<xsl:if test="字:缩进/字:首行/字:绝对/@字:值">
3242				<xsl:attribute name="fo:text-indent"><xsl:value-of select="concat(字:缩进/字:首行/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
3243			</xsl:if>
3244		</xsl:if>
3245		<xsl:if test="字:行距">
3246			<xsl:variable name="type">
3247				<xsl:value-of select="字:行距/@字:类型"/>
3248			</xsl:variable>
3249			<xsl:variable name="val">
3250				<xsl:value-of select="字:行距/@字:值"/>
3251			</xsl:variable>
3252			<xsl:choose>
3253				<xsl:when test="$type='fixed'">
3254					<xsl:attribute name="fo:line-height"><xsl:value-of select="concat($val,$uofUnit)"/></xsl:attribute>
3255				</xsl:when>
3256				<xsl:when test="$type='multi-lines'">
3257					<xsl:attribute name="fo:line-height"><xsl:value-of select="concat($val * 100,'%')"/></xsl:attribute>
3258				</xsl:when>
3259				<xsl:when test="$type='at-least'">
3260					<xsl:attribute name="style:line-height-at-least"><xsl:value-of select="concat($val,$uofUnit)"/></xsl:attribute>
3261				</xsl:when>
3262				<xsl:when test="$type='line-space'">
3263					<xsl:attribute name="style:line-spacing"><xsl:value-of select="concat($val,$uofUnit)"/></xsl:attribute>
3264				</xsl:when>
3265			</xsl:choose>
3266		</xsl:if>
3267		<xsl:if test="字:段间距">
3268			<xsl:if test="字:段间距/字:段前距/字:绝对值/@字:值">
3269				<xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(字:段间距/字:段前距/字:绝对值/@字:值,$uofUnit)"/></xsl:attribute>
3270			</xsl:if>
3271			<xsl:if test="字:段间距/字:段后距/字:绝对值/@字:值">
3272				<xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(字:段间距/字:段后距/字:绝对值/@字:值,$uofUnit)"/></xsl:attribute>
3273			</xsl:if>
3274		</xsl:if>
3275		<xsl:if test="字:孤行控制">
3276			<xsl:attribute name="fo:orphans"><xsl:value-of select="字:孤行控制"/></xsl:attribute>
3277		</xsl:if>
3278		<xsl:if test="字:寡行控制">
3279			<xsl:attribute name="fo:widows"><xsl:value-of select="字:寡行控制"/></xsl:attribute>
3280		</xsl:if>
3281		<xsl:if test="字:段中不分页">
3282			<xsl:attribute name="fo:keep-together"><xsl:choose><xsl:when test="字:段中不分页/@字:值='1' or 字:段中不分页/@字:值='true'">always</xsl:when><xsl:otherwise>auto</xsl:otherwise></xsl:choose></xsl:attribute>
3283		</xsl:if>
3284		<xsl:if test="字:与下段同页">
3285			<xsl:attribute name="fo:keep-with-next"><xsl:choose><xsl:when test="字:与下段同页/@字:值='1' or 字:与下段同页/@字:值='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3286		</xsl:if>
3287		<xsl:for-each select="字:边框">
3288			<xsl:call-template name="uof:边框"/>
3289		</xsl:for-each>
3290		<xsl:for-each select="字:填充">
3291			<xsl:call-template name="uof:填充"/>
3292		</xsl:for-each>
3293		<xsl:if test="字:对齐网格">
3294			<xsl:attribute name="style:snap-to-layout-grid"><xsl:choose><xsl:when test="字:对齐网格/@字:值='1' or 字:对齐网格/@字:值='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3295		</xsl:if>
3296		<xsl:if test="字:取消断字">
3297			<xsl:attribute name="fo:hyphenation-ladder-count">no-limit</xsl:attribute>
3298			<xsl:attribute name="fo:hyphenation-remain-char-count">2</xsl:attribute>
3299			<xsl:attribute name="fo:hyphenation-push-char-count">2</xsl:attribute>
3300			<xsl:attribute name="fo:hyphenate"><xsl:choose><xsl:when test="字:取消断字/@字:值='1' or 字:取消断字/@字:值='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3301		</xsl:if>
3302		<xsl:if test="字:取消行号">
3303			<xsl:attribute name="text:number-lines"><xsl:choose><xsl:when test="字:取消行号/@字:值='1' or 字:取消行号/@字:值='true'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
3304		</xsl:if>
3305		<xsl:if test="字:行首尾标点控制">
3306			<xsl:attribute name="style:punctuation-wrap"><xsl:choose><xsl:when test="字:行首尾标点控制/@字:值='1' or 字:行首尾标点控制/@字:值='true'">hanging</xsl:when><xsl:otherwise>simple</xsl:otherwise></xsl:choose></xsl:attribute>
3307		</xsl:if>
3308		<xsl:if test="字:是否行首标点压缩/@字:值='true'">
3309			<xsl:attribute name="style:punctuation-compress">false</xsl:attribute>
3310		</xsl:if>
3311		<xsl:if test="字:中文习惯首尾字符">
3312			<xsl:attribute name="style:line-break"><xsl:choose><xsl:when test="字:中文习惯首尾字符/@字:值='1' or 字:中文习惯首尾字符/@字:值='true'">strict</xsl:when><xsl:otherwise>normal</xsl:otherwise></xsl:choose></xsl:attribute>
3313		</xsl:if>
3314		<xsl:if test="字:自动调整中英文字符间距 or 字:自动调整中文与数字间距">
3315			<xsl:attribute name="style:text-autospace"><xsl:choose><xsl:when test="字:自动调整中英文字符间距/@字:值='1' or 字:自动调整中文与数字间距/@字:值='1'or 字:自动调整中英文字符间距/@字:值='true' or 字:自动调整中文与数字间距/@字:值='true'">ideograph-alpha</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute>
3316		</xsl:if>
3317		<xsl:if test="字:首字下沉">
3318			<xsl:element name="style:drop-cap">
3319				<xsl:if test="字:首字下沉/@字:行数">
3320					<xsl:attribute name="style:lines"><xsl:value-of select="字:首字下沉/@字:行数"/></xsl:attribute>
3321				</xsl:if>
3322				<xsl:if test="字:首字下沉/@字:间距">
3323					<xsl:attribute name="style:distance"><xsl:value-of select="concat(字:首字下沉/@字:间距,$uofUnit)"/></xsl:attribute>
3324				</xsl:if>
3325				<xsl:if test="字:首字下沉/@字:字体引用">
3326					<xsl:attribute name="style:style-name"><xsl:value-of select="字:首字下沉/@字:字体引用"/></xsl:attribute>
3327				</xsl:if>
3328				<xsl:if test="字:首字下沉/@字:字符数">
3329					<xsl:attribute name="style:length"><xsl:choose><xsl:when test="字:首字下沉/@字:字符数='1'">word</xsl:when><xsl:otherwise><xsl:value-of select="字:首字下沉/@字:字符数"/></xsl:otherwise></xsl:choose></xsl:attribute>
3330				</xsl:if>
3331			</xsl:element>
3332		</xsl:if>
3333	</xsl:template>
3334	<xsl:template name="多个句">
3335		<xsl:call-template name="单个或者没有句"/>
3336	</xsl:template>
3337	<xsl:template name="jibianhao">
3338		<xsl:param name="biaoshifu"/>
3339		<xsl:element name="text:list-level-style-number">
3340			<xsl:variable name="currlevel" select="number(@字:级别值) + 1"/>
3341			<xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
3342			<xsl:attribute name="text:style-name">Numbering Symbols</xsl:attribute>
3343			<xsl:if test="@字:尾随字符">
3344				<xsl:attribute name="style:num-suffix"><xsl:choose><xsl:when test="@字:尾随字符='space'"><xsl:value-of select="' ' "/></xsl:when><xsl:when test="@字:尾随字符='tab'"><xsl:value-of select="'	'"/></xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute>
3345			</xsl:if>
3346			<xsl:if test="字:符号字体">
3347				<xsl:variable name="Font-ID">
3348					<xsl:value-of select="字:符号字体/@字:式样引用"/>
3349				</xsl:variable>
3350				<xsl:attribute name="text:style-name"><xsl:value-of select="$Font-ID"/></xsl:attribute>
3351			</xsl:if>
3352			<xsl:if test="字:起始编号">
3353				<xsl:attribute name="text:start-value"><xsl:value-of select="字:起始编号"/></xsl:attribute>
3354			</xsl:if>
3355			<xsl:if test="字:正规格式">
3356				<xsl:attribute name="text:num-regular-exp"><xsl:value-of select="字:正规格式/@值"/></xsl:attribute>
3357			</xsl:if>
3358			<xsl:attribute name="text:display-levels"><xsl:value-of select="string-length(字:编号格式表示) - string-length(translate(字:编号格式表示,'%','') )"/></xsl:attribute>
3359			<xsl:if test="字:编号格式">
3360				<xsl:call-template name="编号格式"/>
3361			</xsl:if>
3362			<xsl:if test="字:编号格式表示">
3363				<xsl:variable name="last" select="substring-after(字:编号格式表示,concat('%',$currlevel))"/>
3364				<xsl:variable name="first">
3365					<xsl:variable name="aa" select="substring-before(字:编号格式表示,concat('%',$currlevel))"/>
3366					<xsl:choose>
3367						<xsl:when test="not(substring-after($aa,'%'))">
3368							<xsl:value-of select="$aa"/>
3369						</xsl:when>
3370					</xsl:choose>
3371				</xsl:variable>
3372				<xsl:if test="$first!=''">
3373					<xsl:attribute name="style:num-prefix"><xsl:value-of select="$first"/></xsl:attribute>
3374				</xsl:if>
3375				<xsl:if test="$last!=''">
3376					<xsl:attribute name="style:num-suffix"><xsl:value-of select="$last"/></xsl:attribute>
3377				</xsl:if>
3378				<xsl:call-template name="bianhaogeshi">
3379					<xsl:with-param name="biaoshi">
3380						<xsl:value-of select="字:编号格式表示"/>
3381					</xsl:with-param>
3382					<xsl:with-param name="jibie">
3383						<xsl:value-of select="1"/>
3384					</xsl:with-param>
3385				</xsl:call-template>
3386			</xsl:if>
3387			<xsl:element name="style:text-properties">
3388				<xsl:call-template name="suojinleixing"/>
3389				<xsl:if test="@字:编号对齐方式">
3390					<xsl:attribute name="fo:text-align"><xsl:variable name="aa"><xsl:value-of select="@字:编号对齐方式"/></xsl:variable><xsl:choose><xsl:when test="$aa='center' ">center</xsl:when><xsl:when test="$aa='right' ">end</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose></xsl:attribute>
3391				</xsl:if>
3392				<xsl:if test="字:符号字体">
3393					<xsl:if test="字:符号字体/@字:式样引用">
3394						<xsl:variable name="Font-ID">
3395							<xsl:value-of select="字:符号字体/@字:式样引用"/>
3396						</xsl:variable>
3397						<xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
3398							<xsl:if test="@字:标识符=$Font-ID">
3399								<xsl:if test="字:字体/@字:中文字体引用">
3400									<xsl:attribute name="fo:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
3401								</xsl:if>
3402							</xsl:if>
3403						</xsl:for-each>
3404					</xsl:if>
3405				</xsl:if>
3406			</xsl:element>
3407		</xsl:element>
3408	</xsl:template>
3409	<xsl:template name="bianhaogeshi">
3410		<xsl:param name="biaoshi"/>
3411		<xsl:param name="jibie"/>
3412		<xsl:variable name="bb">
3413			<xsl:value-of select="substring-after($biaoshi,'%')"/>
3414		</xsl:variable>
3415		<xsl:choose>
3416			<xsl:when test="substring-after($bb,'%')">
3417				<xsl:call-template name="bianhaogeshi">
3418					<xsl:with-param name="biaoshi" select="$bb"/>
3419					<xsl:with-param name="jibie" select="$jibie +1"/>
3420				</xsl:call-template>
3421			</xsl:when>
3422			<xsl:otherwise>
3423				<xsl:if test="not($jibie=1)">
3424					<xsl:attribute name="text:display-levels"><xsl:value-of select="$jibie"/></xsl:attribute>
3425				</xsl:if>
3426			</xsl:otherwise>
3427		</xsl:choose>
3428	</xsl:template>
3429	<xsl:template name="xiangmufuhao">
3430		<xsl:param name="biaoshifu"/>
3431		<xsl:variable name="currlevel" select="number(@字:级别值) + 1"/>
3432		<xsl:element name="text:list-level-style-bullet">
3433			<xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
3434			<xsl:attribute name="text:style-name"><xsl:value-of select="../@字:名称"/></xsl:attribute>
3435			<xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,'%1')"/></xsl:attribute>
3436			<xsl:attribute name="text:bullet-char"><xsl:value-of select="字:项目符号"/></xsl:attribute>
3437			<xsl:element name="style:text-properties">
3438				<xsl:if test="字:符号字体">
3439					<xsl:variable name="Font-ID">
3440						<xsl:value-of select="字:符号字体/@字:式样引用"/>
3441					</xsl:variable>
3442					<xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
3443						<xsl:if test="@字:标识符=$Font-ID">
3444							<xsl:if test="字:字体/@字:中文字体引用">
3445								<xsl:attribute name="svg:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
3446							</xsl:if>
3447						</xsl:if>
3448					</xsl:for-each>
3449				</xsl:if>
3450				<xsl:if test="字:项目符号">
3451					<xsl:attribute name="fo:font-family"><xsl:value-of select="'WingDings'"/></xsl:attribute>
3452				</xsl:if>
3453				<xsl:call-template name="suojinleixing"/>
3454				<xsl:if test="@字:编号对齐方式">
3455					<xsl:attribute name="fo:text-align"><xsl:variable name="aa"><xsl:value-of select="@字:编号对齐方式"/></xsl:variable><xsl:choose><xsl:when test="$aa='center' ">center</xsl:when><xsl:when test="$aa='right' ">end</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose></xsl:attribute>
3456				</xsl:if>
3457			</xsl:element>
3458		</xsl:element>
3459	</xsl:template>
3460	<xsl:template name="imagefuhao">
3461		<xsl:param name="biaoshifu"/>
3462		<xsl:variable name="currlevel" select="number(@字:级别值) + 1"/>
3463		<xsl:element name="text:list-level-style-image" style:vertical-pos="middle" style:vertical-rel="line" fo:width="0.265cm" fo:height="0.265cm">
3464			<xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
3465			<xsl:attribute name="text:style-name"><xsl:value-of select="concat( $biaoshifu,$currlevel)"/></xsl:attribute>
3466			<xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,'%1')"/></xsl:attribute>
3467			<xsl:if test="字:图片符号引用">
3468				<xsl:variable name="gid">
3469					<xsl:value-of select="字:图片符号引用"/>
3470				</xsl:variable>
3471				<xsl:element name="office:binary-data">
3472					<xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$gid]/uof:数据"/>
3473				</xsl:element>
3474			</xsl:if>
3475			<xsl:element name="style:list-level-properties">
3476				<xsl:attribute name="style:vertical-pos">middle</xsl:attribute>
3477				<xsl:attribute name="style:vertical-rel">line</xsl:attribute>
3478				<xsl:attribute name="fo:width"><xsl:value-of select="concat(字:图片符号引用/@字:宽度,$uofUnit)"/></xsl:attribute>
3479				<xsl:attribute name="fo:height"><xsl:value-of select="concat(字:图片符号引用/@字:高度,$uofUnit)"/></xsl:attribute>
3480				<xsl:if test="字:符号字体">
3481					<xsl:variable name="Font-ID">
3482						<xsl:value-of select="字:符号字体/@字:式样引用"/>
3483					</xsl:variable>
3484					<xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
3485						<xsl:if test="@字:标识符=$Font-ID">
3486							<xsl:if test="字:字体/@字:中文字体引用">
3487								<xsl:attribute name="svg:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
3488							</xsl:if>
3489						</xsl:if>
3490					</xsl:for-each>
3491				</xsl:if>
3492				<xsl:call-template name="suojinleixing"/>
3493				<xsl:if test="@字:编号对齐方式">
3494					<xsl:attribute name="fo:text-align"><xsl:variable name="aa"><xsl:value-of select="@字:编号对齐方式"/></xsl:variable><xsl:choose><xsl:when test="$aa='center' ">center</xsl:when><xsl:when test="$aa='right' ">end</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose></xsl:attribute>
3495				</xsl:if>
3496			</xsl:element>
3497		</xsl:element>
3498	</xsl:template>
3499	<xsl:template name="ootab">
3500		<xsl:element name="style:tab-stops">
3501			<xsl:for-each select="字:段落属性/字:制表位设置/字:制表位 | 字:制表位设置/字:制表位">
3502				<xsl:element name="style:tab-stop">
3503					<xsl:attribute name="style:position"><xsl:value-of select="concat(@字:位置,$uofUnit)"/></xsl:attribute>
3504					<xsl:attribute name="style:type"><xsl:choose><xsl:when test="@字:类型='decimal'">char</xsl:when><xsl:when test="@字:类型='left' or @字:类型='right' or @字:类型='center'"><xsl:value-of select="@字:类型"/></xsl:when><xsl:otherwise/></xsl:choose></xsl:attribute>
3505					<xsl:if test="@字:制表位字符">
3506						<xsl:attribute name="style:leader-text"><xsl:value-of select="@字:制表位字符"/></xsl:attribute>
3507					</xsl:if>
3508					<xsl:attribute name="style:leader-style"><xsl:value-of select="@字:前导符"/></xsl:attribute>
3509				</xsl:element>
3510			</xsl:for-each>
3511		</xsl:element>
3512	</xsl:template>
3513	<xsl:template match="字:段落[字:段落属性[字:自动编号信息]]">
3514		<xsl:call-template name="编号解析">
3515		</xsl:call-template>
3516	</xsl:template>
3517	<xsl:template name="编号解析">
3518		<xsl:variable name="bianhao">
3519			<xsl:value-of select="字:段落属性/字:自动编号信息/@字:编号引用"/>
3520		</xsl:variable>
3521		<xsl:variable name="bianhaojibie">
3522			<xsl:value-of select="字:段落属性/字:自动编号信息/@字:编号级别"/>
3523		</xsl:variable>
3524		<xsl:variable name="isxiangmuorisimage">
3525			<xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号">
3526				<xsl:choose>
3527					<xsl:when test="$bianhao=@字:标识符">
3528						<xsl:choose>
3529							<xsl:when test="字:级别[@字:级别值= (number($bianhaojibie))]/字:项目符号">true</xsl:when>
3530							<xsl:when test="字:级别[@字:级别值= (number($bianhaojibie))]/字:图片符号引用">true</xsl:when>
3531							<xsl:otherwise>false</xsl:otherwise>
3532						</xsl:choose>
3533					</xsl:when>
3534					<xsl:otherwise>false</xsl:otherwise>
3535				</xsl:choose>
3536			</xsl:for-each>
3537		</xsl:variable>
3538		<xsl:choose>
3539			<xsl:when test="$isxiangmuorisimage='true'">
3540				<xsl:call-template name="无序"/>
3541			</xsl:when>
3542			<xsl:otherwise>
3543				<xsl:call-template name="有序"/>
3544			</xsl:otherwise>
3545		</xsl:choose>
3546	</xsl:template>
3547	<xsl:template name="有序">
3548		<xsl:variable name="currlistid" select="字:段落属性/字:自动编号信息/@字:编号引用"/>
3549		<xsl:variable name="currlistlvl" select="字:段落属性/字:自动编号信息/@字:编号级别 + 1"/>
3550		<xsl:variable name="firstoccur" select="/descendant::字:段落属性[字:自动编号信息/@字:编号引用 = $currlistid][1]"/>
3551		<xsl:element name="text:list">
3552			<xsl:attribute name="text:style-name">List<xsl:value-of select="count($firstoccur/preceding::字:自动编号信息)"/></xsl:attribute>
3553			<xsl:attribute name="text:continue-numbering"><xsl:choose><xsl:when test="字:段落属性/字:自动编号信息/@字:重新编号='false'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute>
3554			<xsl:if test="字:段落属性/字:自动编号信息/@字:重新编号">
3555				<xsl:attribute name="text:continue-numbering"><xsl:choose><xsl:when test="字:段落属性/字:自动编号信息/@字:重新编号='1'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute>
3556			</xsl:if>
3557			<xsl:element name="text:list-item">
3558				<xsl:call-template name="ordered-levels">
3559					<xsl:with-param name="level" select="$currlistlvl - 1"/>
3560				</xsl:call-template>
3561			</xsl:element>
3562		</xsl:element>
3563	</xsl:template>
3564	<xsl:template name="ordered-levels">
3565		<xsl:param name="level"/>
3566		<xsl:choose>
3567			<xsl:when test="$level = '0'">
3568				<xsl:call-template name="commonParagraph"/>
3569			</xsl:when>
3570			<xsl:otherwise>
3571				<xsl:element name="text:list">
3572					<xsl:element name="text:list-item">
3573						<xsl:call-template name="ordered-levels">
3574							<xsl:with-param name="level" select="$level - 1"/>
3575						</xsl:call-template>
3576					</xsl:element>
3577				</xsl:element>
3578			</xsl:otherwise>
3579		</xsl:choose>
3580	</xsl:template>
3581	<xsl:template name="无序">
3582		<xsl:variable name="currlistid" select="字:段落属性/字:自动编号信息/@字:编号引用"/>
3583		<xsl:variable name="currlistlvl" select="字:段落属性/字:自动编号信息/@字:编号级别 + 1"/>
3584		<xsl:variable name="firstoccur" select="/descendant::字:段落属性[字:自动编号信息/@字:编号引用 = $currlistid][1]"/>
3585		<xsl:element name="text:list">
3586			<xsl:attribute name="text:style-name">List<xsl:value-of select="count($firstoccur/preceding::字:自动编号信息)"/></xsl:attribute>
3587			<xsl:element name="text:list-item">
3588				<xsl:call-template name="unordered-levels">
3589					<xsl:with-param name="level" select="$currlistlvl - 1"/>
3590				</xsl:call-template>
3591			</xsl:element>
3592		</xsl:element>
3593	</xsl:template>
3594	<xsl:template name="unordered-levels">
3595		<xsl:param name="level"/>
3596		<xsl:choose>
3597			<xsl:when test="$level = '0'">
3598				<xsl:call-template name="commonParagraph"/>
3599			</xsl:when>
3600			<xsl:otherwise>
3601				<xsl:element name="text:list">
3602					<xsl:element name="text:list-item">
3603						<xsl:call-template name="unordered-levels">
3604							<xsl:with-param name="level" select="$level - 1"/>
3605						</xsl:call-template>
3606					</xsl:element>
3607				</xsl:element>
3608			</xsl:otherwise>
3609		</xsl:choose>
3610	</xsl:template>
3611	<!-- measure_conversion.xsl Begin-->
3612	<xsl:param name="dpi" select="111"/>
3613	<xsl:param name="centimeter-in-mm" select="10"/>
3614	<xsl:param name="inch-in-mm" select="25.4"/>
3615	<xsl:param name="didot-point-in-mm" select="0.376065"/>
3616	<xsl:param name="pica-in-mm" select="4.2333333"/>
3617	<xsl:param name="point-in-mm" select="0.3527778"/>
3618	<xsl:param name="twip-in-mm" select="0.017636684"/>
3619	<xsl:param name="pixel-in-mm" select="$inch-in-mm div $dpi"/>
3620	<!-- ***** MEASUREMENT CONVERSIONS *****
3621	  PARAM 'value'
3622		The measure to be converted.
3623		The current measure is judged by a substring (e.g. 'mm', 'cm', 'in', 'pica'...)
3624		directly added to the number.
3625
3626	  PARAM 'rounding-factor'
3627		Is used for the rounding of decimal places.
3628		The parameter number is the product of 1 and some '10', where
3629		every zero represents a decimal place.
3630
3631		For example, providing as parameter:
3632			<xsl:param name="rounding-factor" select="10000" />
3633		Gives by default four decimal places.
3634
3635		To round two decimal places, basically the following is done:
3636			<xsl:value-of select="round(100 * value) div 100"/>
3637
3638	  RETURN    The converted number, by default rounded to four decimal places.
3639				In case the input measure could not be matched the same value is
3640				returned and a warning message is written out.
3641
3642
3643
3644	 MEASURE LIST:
3645	 * 1 millimeter (mm), the basic measure
3646
3647	 * 1 centimeter (cm) = 10 mm
3648
3649	 * 1 inch (in) = 25.4 mm
3650		While the English have already seen the light (read: the metric system), the US
3651		remains loyal to this medieval system.
3652
3653	 * 1 point (pt) = 0.35277777.. mm
3654		Sometimes called PostScript point (ppt), as when Adobe created PostScript, they added their own system of points.
3655		There are exactly 72 PostScript points in 1 inch.
3656
3657	 * 1 twip = twentieth of a (PostScript) point
3658		A twip (twentieth of a point) is a 1/20th of a PostScript point, a traditional measure in printing.
3659
3660	 * 1 didot point (dpt) = 0.376065 mm
3661		Didot point after the French typographer Firmin Didot (1764-1836).
3662
3663		More details under
3664		http://www.unc.edu/~rowlett/units/dictP.html:
3665		"A unit of length used by typographers and printers. When printing was done
3666		from hand-set metal type, one point represented the smallest element of type
3667		that could be handled, roughly 1/64 inch. Eventually, the point was standardized
3668		in Britain and America as exactly 1/72.27 = 0.013 837 inch, which is
3669		about 0.35 mm (351.46 micrometers). In continental Europe, typographers
3670		traditionally used a slightly larger point of 0.014 83 inch (about
3671		1/72 pouce, 0.377 mm, or roughly 1/67 English inch), called a Didot point
3672		after the French typographer Firmin Didot (1764-1836). In the U.S.,
3673		Adobe software defines the point to be exactly 1/72 inch (0.013 888 9 inch
3674		or 0.352 777 8 millimeters) and TeX software uses a slightly smaller point
3675		of 0.351 459 8035 mm. The German standards agency DIN has proposed that
3676		all these units be replaced by multiples of 0.25 millimeters (1/101.6 inch).
3677
3678	 * 1 pica = 4.233333 mm
3679		1/6 inch or 12 points
3680
3681	 * 1 pixel (px) = 0.26458333.. mm   (relative to 'DPI', here: 96 dpi)
3682		Most pictures have the 96 dpi resolution, but the dpi variable may vary by stylesheet parameter
3683
3684
3685	-->
3686	<!-- changing measure to mm -->
3687	<xsl:template name="convert2cm">
3688		<xsl:param name="value"/>
3689		<xsl:param name="rounding-factor" select="10000"/>
3690		<xsl:choose>
3691			<xsl:when test="contains($value, 'mm')">
3692				<xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $centimeter-in-mm)) div $rounding-factor"/>
3693			</xsl:when>
3694			<xsl:when test="contains($value, $uofUnit)">
3695				<xsl:value-of select="substring-before($value, $uofUnit)"/>
3696			</xsl:when>
3697			<xsl:when test="contains($value, 'in')">
3698				<xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $centimeter-in-mm * $inch-in-mm)) div $rounding-factor"/>
3699			</xsl:when>
3700			<xsl:when test="contains($value, 'pt')">
3701				<xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $centimeter-in-mm * $point-in-mm)) div $rounding-factor"/>
3702			</xsl:when>
3703			<xsl:when test="contains($value, 'dpt')">
3704				<xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $centimeter-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
3705			</xsl:when>
3706			<xsl:when test="contains($value, 'pica')">
3707				<xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $centimeter-in-mm * $pica-in-mm)) div $rounding-factor"/>
3708			</xsl:when>
3709			<xsl:when test="contains($value, 'twip')">
3710				<xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $centimeter-in-mm * $twip-in-mm)) div $rounding-factor"/>
3711			</xsl:when>
3712			<xsl:when test="contains($value, 'px')">
3713				<xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $centimeter-in-mm * $pixel-in-mm)) div $rounding-factor"/>
3714			</xsl:when>
3715			<xsl:otherwise>
3716				<xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'cm'!</xsl:message>
3717				<xsl:value-of select="$value"/>
3718			</xsl:otherwise>
3719		</xsl:choose>
3720	</xsl:template>
3721	<xsl:template name="uof:通用边框">
3722		<xsl:param name="lineType"/>
3723		<xsl:param name="width"/>
3724		<xsl:param name="color"/>
3725		<xsl:choose>
3726			<xsl:when test="$lineType='none'">none</xsl:when>
3727			<xsl:otherwise>
3728				<xsl:value-of select="$width"/>
3729				<xsl:choose>
3730					<xsl:when test="$lineType='single'">solid </xsl:when>
3731					<xsl:when test="$lineType='double'">double </xsl:when>
3732					<xsl:otherwise>solid </xsl:otherwise>
3733				</xsl:choose>
3734				<xsl:choose>
3735					<xsl:when test="$color='auto' or $color='none' or $color=''">#808080</xsl:when>
3736					<xsl:otherwise>
3737						<xsl:value-of select="$color"/>
3738					</xsl:otherwise>
3739				</xsl:choose>
3740			</xsl:otherwise>
3741		</xsl:choose>
3742	</xsl:template>
3743	<xsl:template name="uof:边框">
3744		<xsl:if test="uof:上">
3745			<xsl:variable name="type" select="uof:上/@uof:类型"/>
3746			<xsl:variable name="size" select="concat(uof:上/@uof:宽度,$uofUnit,' ')"/>
3747			<xsl:variable name="clr" select="uof:上/@uof:颜色"/>
3748			<xsl:attribute name="fo:border-top"><xsl:call-template name="uof:通用边框"><xsl:with-param name="lineType" select="$type"/><xsl:with-param name="width" select="$size"/><xsl:with-param name="color" select="$clr"/></xsl:call-template></xsl:attribute>
3749			<xsl:if test="uof:上/@uof:线宽度">
3750				<xsl:attribute name="style:border-line-width-top"><xsl:value-of select="uof:上/@uof:线宽度"/></xsl:attribute>
3751			</xsl:if>
3752		</xsl:if>
3753		<xsl:if test="uof:下">
3754			<xsl:variable name="type" select="uof:下/@uof:类型"/>
3755			<xsl:variable name="size" select="concat(uof:下/@uof:宽度,$uofUnit,' ')"/>
3756			<xsl:variable name="clr" select="uof:下/@uof:颜色"/>
3757			<xsl:attribute name="fo:border-bottom"><xsl:call-template name="uof:通用边框"><xsl:with-param name="lineType" select="$type"/><xsl:with-param name="width" select="$size"/><xsl:with-param name="color" select="$clr"/></xsl:call-template></xsl:attribute>
3758			<xsl:if test="uof:下/@uof:线宽度">
3759				<xsl:attribute name="style:border-line-width-bottom"><xsl:value-of select="uof:下/@uof:线宽度"/></xsl:attribute>
3760			</xsl:if>
3761		</xsl:if>
3762		<xsl:if test="uof:左">
3763			<xsl:variable name="type" select="uof:左/@uof:类型"/>
3764			<xsl:variable name="size" select="concat(uof:左/@uof:宽度,$uofUnit,' ')"/>
3765			<xsl:variable name="clr" select="uof:左/@uof:颜色"/>
3766			<xsl:attribute name="fo:border-left"><xsl:call-template name="uof:通用边框"><xsl:with-param name="lineType" select="$type"/><xsl:with-param name="width" select="$size"/><xsl:with-param name="color" select="$clr"/></xsl:call-template></xsl:attribute>
3767			<xsl:if test="uof:左/@uof:线宽度">
3768				<xsl:attribute name="style:border-line-width-left"><xsl:value-of select="uof:左/@uof:线宽度"/></xsl:attribute>
3769			</xsl:if>
3770		</xsl:if>
3771		<xsl:if test="uof:右">
3772			<xsl:variable name="type" select="uof:右/@uof:类型"/>
3773			<xsl:variable name="size" select="concat(uof:右/@uof:宽度,$uofUnit,' ')"/>
3774			<xsl:variable name="clr" select="uof:右/@uof:颜色"/>
3775			<xsl:attribute name="fo:border-right"><xsl:call-template name="uof:通用边框"><xsl:with-param name="lineType" select="$type"/><xsl:with-param name="width" select="$size"/><xsl:with-param name="color" select="$clr"/></xsl:call-template></xsl:attribute>
3776			<xsl:if test="uof:右/@uof:线宽度">
3777				<xsl:attribute name="style:border-line-width-right"><xsl:value-of select="uof:右/@uof:线宽度"/></xsl:attribute>
3778			</xsl:if>
3779		</xsl:if>
3780		<xsl:if test="uof:上/@uof:阴影='true'or uof:上/@uof:阴影='1'">
3781			<xsl:if test="uof:左/@uof:阴影='true'or uof:左/@uof:阴影='1'">
3782				<xsl:attribute name="style:shadow">#808080 -0.18cm -0.18cm</xsl:attribute>
3783			</xsl:if>
3784		</xsl:if>
3785		<xsl:if test="uof:上/@uof:阴影='true'or uof:上/@uof:阴影='1'">
3786			<xsl:if test="uof:右/@uof:阴影='true'or uof:右/@uof:阴影='1'">
3787				<xsl:attribute name="style:shadow">#808080 0.18cm -0.18cm</xsl:attribute>
3788			</xsl:if>
3789		</xsl:if>
3790		<xsl:if test="uof:下/@uof:阴影='true'or uof:下/@uof:阴影='1'">
3791			<xsl:if test="uof:左/@uof:阴影='true'or uof:左/@uof:阴影='1'">
3792				<xsl:attribute name="style:shadow">#808080 -0.18cm 0.18cm</xsl:attribute>
3793			</xsl:if>
3794		</xsl:if>
3795		<xsl:if test="uof:下/@uof:阴影='true'or uof:下/@uof:阴影='1'">
3796			<xsl:if test="uof:右/@uof:阴影='true'or uof:右/@uof:阴影='1'">
3797				<xsl:attribute name="style:shadow">#808080 0.18cm 0.18cm</xsl:attribute>
3798			</xsl:if>
3799		</xsl:if>
3800		<xsl:if test="uof:上/@uof:边距">
3801			<xsl:attribute name="fo:padding-top"><xsl:value-of select="concat(uof:上/@uof:边距,$uofUnit)"/></xsl:attribute>
3802		</xsl:if>
3803		<xsl:if test="uof:下/@uof:边距">
3804			<xsl:attribute name="fo:padding-bottom"><xsl:value-of select="concat(uof:下/@uof:边距,$uofUnit)"/></xsl:attribute>
3805		</xsl:if>
3806		<xsl:if test="uof:左/@uof:边距">
3807			<xsl:attribute name="fo:padding-left"><xsl:value-of select="concat(uof:左/@uof:边距,$uofUnit)"/></xsl:attribute>
3808		</xsl:if>
3809		<xsl:if test="uof:右/@uof:边距">
3810			<xsl:attribute name="fo:padding-right"><xsl:value-of select="concat(uof:右/@uof:边距,$uofUnit)"/></xsl:attribute>
3811		</xsl:if>
3812	</xsl:template>
3813	<xsl:template name="uof:填充">
3814		<xsl:choose>
3815			<xsl:when test="图:颜色">
3816				<xsl:attribute name="fo:background-color"><xsl:choose><xsl:when test="图:颜色"><xsl:value-of select="图:颜色"/></xsl:when><xsl:otherwise>transparent</xsl:otherwise></xsl:choose></xsl:attribute>
3817			</xsl:when>
3818			<xsl:when test="contains(图:图案/@图:前景色,'#')">
3819				<xsl:attribute name="fo:text-background-color"><xsl:value-of select="图:图案/@图:前景色"/></xsl:attribute>
3820			</xsl:when>
3821			<xsl:when test="图:图案/@图:背景色">
3822				<xsl:attribute name="fo:background-color"><xsl:value-of select="图:图案/@图:背景色"/></xsl:attribute>
3823			</xsl:when>
3824			<xsl:otherwise/>
3825		</xsl:choose>
3826		<xsl:if test="图:图片">
3827			<xsl:element name="style:background-image">
3828				<xsl:variable name="gid">
3829					<xsl:value-of select="图:图片/@图:图形引用"/>
3830				</xsl:variable>
3831				<xsl:if test="图:图片/@图:位置 and not(图:图片/@图:位置='tile')">
3832					<xsl:attribute name="style:repeat"><xsl:choose><xsl:when test="图:图片/@图:位置='stretch'">stretch</xsl:when><xsl:when test="图:图片/@图:位置='center'">no-repeat</xsl:when></xsl:choose></xsl:attribute>
3833				</xsl:if>
3834				<xsl:choose>
3835					<xsl:when test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$gid]/uof:数据">
3836						<xsl:element name="office:binary-data">
3837							<xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$gid]/uof:数据"/>
3838						</xsl:element>
3839					</xsl:when>
3840					<xsl:otherwise>
3841						<xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$gid]/uof:路径"/></xsl:attribute>
3842						<xsl:attribute name="xlink:type">simple</xsl:attribute>
3843						<xsl:attribute name="xlink:actuate">onLoad</xsl:attribute>
3844					</xsl:otherwise>
3845				</xsl:choose>
3846			</xsl:element>
3847		</xsl:if>
3848	</xsl:template>
3849	<xsl:template name="日期域">
3850		<xsl:if test="following-sibling::字:域代码/字:段落/字:句/字:文本串">
3851			<xsl:variable name="date0" select="substring-after(following-sibling::字:域代码/字:段落/字:句/字:文本串,'\@ ')"/>
3852			<xsl:variable name="datestr">
3853				<xsl:choose>
3854					<xsl:when test="contains($date0,'\*')">
3855						<xsl:value-of select="string(substring-before($date0,'\*'))"/>
3856					</xsl:when>
3857					<xsl:otherwise>
3858						<xsl:value-of select="$date0"/>
3859					</xsl:otherwise>
3860				</xsl:choose>
3861			</xsl:variable>
3862			<xsl:call-template name="zydate">
3863				<xsl:with-param name="str1" select="substring($datestr,2,string-length($datestr)-2)"/>
3864			</xsl:call-template>
3865		</xsl:if>
3866	</xsl:template>
3867	<xsl:template name="zydate">
3868		<xsl:param name="str1"/>
3869		<xsl:choose>
3870			<xsl:when test="substring($str1,1,5)='am/pm'">
3871				<xsl:variable name="str1-before" select="substring($str1,1,5)"/>
3872				<xsl:variable name="str1-after" select="substring($str1,6)"/>
3873				<number:am-pm/>
3874				<xsl:if test="not($str1-after)=''">
3875					<number:text>
3876						<xsl:value-of select="substring($str1-after,1,1)"/>
3877					</number:text>
3878				</xsl:if>
3879				<xsl:if test="string-length($str1-after)&gt;1">
3880					<xsl:call-template name="zytime">
3881						<xsl:with-param name="str1" select="substring($str1-after,2)"/>
3882					</xsl:call-template>
3883				</xsl:if>
3884			</xsl:when>
3885			<xsl:otherwise>
3886
3887		<xsl:choose>
3888			<xsl:when test="substring($str1,1,4)='yyyy'">
3889				<xsl:variable name="str1-before" select="substring($str1,1,4)"/>
3890				<xsl:variable name="str1-after" select="substring($str1,5)"/>
3891				<number:year number:style="long"/>
3892				<number:text>
3893					<xsl:value-of select="substring($str1-after,1,1)"/>
3894				</number:text>
3895				<xsl:if test="string-length($str1-after)&gt;1">
3896					<xsl:call-template name="zydate">
3897						<xsl:with-param name="str1" select="substring($str1-after,2)"/>
3898					</xsl:call-template>
3899				</xsl:if>
3900			</xsl:when>
3901			<xsl:otherwise>
3902				<xsl:choose>
3903					<xsl:when test="substring($str1,1,1)=substring($str1,2,1) and substring($str1,2,1) !=substring($str1,3,1) ">
3904						<xsl:variable name="str1-before" select="substring($str1,1,2)"/>
3905						<xsl:variable name="str1-after" select="substring($str1,3)"/>
3906						<xsl:if test="substring($str1,1,1)='y'">
3907							<number:year/>
3908						</xsl:if>
3909						<xsl:if test="substring($str1,1,1)='M'">
3910							<number:month number:style="long"/>
3911						</xsl:if>
3912						<xsl:if test="substring($str1,1,1)='d'">
3913							<number:day number:style="long"/>
3914						</xsl:if>
3915						<xsl:if test="substring($str1,1,1)='h'">
3916							<number:hours number:style="long"/>
3917						</xsl:if>
3918						<xsl:if test="substring($str1,1,1)='m'">
3919							<number:minutes number:style="long"/>
3920						</xsl:if>
3921						<xsl:if test="substring($str1,1,1)='s'">
3922							<number:seconds number:style="long"/>
3923						</xsl:if>
3924						<xsl:if test="substring($str1,1,1)='W'">
3925							<number:week-of-year number:style="long"/>
3926						</xsl:if>
3927						<number:text>
3928							<xsl:value-of select="substring($str1-after,1,1)"/>
3929						</number:text>
3930						<xsl:if test="string-length($str1-after)&gt;1">
3931							<xsl:call-template name="zydate">
3932								<xsl:with-param name="str1" select="substring($str1-after,2)"/>
3933							</xsl:call-template>
3934						</xsl:if>
3935					</xsl:when>
3936					<xsl:otherwise>
3937						<xsl:if test="substring($str1,1,1)='M'or substring($str1,1,1)='d'or substring($str1,1,1)='h'or substring($str1,1,1)='m'or substring($str1,1,1)='s'">
3938							<xsl:variable name="str1-after" select="substring($str1,2)"/>
3939							<xsl:variable name="str1-before" select="substring($str1,1,1)"/>
3940							<xsl:if test="substring($str1,1,1)='M'">
3941								<number:month/>
3942								<number:text>
3943									<xsl:value-of select="substring($str1-after,1,1)"/>
3944								</number:text>
3945							</xsl:if>
3946							<xsl:if test="substring($str1,1,1)='d'">
3947								<number:day/>
3948								<number:text>
3949									<xsl:value-of select="substring($str1-after,1,1)"/>
3950								</number:text>
3951							</xsl:if>
3952							<xsl:if test="substring($str1,1,1)='h'">
3953								<number:hours/>
3954								<number:text>
3955									<xsl:value-of select="substring($str1-after,1,1)"/>
3956								</number:text>
3957							</xsl:if>
3958							<xsl:if test="substring($str1,1,1)='m'">
3959								<number:minutes/>
3960								<number:text>
3961									<xsl:value-of select="substring($str1-after,1,1)"/>
3962								</number:text>
3963							</xsl:if>
3964							<xsl:if test="substring($str1,1,1)='s'">
3965								<number:seconds/>
3966								<number:text>
3967									<xsl:value-of select="substring($str1-after,1,1)"/>
3968								</number:text>
3969							</xsl:if>
3970							<xsl:if test="string-length($str1-after)&gt;1">
3971								<xsl:call-template name="zydate">
3972									<xsl:with-param name="str1" select="substring($str1-after,2)"/>
3973								</xsl:call-template>
3974							</xsl:if>
3975						</xsl:if>
3976						<xsl:if test="contains(substring($str1,1,3),'Q' )">
3977							<xsl:choose>
3978								<xsl:when test="substring($str1,1,1)='Q'">
3979									<xsl:variable name="str1-before" select="substring($str1,1,2)"/>
3980									<xsl:variable name="str1-after" select="substring($str1,3)"/>
3981									<number:quarter/>
3982									<number:text>
3983										<xsl:value-of select="substring($str1-after,1,1)"/>
3984									</number:text>
3985									<xsl:if test="string-length($str1-after)&gt;1">
3986										<xsl:call-template name="zydate">
3987											<xsl:with-param name="str1" select="substring($str1-after,2)"/>
3988										</xsl:call-template>
3989									</xsl:if>
3990								</xsl:when>
3991								<xsl:otherwise>
3992									<xsl:variable name="str1-before" select="substring($str1,1,5)"/>
3993									<xsl:variable name="str1-after" select="substring($str1,6)"/>
3994									<number:quarter number:style="long"/>
3995									<number:text>
3996										<xsl:value-of select="substring($str1-after,1,1)"/>
3997									</number:text>
3998									<xsl:if test="string-length($str1-after)&gt;1">
3999										<xsl:call-template name="zydate">
4000											<xsl:with-param name="str1" select="substring($str1-after,2)"/>
4001										</xsl:call-template>
4002									</xsl:if>
4003								</xsl:otherwise>
4004							</xsl:choose>
4005						</xsl:if>
4006						<xsl:if test="contains(substring(normalize-space($str1),1,3),'W' )">
4007							<xsl:variable name="str1-before" select="substring(normalize-space($str1),1,3)"/>
4008							<xsl:variable name="str1-after" select="substring(normalize-space($str1),4)"/>
4009							<number:day-of-week number:style="long"/>
4010							<number:text>
4011								<xsl:value-of select="substring($str1-after,1,1)"/>
4012							</number:text>
4013							<xsl:if test="string-length($str1-after)&gt;1">
4014								<xsl:call-template name="zydate">
4015									<xsl:with-param name="str1" select="substring($str1-after,2)"/>
4016								</xsl:call-template>
4017							</xsl:if>
4018						</xsl:if>
4019						<xsl:if test="contains(substring($str1,1,3),'NN' ) and substring($str1,1,1)!='NN' ">
4020							<xsl:variable name="str1-before" select="substring($str1,1,3)"/>
4021							<xsl:variable name="str1-after" select="substring($str1,4)"/>
4022							<number:text>第</number:text>
4023							<number:week-of-year/>
4024							<number:text>周</number:text>
4025							<xsl:if test="string-length($str1-after)&gt;1">
4026								<xsl:call-template name="zydate">
4027									<xsl:with-param name="str1" select="substring($str1-after,2)"/>
4028								</xsl:call-template>
4029							</xsl:if>
4030						</xsl:if>
4031					</xsl:otherwise>
4032				</xsl:choose>
4033			</xsl:otherwise>
4034		</xsl:choose>
4035		</xsl:otherwise>
4036		</xsl:choose>
4037	</xsl:template>
4038	<xsl:template name="时间域">
4039		<xsl:if test="following-sibling::字:域代码/字:段落/字:句/字:文本串">
4040			<xsl:variable name="date0" select="substring-after(following-sibling::字:域代码/字:段落/字:句/字:文本串,'\@ ')"/>
4041			<xsl:variable name="datestr" select="$date0"/>
4042			<xsl:call-template name="zytime">
4043				<xsl:with-param name="str1" select="substring($datestr,2,string-length($datestr)-2)"/>
4044			</xsl:call-template>
4045		</xsl:if>
4046	</xsl:template>
4047	<xsl:template name="zytime">
4048		<xsl:param name="str1"/>
4049		<xsl:choose>
4050			<xsl:when test="substring($str1,1,5)='am/pm'">
4051				<xsl:variable name="str1-before" select="substring($str1,1,5)"/>
4052				<xsl:variable name="str1-after" select="substring($str1,6)"/>
4053				<number:am-pm/>
4054				<xsl:if test="not($str1-after)=''">
4055					<number:text>
4056						<xsl:value-of select="substring($str1-after,1,1)"/>
4057					</number:text>
4058				</xsl:if>
4059				<xsl:if test="string-length($str1-after)&gt;1">
4060					<xsl:call-template name="zytime">
4061						<xsl:with-param name="str1" select="substring($str1-after,2)"/>
4062					</xsl:call-template>
4063				</xsl:if>
4064			</xsl:when>
4065			<xsl:otherwise>
4066				<xsl:choose>
4067					<xsl:when test="substring($str1,1,1)=substring($str1,2,1) and substring($str1,2,1) !=substring($str1,3,1) ">
4068						<xsl:variable name="str1-before" select="substring($str1,1,2)"/>
4069						<xsl:variable name="str1-after" select="substring($str1,3)"/>
4070						<xsl:if test="substring($str1,1,1)='H' or substring($str1,1,1)='h'">
4071							<number:hours number:style="long"/>
4072						</xsl:if>
4073						<xsl:if test="substring($str1,1,1)='M' or substring($str1,1,1)='m'">
4074							<number:minutes number:style="long"/>
4075						</xsl:if>
4076						<xsl:if test="substring($str1,1,1)='S' or substring($str1,1,1)='s'">
4077							<number:seconds number:style="long"/>
4078						</xsl:if>
4079						<number:text>
4080							<xsl:value-of select="substring($str1-after,1,1)"/>
4081						</number:text>
4082						<xsl:if test="string-length($str1-after)&gt;1">
4083							<xsl:call-template name="zytime">
4084								<xsl:with-param name="str1" select="substring($str1-after,2)"/>
4085							</xsl:call-template>
4086						</xsl:if>
4087					</xsl:when>
4088					<xsl:otherwise>
4089						<xsl:if test="substring($str1,1,1)='H'or substring($str1,1,1)='M'or substring($str1,1,1)='S'or substring($str1,1,1)='h' or substring($str1,1,1)='m' or  substring($str1,1,1)='s'">
4090							<xsl:variable name="str1-after" select="substring($str1,2)"/>
4091							<xsl:variable name="str1-before" select="substring($str1,1,1)"/>
4092							<xsl:if test="substring($str1,1,1)='H' or substring($str1,1,1)='h'">
4093								<number:hours/>
4094								<number:text>
4095									<xsl:value-of select="substring($str1-after,1,1)"/>
4096								</number:text>
4097							</xsl:if>
4098							<xsl:if test="substring($str1,1,1)='M' or substring($str1,1,1)='m'">
4099								<number:minutes/>
4100								<number:text>
4101									<xsl:value-of select="substring($str1-after,1,1)"/>
4102								</number:text>
4103							</xsl:if>
4104							<xsl:if test="substring($str1,1,1)='S' or substring($str1,1,1)='s'">
4105								<number:seconds/>
4106								<number:text>
4107									<xsl:value-of select="substring($str1-after,1,1)"/>
4108								</number:text>
4109							</xsl:if>
4110							<xsl:if test="string-length($str1-after)&gt;1">
4111								<xsl:call-template name="zytime">
4112									<xsl:with-param name="str1" select="substring($str1-after,2)"/>
4113								</xsl:call-template>
4114							</xsl:if>
4115						</xsl:if>
4116					</xsl:otherwise>
4117				</xsl:choose>
4118			</xsl:otherwise>
4119		</xsl:choose>
4120	</xsl:template>
4121	<xsl:template name="oo数字格式域开关">
4122		<xsl:param name="oo_format"/>
4123		<xsl:choose>
4124			<xsl:when test="$oo_format='Arabic'">1</xsl:when>
4125			<xsl:when test="$oo_format='ROMAN'">I</xsl:when>
4126			<xsl:when test="$oo_format='roman'">i</xsl:when>
4127			<xsl:when test="$oo_format='ALPHABETIC'">A</xsl:when>
4128			<xsl:when test="$oo_format='alphabetic'">a</xsl:when>
4129			<xsl:when test="$oo_format='GB1'">1, 2, 3, ...</xsl:when>
4130			<xsl:when test="$oo_format='GB3'">①, ②, ③, ...</xsl:when>
4131			<xsl:when test="$oo_format='CHINESENUM3'">一, 二, 三, ...</xsl:when>
4132			<xsl:when test="$oo_format='CHINESENUM2'">壹, 贰, 叁, ...</xsl:when>
4133			<xsl:when test="$oo_format='ZODIAC1'">甲, 乙, 丙, ...</xsl:when>
4134			<xsl:when test="$oo_format='ZODIAC2'">子, 丑, 寅, ...</xsl:when>
4135			<xsl:otherwise>1</xsl:otherwise>
4136		</xsl:choose>
4137	</xsl:template>
4138	<xsl:template name="题注">
4139		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串 or 字:域代码/字:段落/字:句/字:文本串">
4140			<xsl:variable name="aa" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,'\f ')"/>
4141			<xsl:variable name="ooow" select="substring-after($aa,'ooow:') "/>
4142			<xsl:variable name="as" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4143			<xsl:variable name="ad">
4144				<xsl:value-of select="substring-after($as,'SEQ ') "/>
4145			</xsl:variable>
4146			<xsl:variable name="num">
4147				<xsl:value-of select="substring-after(substring-before(../字:域代码/字:段落/字:句/字:文本串,' \f'),'\* ')"/>
4148			</xsl:variable>
4149			<xsl:variable name="fmt">
4150				<xsl:call-template name="oo数字格式域开关">
4151					<xsl:with-param name="oo_format" select="$num"/>
4152				</xsl:call-template>
4153			</xsl:variable>
4154			<xsl:element name="text:sequence">
4155				<xsl:attribute name="text:name"><xsl:choose><xsl:when test="$ad='表格'">Table</xsl:when><xsl:when test="$ad='图表'">Drawing</xsl:when><xsl:otherwise><xsl:value-of select="$ad"/></xsl:otherwise></xsl:choose></xsl:attribute>
4156				<xsl:attribute name="text:formula"><xsl:choose><xsl:when test="contains($aa,'ooow:')"><xsl:value-of select="$ooow"/></xsl:when><xsl:when test="contains($as,'表格')"><xsl:value-of select="concat('Table','+',$fmt)"/></xsl:when><xsl:when test="contains($as,'图表')"><xsl:value-of select="concat('Drawing','+',$fmt)"/></xsl:when><xsl:otherwise><xsl:value-of select="$aa"/></xsl:otherwise></xsl:choose></xsl:attribute>
4157				<xsl:attribute name="style:num-format"><xsl:value-of select="$fmt"/></xsl:attribute>
4158				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4159			</xsl:element>
4160		</xsl:if>
4161	</xsl:template>
4162	<xsl:template name="页码域">
4163		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串 or 字:域代码/字:段落/字:句/字:文本串">
4164			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4165			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4166			<xsl:variable name="fmt">
4167				<xsl:call-template name="oo数字格式域开关">
4168					<xsl:with-param name="oo_format" select="$date0"/>
4169				</xsl:call-template>
4170			</xsl:variable>
4171			<xsl:element name="text:page-number">
4172				<xsl:attribute name="style:num-format"><xsl:value-of select="$fmt"/></xsl:attribute>
4173				<xsl:attribute name="text:select-page">current</xsl:attribute>
4174				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4175			</xsl:element>
4176		</xsl:if>
4177	</xsl:template>
4178	<xsl:template name="页数域">
4179		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4180			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4181			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4182			<xsl:variable name="fmt">
4183				<xsl:call-template name="oo数字格式域开关">
4184					<xsl:with-param name="oo_format" select="substring-before($date0,' \*')"/>
4185				</xsl:call-template>
4186			</xsl:variable>
4187			<xsl:element name="text:page-count">
4188				<xsl:attribute name="style:num-format"><xsl:value-of select="$fmt"/></xsl:attribute>
4189				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4190			</xsl:element>
4191		</xsl:if>
4192	</xsl:template>
4193	<xsl:template name="作者域">
4194		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4195			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4196			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4197			<xsl:element name="text:initial-creator">
4198				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4199			</xsl:element>
4200		</xsl:if>
4201	</xsl:template>
4202	<xsl:template name="用户域">
4203		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4204			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4205			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4206			<xsl:element name="text:author-name">
4207				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4208			</xsl:element>
4209		</xsl:if>
4210	</xsl:template>
4211	<xsl:template name="缩写域">
4212		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4213			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4214			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4215			<xsl:element name="text:author-initials">
4216				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4217			</xsl:element>
4218		</xsl:if>
4219	</xsl:template>
4220	<xsl:template name="标题域">
4221		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4222			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4223			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4224			<xsl:element name="text:title">
4225				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4226			</xsl:element>
4227		</xsl:if>
4228	</xsl:template>
4229	<xsl:template name="主题域">
4230		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4231			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4232			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4233			<xsl:element name="text:subject">
4234				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4235			</xsl:element>
4236		</xsl:if>
4237	</xsl:template>
4238	<xsl:template name="文件名">
4239		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4240			<xsl:element name="text:file-name">
4241				<xsl:variable name="string">
4242					<xsl:value-of select="../字:域代码/字:段落/字:句/字:文本串"/>
4243				</xsl:variable>
4244				<xsl:attribute name="text:display"><xsl:choose><xsl:when test="contains($string,' \p')">full</xsl:when><xsl:otherwise>name-and-extension</xsl:otherwise></xsl:choose></xsl:attribute>
4245				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4246			</xsl:element>
4247		</xsl:if>
4248	</xsl:template>
4249	<xsl:template name="编辑时间">
4250		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4251			<xsl:variable name="date0" select="substring-after(following-sibling::字:域代码/字:段落/字:句/字:文本串,'\@ ')"/>
4252			<xsl:variable name="datestr" select="$date0"/>
4253			<xsl:call-template name="zytime">
4254				<xsl:with-param name="str1" select="substring($datestr,2,string-length($datestr)-2)"/>
4255			</xsl:call-template>
4256		</xsl:if>
4257	</xsl:template>
4258	<xsl:template name="创建时间">
4259		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4260			<xsl:variable name="date0" select="substring-after(following-sibling::字:域代码/字:段落/字:句/字:文本串,'\@ ')"/>
4261			<xsl:variable name="datestr" select="$date0"/>
4262			<xsl:call-template name="zytime">
4263				<xsl:with-param name="str1" select="substring($datestr,2,string-length($datestr)-2)"/>
4264			</xsl:call-template>
4265		</xsl:if>
4266	</xsl:template>
4267	<xsl:template name="字符数">
4268		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4269			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4270			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4271			<xsl:variable name="fmt">
4272				<xsl:call-template name="oo数字格式域开关">
4273					<xsl:with-param name="oo_format" select="substring-before($date0,' \#')"/>
4274				</xsl:call-template>
4275			</xsl:variable>
4276			<xsl:element name="text:character-count">
4277				<xsl:attribute name="style:num-format"><xsl:value-of select="$fmt"/></xsl:attribute>
4278				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4279			</xsl:element>
4280		</xsl:if>
4281	</xsl:template>
4282	<xsl:key name="mulu" match="/uof:UOF/uof:式样集/uof:段落式样" use="@字:标识符"/>
4283	<xsl:template name="索引域">
4284		<xsl:element name="text:alphabetical-index">
4285			<xsl:variable name="stylenum">
4286				<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句" format="1"/>
4287			</xsl:variable>
4288			<xsl:attribute name="text:style-name"><xsl:value-of select="concat('Sect',$stylenum)"/></xsl:attribute>
4289			<xsl:variable name="aanum">
4290				<xsl:number value="0" format="1"/>
4291			</xsl:variable>
4292			<xsl:attribute name="text:name"><xsl:value-of select="concat('索引目录',$aanum + 1)"/></xsl:attribute>
4293			<text:alphabetical-index-source text:main-entry-style-name="Main_index_entry" text:sort-algorithm="pinyin" fo:language="zh" fo:country="CN">
4294				<text:index-title-template text:style-name="Index_20_Heading">索引目录</text:index-title-template>
4295				<text:alphabetical-index-entry-template text:outline-level="separator" text:style-name="Index_Separator">
4296					<text:index-entry-text/>
4297				</text:alphabetical-index-entry-template>
4298				<text:alphabetical-index-entry-template text:outline-level="1" text:style-name="Index_20_1">
4299					<text:index-entry-text/>
4300					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4301					<text:index-entry-page-number/>
4302				</text:alphabetical-index-entry-template>
4303				<text:alphabetical-index-entry-template text:outline-level="2" text:style-name="Index_20_2">
4304					<text:index-entry-text/>
4305					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4306					<text:index-entry-page-number/>
4307				</text:alphabetical-index-entry-template>
4308				<text:alphabetical-index-entry-template text:outline-level="3" text:style-name="Index_20_3">
4309					<text:index-entry-text/>
4310					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4311					<text:index-entry-page-number/>
4312				</text:alphabetical-index-entry-template>
4313			</text:alphabetical-index-source>
4314			<text:index-body>
4315				<text:index-title>
4316					<xsl:attribute name="text:style-name"><xsl:value-of select="concat('Sect',$stylenum)"/></xsl:attribute>
4317					<xsl:attribute name="text:name"><xsl:value-of select="concat('索引目录',$aanum + 1,'_Head')"/></xsl:attribute>
4318					<xsl:for-each select="字:域代码/字:段落[position()=2]">
4319						<text:p text:style-name="Index_20_Heading">
4320							<xsl:apply-templates select=".//字:文本串"/>
4321						</text:p>
4322					</xsl:for-each>
4323				</text:index-title>
4324				<xsl:if test="字:域开始/@字:类型='INDEX'">
4325					<xsl:for-each select="字:域代码/字:段落[position()>2]">
4326						<xsl:element name="text:p">
4327							<xsl:variable name="aa">
4328								<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/>
4329							</xsl:variable>
4330							<xsl:attribute name="text:style-name"><xsl:value-of select="concat('P',$aa + 1)"/></xsl:attribute>
4331							<xsl:for-each select="字:句">
4332								<xsl:apply-templates select="self::node()/*"/>
4333							</xsl:for-each>
4334						</xsl:element>
4335					</xsl:for-each>
4336				</xsl:if>
4337			</text:index-body>
4338		</xsl:element>
4339	</xsl:template>
4340	<xsl:template name="目录域">
4341		<xsl:element name="text:table-of-content">
4342			<xsl:variable name="stylenum">
4343				<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句" format="1"/>
4344			</xsl:variable>
4345			<xsl:attribute name="text:style-name"><xsl:value-of select="concat('Sect',$stylenum)"/></xsl:attribute>
4346			<xsl:variable name="aanum">
4347				<xsl:number value="0" format="1"/>
4348			</xsl:variable>
4349			<xsl:attribute name="text:name"><xsl:value-of select="concat('内容目录',$aanum + 1)"/></xsl:attribute>
4350			<text:table-of-content-source text:outline-level="10">
4351				<text:index-title-template text:style-name="Contents_20_Heading">内容目录</text:index-title-template>
4352				<text:table-of-content-entry-template text:outline-level="1" text:style-name="Contents 1">
4353					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4354					<text:index-entry-chapter/>
4355					<text:index-entry-text/>
4356					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4357					<text:index-entry-page-number/>
4358					<text:index-entry-link-end/>
4359				</text:table-of-content-entry-template>
4360				<text:table-of-content-entry-template text:outline-level="2" text:style-name="Contents 2">
4361					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4362					<text:index-entry-chapter/>
4363					<text:index-entry-text/>
4364					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4365					<text:index-entry-page-number/>
4366					<text:index-entry-link-end/>
4367				</text:table-of-content-entry-template>
4368				<text:table-of-content-entry-template text:outline-level="3" text:style-name="Contents 3">
4369					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4370					<text:index-entry-chapter/>
4371					<text:index-entry-text/>
4372					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4373					<text:index-entry-page-number/>
4374					<text:index-entry-link-end/>
4375				</text:table-of-content-entry-template>
4376				<text:table-of-content-entry-template text:outline-level="4" text:style-name="Contents 4">
4377					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4378					<text:index-entry-chapter/>
4379					<text:index-entry-text/>
4380					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4381					<text:index-entry-page-number/>
4382					<text:index-entry-link-end/>
4383				</text:table-of-content-entry-template>
4384				<text:table-of-content-entry-template text:outline-level="5" text:style-name="Contents 5">
4385					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4386					<text:index-entry-chapter/>
4387					<text:index-entry-text/>
4388					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4389					<text:index-entry-page-number/>
4390					<text:index-entry-link-end/>
4391				</text:table-of-content-entry-template>
4392				<text:table-of-content-entry-template text:outline-level="6" text:style-name="Contents 6">
4393					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4394					<text:index-entry-chapter/>
4395					<text:index-entry-text/>
4396					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4397					<text:index-entry-page-number/>
4398					<text:index-entry-link-end/>
4399				</text:table-of-content-entry-template>
4400				<text:table-of-content-entry-template text:outline-level="7" text:style-name="Contents 7">
4401					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4402					<text:index-entry-chapter/>
4403					<text:index-entry-text/>
4404					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4405					<text:index-entry-page-number/>
4406					<text:index-entry-link-end/>
4407				</text:table-of-content-entry-template>
4408				<text:table-of-content-entry-template text:outline-level="8" text:style-name="Contents 8">
4409					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4410					<text:index-entry-chapter/>
4411					<text:index-entry-text/>
4412					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4413					<text:index-entry-page-number/>
4414					<text:index-entry-link-end/>
4415				</text:table-of-content-entry-template>
4416				<text:table-of-content-entry-template text:outline-level="9" text:style-name="Contents 9">
4417					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4418					<text:index-entry-chapter/>
4419					<text:index-entry-text/>
4420					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4421					<text:index-entry-page-number/>
4422					<text:index-entry-link-end/>
4423				</text:table-of-content-entry-template>
4424				<text:table-of-content-entry-template text:outline-level="10" text:style-name="Contents 10">
4425					<text:index-entry-link-start text:style-name="Index_20_Link"/>
4426					<text:index-entry-chapter/>
4427					<text:index-entry-text/>
4428					<text:index-entry-tab-stop style:type="right" style:leader-char="."/>
4429					<text:index-entry-page-number/>
4430					<text:index-entry-link-end/>
4431				</text:table-of-content-entry-template>
4432			</text:table-of-content-source>
4433			<text:index-body>
4434				<text:index-title>
4435					<xsl:attribute name="text:style-name"><xsl:value-of select="concat('Sect',$stylenum)"/></xsl:attribute>
4436					<xsl:attribute name="text:name"><xsl:value-of select="concat('内容目录',$aanum + 1,'_Head')"/></xsl:attribute>
4437					<xsl:for-each select="字:域代码/字:段落[position()=2]">
4438						<text:p text:style-name="Contents_20_Heading">
4439							<xsl:apply-templates select=".//字:文本串"/>
4440						</text:p>
4441					</xsl:for-each>
4442				</text:index-title>
4443				<xsl:if test="字:域开始/@字:类型='REF'">
4444					<xsl:for-each select="字:域代码/字:段落[position()>2]">
4445						<xsl:element name="text:p">
4446							<xsl:variable name="aa">
4447								<xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/>
4448							</xsl:variable>
4449							<xsl:attribute name="text:style-name"><xsl:value-of select="concat('P',$aa + 1)"/></xsl:attribute>
4450							<xsl:element name="text:a">
4451								<xsl:attribute name="xlink:type">simple</xsl:attribute>
4452								<xsl:attribute name="text:style-name">Index Link</xsl:attribute>
4453								<xsl:attribute name="text:visited-style-name">Index Link</xsl:attribute>
4454								<xsl:variable name="hyperDest" select="./字:句/字:区域开始/@字:标识符"/>
4455								<xsl:attribute name="xlink:href"><xsl:for-each select="/uof:UOF/uof:链接集/uof:超级链接"><xsl:if test="@uof:链源=$hyperDest"><xsl:value-of select="concat('#',@uof:书签)"/></xsl:if></xsl:for-each></xsl:attribute>
4456								<xsl:apply-templates select="字:句/*"/>
4457							</xsl:element>
4458						</xsl:element>
4459					</xsl:for-each>
4460				</xsl:if>
4461			</text:index-body>
4462		</xsl:element>
4463	</xsl:template>
4464	<xsl:template name="suojinleixing">
4465		<xsl:if test="字:缩进/字:首行/字:绝对/@字:值 and 字:缩进/字:左/字:绝对/@字:值">
4466			<xsl:attribute name="text:min-label-width"><xsl:value-of select="concat(0 - 字:缩进/字:首行/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
4467			<xsl:attribute name="text:space-before"><xsl:value-of select="concat(字:缩进/字:左/字:绝对/@字:值 + 字:缩进/字:首行/字:绝对/@字:值,$uofUnit)"/></xsl:attribute>
4468		</xsl:if>
4469	</xsl:template>
4470	<xsl:template match="字:修订开始[@字:类型='insert']">
4471		<xsl:choose>
4472			<xsl:when test="./@字:标识符">
4473				<text:change-start text:change-id="{@字:标识符}"/>
4474			</xsl:when>
4475			<xsl:otherwise>
4476				<text:change-start text:change-id="{@字:修订信息引用}"/>
4477			</xsl:otherwise>
4478		</xsl:choose>
4479	</xsl:template>
4480	<xsl:template match="字:修订结束[preceding::字:修订开始[1]/@字:类型='insert']">
4481		<text:change-end>
4482			<xsl:attribute name="text:change-id"><xsl:value-of select="@字:开始标识引用"/></xsl:attribute>
4483		</text:change-end>
4484	</xsl:template>
4485	<xsl:template match="字:修订开始[@字:类型='delete']">
4486		<xsl:choose>
4487			<xsl:when test="./@字:标识符">
4488				<text:change-start text:change-id="{@字:标识符}"/>
4489			</xsl:when>
4490			<xsl:otherwise>
4491				<text:change-start text:change-id="{@字:修订信息引用}"/>
4492			</xsl:otherwise>
4493		</xsl:choose>
4494	</xsl:template>
4495	<xsl:template match="字:修订结束[preceding::字:修订开始[1]/@字:类型='delete']">
4496		<text:change-end>
4497			<xsl:attribute name="text:change-id"><xsl:value-of select="@字:开始标识引用"/></xsl:attribute>
4498		</text:change-end>
4499	</xsl:template>
4500	<xsl:template match="字:修订开始[@字:类型='format']">
4501		<xsl:choose>
4502			<xsl:when test="./@字:标识符">
4503				<text:change-start text:change-id="{@字:标识符}"/>
4504			</xsl:when>
4505			<xsl:otherwise>
4506				<text:change-start text:change-id="{@字:修订信息引用}"/>
4507			</xsl:otherwise>
4508		</xsl:choose>
4509	</xsl:template>
4510	<xsl:template match="字:修订结束[preceding::字:修订开始[1]/@字:类型='format']">
4511		<text:change-end>
4512			<xsl:attribute name="text:change-id"><xsl:value-of select="@字:开始标识引用"/></xsl:attribute>
4513		</text:change-end>
4514	</xsl:template>
4515	<xsl:template name="GenerateTrackChanges">
4516		<text:tracked-changes>
4517			<xsl:if test="/uof:UOF/uof:文字处理/字:公用处理规则/字:文档设置/字:修订">
4518				<xsl:attribute name="text:track-changes"><xsl:value-of select="/uof:UOF/uof:文字处理/字:公用处理规则/字:文档设置/字:修订/@字:值"/></xsl:attribute>
4519			</xsl:if>
4520			<xsl:if test="//字:段落/字:修订开始[@字:类型='insert']">
4521				<xsl:for-each select="//字:段落/字:修订开始[@字:类型='insert']">
4522					<xsl:variable name="id" select="@字:标识符"/>
4523					<xsl:variable name="aid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:修订信息集/字:修订信息[@字:标识符=$id]/@字:作者"/>
4524					<xsl:variable name="sid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:用户集/字:用户[@字:标识符=$aid]/@字:姓名"/>
4525					<xsl:variable name="bid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:修订信息集/字:修订信息[@字:标识符=$id]/@字:日期"/>
4526					<text:changed-region text:id="{$id}">
4527						<xsl:choose>
4528							<xsl:when test="name()='字:修订开始'">
4529								<xsl:choose>
4530									<xsl:when test="not(name(following-sibling::node()[1])='字:修订结束')">
4531										<text:insertion>
4532											<office:change-info>
4533												<dc:creator>
4534													<xsl:value-of select="$sid"/>
4535												</dc:creator>
4536												<dc:date>
4537													<xsl:value-of select="$bid"/>
4538												</dc:date>
4539											</office:change-info>
4540										</text:insertion>
4541									</xsl:when>
4542									<xsl:otherwise>
4543										<text:format-change>
4544											<office:change-info>
4545												<dc:creator>
4546													<xsl:value-of select="$sid"/>
4547												</dc:creator>
4548												<dc:date>
4549													<xsl:value-of select="$bid"/>
4550												</dc:date>
4551											</office:change-info>
4552										</text:format-change>
4553									</xsl:otherwise>
4554								</xsl:choose>
4555							</xsl:when>
4556						</xsl:choose>
4557					</text:changed-region>
4558				</xsl:for-each>
4559			</xsl:if>
4560			<xsl:if test="//字:段落/字:修订开始[@字:类型='insert']">
4561				<xsl:for-each select="//字:段落/字:修订开始[@字:类型='delete']">
4562					<xsl:variable name="id" select="@字:标识符"/>
4563					<xsl:variable name="aid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:修订信息集/字:修订信息[@字:标识符=$id]/@字:作者"/>
4564					<xsl:variable name="sid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:用户集/字:用户[@字:标识符=$aid]/@字:姓名"/>
4565					<xsl:variable name="bid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:修订信息集/字:修订信息[@字:标识符=$id]/@字:日期"/>
4566					<text:changed-region text:id="{$id}">
4567						<xsl:choose>
4568							<xsl:when test="name()='字:修订开始'">
4569								<xsl:choose>
4570									<xsl:when test="not(name(following-sibling::node()[1])='字:修订结束')">
4571										<text:deletion>
4572											<office:change-info>
4573												<dc:creator>
4574													<xsl:value-of select="$sid"/>
4575												</dc:creator>
4576												<dc:date>
4577													<xsl:value-of select="$bid"/>
4578												</dc:date>
4579											</office:change-info>
4580										</text:deletion>
4581									</xsl:when>
4582									<xsl:otherwise>
4583										<text:format-change>
4584											<office:change-info>
4585												<dc:creator>
4586													<xsl:value-of select="$sid"/>
4587												</dc:creator>
4588												<dc:date>
4589													<xsl:value-of select="$bid"/>
4590												</dc:date>
4591											</office:change-info>
4592										</text:format-change>
4593									</xsl:otherwise>
4594								</xsl:choose>
4595							</xsl:when>
4596						</xsl:choose>
4597					</text:changed-region>
4598				</xsl:for-each>
4599				</xsl:if>
4600				<xsl:if test="//字:段落/字:修订开始[@字:类型='format']">
4601				<xsl:for-each select="//字:段落/字:修订开始[@字:类型='format']">
4602					<xsl:variable name="id" select="@字:标识符"/>
4603					<xsl:variable name="aid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:修订信息集/字:修订信息[@字:标识符=$id]/@字:作者"/>
4604					<xsl:variable name="sid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:用户集/字:用户[@字:标识符=$aid]/@字:姓名"/>
4605					<xsl:variable name="bid" select="/uof:UOF/uof:文字处理/字:公用处理规则/字:修订信息集/字:修订信息[@字:标识符=$id]/@字:日期"/>
4606					<text:changed-region text:id="{$id}">
4607						<xsl:choose>
4608							<xsl:when test="name()='字:修订开始'">
4609								<xsl:choose>
4610									<xsl:when test="not(name(following-sibling::node()[1])='字:修订结束')">
4611										<text:format-change>
4612											<office:change-info>
4613												<dc:creator>
4614													<xsl:value-of select="$sid"/>
4615												</dc:creator>
4616												<dc:date>
4617													<xsl:value-of select="$bid"/>
4618												</dc:date>
4619											</office:change-info>
4620										</text:format-change>
4621									</xsl:when>
4622									<xsl:otherwise>
4623									</xsl:otherwise>
4624								</xsl:choose>
4625							</xsl:when>
4626						</xsl:choose>
4627					</text:changed-region>
4628				</xsl:for-each>
4629				</xsl:if>
4630
4631			</text:tracked-changes>
4632
4633	</xsl:template>
4634	<xsl:template name="oo数字格式">
4635		<xsl:param name="oo_format"/>
4636		<xsl:choose>
4637			<xsl:when test="$oo_format='decimal'">1</xsl:when>
4638			<xsl:when test="$oo_format='upper-roman'">I</xsl:when>
4639			<xsl:when test="$oo_format='lower-roman'">i</xsl:when>
4640			<xsl:when test="$oo_format='upper-letter'">A</xsl:when>
4641			<xsl:when test="$oo_format='lower-letter'">a</xsl:when>
4642			<xsl:when test="$oo_format='decimal-full-width'">1, 2, 3, ...</xsl:when>
4643			<xsl:when test="$oo_format='decimal-enclosed-circle'">①, ②, ③, ...</xsl:when>
4644			<xsl:when test="$oo_format='chinese-counting'">一, 二, 三, ...</xsl:when>
4645			<xsl:when test="$oo_format='chinese-legal-simplified'">壹, 贰, 叁, ...</xsl:when>
4646			<xsl:when test="$oo_format='ideograph-traditional'">甲, 乙, 丙, ...</xsl:when>
4647			<xsl:when test="$oo_format='ideograph-zodiac'">子, 丑, 寅, ...</xsl:when>
4648			<xsl:otherwise>1</xsl:otherwise>
4649		</xsl:choose>
4650	</xsl:template>
4651	<xsl:template name="章节域">
4652		<xsl:if test="../字:域代码/字:段落/字:句/字:文本串">
4653			<xsl:variable name="date0" select="substring-after(../字:域代码/字:段落/字:句/字:文本串,' \* ')"/>
4654			<xsl:variable name="datestr" select="substring-before(../字:域代码/字:段落/字:句/字:文本串,'\* ')"/>
4655			<xsl:variable name="fmt">
4656				<xsl:choose>
4657					<xsl:when test="substring-before($date0,' \*')='Arabic'">
4658						<xsl:call-template name="oo数字格式域开关">
4659							<xsl:with-param name="oo_format" select="substring-before($date0,' \*')"/>
4660						</xsl:call-template>
4661					</xsl:when>
4662					<xsl:otherwise>1</xsl:otherwise>
4663				</xsl:choose>
4664			</xsl:variable>
4665
4666			<xsl:element name="text:chapter">
4667				<xsl:attribute name="text:display">name</xsl:attribute>
4668				<xsl:attribute name="text:outline-level"><xsl:value-of select="$fmt"/></xsl:attribute>
4669				<xsl:value-of select="following-sibling::字:句/字:文本串"/>
4670			</xsl:element>
4671		</xsl:if>
4672	</xsl:template>
4673</xsl:stylesheet>
4674