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