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