incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject svn commit: r1363673 [2/5] - in /incubator/ooo/trunk/main: filter/prj/ filter/source/config/fragments/ filter/source/config/fragments/filters/ filter/source/config/fragments/types/ filter/source/xmlfilterdetect/ filter/source/xslt/export/uof2/ filter/s...
Date Fri, 20 Jul 2012 08:24:52 GMT
Added: incubator/ooo/trunk/main/filter/source/xslt/export/uof2/odf2uof.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/xslt/export/uof2/odf2uof.xsl?rev=1363673&view=auto
==============================================================================
--- incubator/ooo/trunk/main/filter/source/xslt/export/uof2/odf2uof.xsl (added)
+++ incubator/ooo/trunk/main/filter/source/xslt/export/uof2/odf2uof.xsl Fri Jul 20 08:24:50 2012
@@ -0,0 +1,16601 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--/************************************************************** *  
+* Licensed to the Apache Software Foundation (ASF) under one 
+* or more contributor license agreements.  See the NOTICE file 
+* distributed with this work for additional information 
+* regarding copyright ownership.  The ASF licenses this file 
+* to you under the Apache License, Version 2.0 (the 
+* "License"); you may not use this file except in compliance 
+* with the License.  You may obtain a copy of the License at 
+*  
+*   http://www.apache.org/licenses/LICENSE-2.0 
+*  
+* Unless required by applicable law or agreed to in writing, 
+* software distributed under the License is distributed on an 
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+* KIND, either express or implied.  See the License for the 
+* specific language governing permissions and limitations 
+* under the License. *  
+*************************************************************/-->
+ <!--MARKER(update_precomp.py): autogen include statement, do not remove-->
+ <!--//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:offi
 ce="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:pzip="urn:cleverage:xmlns:post-processings:zip" xmlns:rdfa="http://docs.oasis-open.org/opendocument/meta/rdfa#" xmlns:fun="http://NSO.com" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:uof="http://schemas.uof.org/cn/2009/uof" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xlink="http://www.w3.org/1999/xlink" xm
 lns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:书签="http://schemas.uof.org/cn/2009/bookmarks" xmlns:元="http://schemas.uof.org/cn/2009/metadata" xmlns:公式="http://schemas.uof.org/cn/2009/equations" xmlns:图="http://schemas.uof.org/cn/2009/graph" xmlns:图形="http://schemas.uof.org/cn/2009/graphics" xmlns:图表="http://schemas.uof.org/cn/2009/chart" xmlns:字="http://schemas.uof.org/cn/2009/wordproc" xmlns:对象="http://schemas.uof.org/cn/2009/objects" xmlns:式样="http://schemas.uof.org/cn/2009/styles" xmlns:扩展="http://schemas.uof.org/cn/2009/extend" xmlns:数="http://www.w3.org/1998/Math/MathML" xmlns:数据="http://schemas.uof.org/cn/2009/usd" xmlns:演="http://schemas.uof.org/cn/2009/presentation" xmlns:表="http://schemas.uof.org/cn/2009/spreadsheet" xmlns:规则="http://schemas.uof.org
 /cn/2009/rules" xmlns:超链="http://schemas.uof.org/cn/2009/hyperlinks" exclude-result-prefixes="office style text table draw xlink dc meta number presentation chart dr3d form script config ooo ooow oooc dom smil fun anim pzip fo svg math xforms" office:version="1.0" version="2.0">
+	<xsl:output encoding="utf-8" indent="no" method="xml" omit-xml-declaration="no" standalone="no" version="1.0" name="xml"/>
+	<xsl:variable name="documentType">
+		<xsl:choose>
+			<xsl:when test="contains(/office:document/@office:mimetype,'presentation')">presentation</xsl:when>
+			<xsl:when test="contains(/office:document/@office:mimetype,'text')">text</xsl:when>
+			<xsl:when test="contains(/office:document/@office:mimetype,'spreadsheet')">spreadsheet</xsl:when>
+			<xsl:otherwise>
+				<xsl:choose>
+					<xsl:when test="contains(/office:document/office:body/.,'presentation')">presentation</xsl:when>
+					<xsl:when test="contains(/office:document/office:body/.,'text')">text</xsl:when>
+					<xsl:when test="contains(/office:document/office:body/.,'spreadsheet')">spreadsheet</xsl:when>
+				</xsl:choose>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:variable>
+	<xsl:variable name="ooUnit">
+		<xsl:variable name="ValueWithUnit">
+			<xsl:value-of select="/office:document/office:automatic-styles/style:page-layout/style:page-layout-properties/@fo:page-width"/>
+		</xsl:variable>
+		<xsl:choose>
+			<xsl:when test="contains($ValueWithUnit,'in')">in</xsl:when>
+			<xsl:when test="contains($ValueWithUnit,'cm')">cm</xsl:when>
+			<xsl:when test="contains($ValueWithUnit,'mm')">mm</xsl:when>
+			<xsl:when test="contains($ValueWithUnit,'pt')">pt</xsl:when>
+			<xsl:when test="contains($ValueWithUnit,'twip')">twip</xsl:when>
+			<xsl:when test="contains($ValueWithUnit,'dpt')">dpt</xsl:when>
+			<xsl:when test="contains($ValueWithUnit,'px')">px</xsl:when>
+			<xsl:when test="contains($ValueWithUnit,'pica')">pica</xsl:when>
+			<xsl:otherwise>pt</xsl:otherwise>
+		</xsl:choose>
+	</xsl:variable>
+	<xsl:variable name="uofUnit">
+		<xsl:choose>
+			<xsl:when test="$ooUnit='twip'">pt</xsl:when>
+			<xsl:when test="$ooUnit='pica'">pt</xsl:when>
+			<xsl:when test="$ooUnit='dpt'">pt</xsl:when>
+			<xsl:when test="$ooUnit='px'">pt</xsl:when>
+			<xsl:otherwise>
+				<xsl:value-of select="$ooUnit"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:variable>
+	<xsl:variable name="other-to-cm-conversion-factor">
+		<xsl:choose>
+			<xsl:when test="$ooUnit='cm'">1</xsl:when>
+			<xsl:when test="$ooUnit='mm'">0.1</xsl:when>
+			<xsl:when test="$ooUnit='pt'">0.03527</xsl:when>
+			<xsl:when test="$ooUnit='in'">2.54</xsl:when>
+			<xsl:when test="$ooUnit='pica'">0.42333333</xsl:when>
+			<xsl:when test="$ooUnit='twip'">0.0017636684</xsl:when>
+			<xsl:when test="$ooUnit='dpt'">0.0376065</xsl:when>
+			<xsl:when test="$ooUnit='px'">0.02288288</xsl:when>
+			<xsl:otherwise>1</xsl:otherwise>
+		</xsl:choose>
+	</xsl:variable>
+	<xsl:variable name="isRCCellAddress">
+		<xsl:choose>
+			<xsl:when test="($documentType='spreadsheet') and (/office:document/office:meta/meta:user-defined[@meta:name='isRCCellAddress'] = 'true')">true</xsl:when>
+			<xsl:otherwise>false</xsl:otherwise>
+		</xsl:choose>
+	</xsl:variable>
+	<xsl:key match="/office:document/office:styles/style:style | /office:document/office:automatic-styles/style:style" name="Style" use="@style:name"/>
+	<xsl:key match="/office:document/office:styles/style:style[@style:family='paragraph'] | /office:document/office:automatic-styles/style:style[@style:family='paragraph']" name="ParaStyle" use="@style:name"/>
+	<xsl:key match="/office:document/office:styles/style:style[@style:family='graphic' or @style:family='presentation'] | /office:document/office:automatic-styles/style:style[@style:family='graphic' or @style:family='presentation']" name="GraphStyle" use="@style:name"/>
+	<xsl:key match="/office:document/office:styles/style:style[@style:family='table'] | /office:document/office:automatic-styles/style:style[@style:family='table']" name="TableStyle" use="@style:name"/>
+	<xsl:key match="/office:document/office:automatic-styles/style:style[@style:family='table-column']" name="ColStyle" use="@style:name"/>
+	<xsl:key match="/office:document/office:automatic-styles/style:style[@style:family='table-row']" name="RowStyle" use="@style:name"/>
+	<xsl:key match="/office:document/office:automatic-styles/style:style[@style:family='table-cell']" name="CellStyle" use="@style:name"/>
+	<xsl:key match="/office:document/office:styles/number:number-style | /office:document/office:styles/number:currency-style | /office:document/office:styles/number:percentage-style | /office:document/office:styles/number:date-style | /office:document/office:styles/number:time-style | /office:document/office:styles/number:boolean-style | /office:document/office:styles/number:text-style | /office:document/office:automatic-styles/number:number-style | /office:document/office:automatic-styles/number:currency-style | /office:document/office:automatic-styles/number:percentage-style | /office:document/office:automatic-styles/number:date-style | /office:document/office:automatic-styles/number:time-style | /office:document/office:automatic-styles/number:boolean-style | /office:document/office:automatic-styles/number:text-style" name="AllNumberStyle" use="@style:name"/>
+	<xsl:key match="/office:document/office:body//draw:* | /office:document/office:body//office:annotation | /office:document/office:master-styles//draw:*" name="findanchor" use="@draw:style-name"/>
+	<xsl:key match="/office:document/office:body//draw:* | /office:document/office:master-styles//draw:*" name="findanchorP" use="@presentation:style-name"/>
+	<xsl:key match="/office:document/office:body//table:table" name="findtable" use="@table:name"/>
+	<xsl:key match="/office:document/office:master-styles/style:master-page" name="MasterPage" use="@draw:style-name"/>
+	<xsl:key match="/office:document/office:styles/draw:marker" name="markerSize" use="@draw:name"/>
+	<xsl:key match="/office:document/office:body//draw:custom-shape/draw:enhanced-geometry" name="expandcustomshapetype" use="@draw:type"/>
+	<xsl:template match="office:document">
+		<pzip:entry>
+			<pzip:target pzip:path="uof.xml">
+				<uof:UOF_0000 language_0002="cn" version_0003="2.0">
+					<xsl:attribute name="mimetype_0001"><xsl:choose><xsl:when test="$documentType='presentation'">vnd.uof.presentation</xsl:when><xsl:when test="$documentType='spreadsheet'">vnd.uof.spreadsheet</xsl:when><xsl:otherwise>vnd.uof.text</xsl:otherwise></xsl:choose></xsl:attribute>
+					
+					<!--BEGIN "文档标识"、"基式样引用"属性暂时未使用-->
+					<!--
+				<xsl:attribute name="文档标识"/>
+				<xsl:attribute name="基式样引用"/>
+				-->
+					<!--END-->
+				</uof:UOF_0000>
+			</pzip:target>
+			<pzip:target pzip:path="_meta/meta.xml">
+				<元:元数据_5200>
+					<xsl:apply-templates select="office:meta"/>
+				</元:元数据_5200>
+			</pzip:target>
+			<xsl:if test="/office:document/office:body/office:text/text:p/text:bookmark-start or /office:document/office:body/office:text/text:p/text:bookmark or /office:document/office:body/office:spreadsheet/table:named-expressions/table:named-range">
+				<pzip:target pzip:path="bookmarks.xml">
+					<书签:书签集_9104>
+						<xsl:if test="$documentType='text'">
+							<xsl:call-template name="sw-BookMarks"/>
+						</xsl:if>
+						<xsl:if test="$documentType='spreadsheet'">
+							<xsl:call-template name="sc-BookMarks"/>
+						</xsl:if>
+					</书签:书签集_9104>
+				</pzip:target>
+			</xsl:if>
+			<xsl:if test=".//draw:object[@*|*]">
+				<xsl:if test=".//draw:object/math:math">
+					<pzip:target pzip:path="equations.xml">
+						<公式:公式集_C200>
+							<xsl:call-template name="equations"/>
+						</公式:公式集_C200>
+					</pzip:target>
+				</xsl:if>
+			</xsl:if>
+			<xsl:if test="//text:a | //draw:a">
+				<pzip:target pzip:path="hyperlinks.xml">
+					<超链:链接集_AA0B>
+						<xsl:call-template name="Hyperlinks"/>
+					</超链:链接集_AA0B>
+				</pzip:target>
+			</xsl:if>
+			<xsl:if test="/office:document/office:styles/style:style[@style:family='graphic'] or /office:document/office:styles/style:style[@style:family='presentation'] or /office:document/office:automatic-styles/style:style[@style:family='graphic'] or /office:document/office:automatic-styles/style:style[@style:family='presentation'] or /office:document/office:master-styles//draw:g or /office:document/office:body//draw:g or /office:document/office:master-styles//draw:page-thumbnail[not(@draw:style-name) and not(@presentation:style-name)] or /office:document/office:styles/style:presentation-page-layout/presentation:placeholder or /office:document/office:body/office:presentation/draw:page//draw:page-thumbnail[not(@draw:style-name) and not(@presentation:style-name)] or /office:document/office:body/office:presentation/draw:page//draw:frame[not(@draw:style-name) and not(@presentation:style-name)] or /office:document/office:body//table:shapes/draw:frame[not(@draw:style-name)]">
+				<pzip:target pzip:path="graphics.xml">
+					<xsl:call-template name="ObjectSets"/>
+				</pzip:target>
+			</xsl:if>
+			<xsl:if test=".//draw:image[@*|* and not(preceding-sibling::*)] or /office:document//style:background-image or /office:document//text:list-level-style-image or /office:document/office:styles/draw:fill-image or office:styles/style:style[@style:family='graphic'] or /office:document/office:styles/style:style[@style:family='presentation'] or /office:document/office:automatic-styles/style:style[@style:family='graphic'] or /office:document/office:automatic-styles/style:style[@style:family='presentation'] or /office:document/office:body/office:presentation/draw:page//draw:frame[not(@draw:style-name) and not(@presentation:style-name)] or //office:document/office:styles/draw:fill-image">
+				<pzip:target pzip:path="objectdata.xml">
+					<对象:对象数据集_D700>
+						<xsl:call-template name="ObjectData"/>
+					</对象:对象数据集_D700>
+				</pzip:target>
+			</xsl:if>
+			<xsl:if test="$documentType='text' and /office:document/office:body/office:text//office:annotation[contains(dc:creator,'__@*Start@')]">
+				<pzip:target pzip:path="app/userdata.xml">
+					<数据:用户数据集_6300>
+						<xsl:call-template name="UserDataSet"/>
+					</数据:用户数据集_6300>
+				</pzip:target>
+			</xsl:if>
+			<pzip:target pzip:path="styles.xml">
+				<式样:式样集_990B>
+					<xsl:choose>
+						<xsl:when test="$documentType = 'presentation'">
+							<xsl:call-template name="Fonts_presentation"/>
+						</xsl:when>
+						<xsl:otherwise>
+							<xsl:call-template name="Fonts"/>
+						</xsl:otherwise>
+					</xsl:choose>
+					<xsl:call-template name="AutoNumbers_text"/>
+					<式样:句式样集_990F>
+						<xsl:call-template name="TextStyles"/>
+						<xsl:if test="$documentType = 'presentation'">
+							<xsl:call-template name="AnimationTextStyles"/>
+						</xsl:if>
+					</式样:句式样集_990F>
+					<式样:段落式样集_9911>
+						<xsl:call-template name="ParagraphStyles"/>
+						<xsl:if test="$documentType = 'presentation'">
+							<xsl:call-template name="PresentationParaStyles"/>
+						</xsl:if>
+					</式样:段落式样集_9911>
+					<xsl:if test="$documentType = 'presentation'">
+						<式样:文本式样集_9913>
+							<xsl:for-each select="office:master-styles/style:master-page">
+								<xsl:call-template name="TextStyleSet"/>
+							</xsl:for-each>
+						</式样:文本式样集_9913>
+					</xsl:if>
+					<xsl:choose>
+						<xsl:when test="$documentType = 'spreadsheet'">
+							<式样:单元格式样集_9915>
+								<xsl:call-template name="TableCellStyles"/>
+							</式样:单元格式样集_9915>
+						</xsl:when>
+						<xsl:otherwise>
+							<式样:文字表式样集_9917>
+								<xsl:call-template name="TextTableStyles"/>
+							</式样:文字表式样集_9917>
+						</xsl:otherwise>
+					</xsl:choose>
+				</式样:式样集_990B>
+			</pzip:target>
+			<pzip:target pzip:path="rules.xml">
+				<规则:公用处理规则_B665>
+					<规则:长度单位_B666>
+						<xsl:choose>
+							<xsl:when test="contains($uofUnit,'in')">
+								<xsl:value-of select="'inch'"/>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:value-of select="$uofUnit"/>
+							</xsl:otherwise>
+						</xsl:choose>
+					</规则:长度单位_B666>
+					<xsl:call-template name="GetUsers"/>
+					<xsl:call-template name="GetAnnotations"/>
+					<xsl:choose>
+						<xsl:when test="$documentType='text'">
+							<规则:文字处理_B66B>
+								<xsl:apply-templates select="office:settings"/>
+								<xsl:call-template name="GetTrackChanges"/>
+							</规则:文字处理_B66B>
+						</xsl:when>
+						<xsl:when test="$documentType='spreadsheet'">
+							<规则:电子表格_B66C>
+								<xsl:apply-templates select="table:tracked-changes"/>
+								<xsl:call-template name="SpreadsheetCommonRule"/>
+								<xsl:apply-templates select="table:data-pilot-tables"/>
+								<xsl:apply-templates select="table:consolidation"/>
+								<xsl:apply-templates select="table:dde-links"/>
+							</规则:电子表格_B66C>
+						</xsl:when>
+						<xsl:when test="$documentType='presentation'">
+							<规则:演示文稿_B66D>
+								<xsl:call-template name="PresentationCommonRule"/>
+							</规则:演示文稿_B66D>
+						</xsl:when>
+					</xsl:choose>
+				</规则:公用处理规则_B665>
+			</pzip:target>
+			<pzip:target pzip:path="content.xml">
+				<xsl:choose>
+					<xsl:when test="$documentType='text'">
+						<字:文字处理文档_4225>
+							<xsl:call-template name="TextBody"/>
+						</字:文字处理文档_4225>
+					</xsl:when>
+					<xsl:when test="$documentType='spreadsheet'">
+						<表:电子表格文档_E826>
+							<xsl:call-template name="SpreadsheetBody"/>
+						</表:电子表格文档_E826>
+					</xsl:when>
+					<xsl:otherwise>
+						<演:演示文稿文档_6C10>
+							<xsl:call-template name="PresentationBody"/>
+						</演:演示文稿文档_6C10>
+					</xsl:otherwise>
+				</xsl:choose>
+			</pzip:target>
+			<!--chart-->
+			<xsl:if test="/office:document/office:body//draw:object/office:document[@office:mimetype = 'application/vnd.oasis.opendocument.chart']">
+				<pzip:target pzip:path="chart.xml">
+				<图表:图表集_E836>
+					<xsl:call-template name="DrawFrameChart"/>
+				</图表:图表集_E836>
+				</pzip:target>
+			</xsl:if>
+			<xsl:if test="$documentType='presentation' and /office:document/office:settings/config:config-item-set/config:config-item-map-indexed/config:config-item-map-entry/config:config-item[@config:name = 'ColorScheme']">
+				<pzip:target pzip:path="colorschemes.xml">
+					<规则:配色方案集_6C11>
+						<xsl:call-template name="ColorschemesRO"/>
+					</规则:配色方案集_6C11>
+				</pzip:target>
+			</xsl:if>
+			<pzip:target pzip:path="extend.xml">
+				<扩展:扩展区_B200>
+					<xsl:call-template name="ExpandText"/>
+				</扩展:扩展区_B200>
+			</pzip:target>
+		</pzip:entry>
+	</xsl:template>
+<xsl:template match="office:meta">
+		<xsl:if test="dc:title">
+			<元:标题_5201>
+				<xsl:value-of select="dc:title"/>
+			</元:标题_5201>
+		</xsl:if>
+		<xsl:if test="dc:subject">
+			<元:主题_5202>
+				<xsl:value-of select="dc:subject"/>
+			</元:主题_5202>
+		</xsl:if>
+		<xsl:if test="meta:initial-creator">
+			<元:创建者_5203>
+				<xsl:value-of select="meta:initial-creator"/>
+			</元:创建者_5203>
+		</xsl:if>
+		<xsl:if test="dc:creator">
+			<元:最后作者_5205>
+				<xsl:value-of select="dc:creator"/>
+			</元:最后作者_5205>
+		</xsl:if>
+		<xsl:if test="dc:description">
+			<元:摘要_5206>
+				<xsl:value-of select="dc:description"/>
+			</元:摘要_5206>
+		</xsl:if>
+		<xsl:if test="meta:creation-date">
+			<元:创建日期_5207>
+				<xsl:value-of select="meta:creation-date"/>
+			</元:创建日期_5207>
+		</xsl:if>
+		<xsl:if test="meta:editing-cycles">
+			<元:编辑次数_5208>
+				<xsl:value-of select="meta:editing-cycles"/>
+			</元:编辑次数_5208>
+		</xsl:if>
+		<xsl:if test="meta:editing-duration">
+			<元:编辑时间_5209>
+				<xsl:value-of select="meta:editing-duration"/>
+			</元:编辑时间_5209>
+		</xsl:if>
+		<xsl:if test="meta:generator">
+			<元:创建应用程序_520A>
+				<xsl:value-of select="meta:generator"/>
+			</元:创建应用程序_520A>
+		</xsl:if>
+		<xsl:if test="meta:template/@xlink:title">
+			<元:文档模板_520C>
+				<xsl:value-of select="meta:template/@xlink:title"/>
+			</元:文档模板_520C>
+		</xsl:if>
+		<xsl:if test="meta:keyword">
+			<元:关键字集_520D>
+				<xsl:for-each select="meta:keyword">
+					<元:关键字_520E>
+						<xsl:value-of select="."/>
+					</元:关键字_520E>
+				</xsl:for-each>
+			</元:关键字集_520D>
+		</xsl:if>
+		<xsl:if test="dc:category">
+			<元:分类_520B>
+				<xsl:value-of select="dc:category"/>
+			</元:分类_520B>
+		</xsl:if>
+		<xsl:if test="dc:company">
+			<元:公司名称_5213>
+				<xsl:value-of select="dc:company"/>
+			</元:公司名称_5213>
+		</xsl:if>
+		<xsl:if test="dc:manager">
+			<元:经理名称_5214>
+				<xsl:value-of select="dc:manager"/>
+			</元:经理名称_5214>
+		</xsl:if>
+		<xsl:if test="meta:document-statistic/@meta:page-count">
+			<元:页数_5215>
+				<xsl:value-of select="meta:document-statistic/@meta:page-count"/>
+			</元:页数_5215>
+		</xsl:if>
+		<xsl:if test="meta:document-statistic/@meta:word-count">
+			<元:字数_5216>
+				<xsl:value-of select="meta:document-statistic/@meta:word-count"/>
+			</元:字数_5216>
+		</xsl:if>
+		<xsl:if test="meta:document-statistic/@meta:row-count">
+			<元:行数_5219>
+				<xsl:value-of select="meta:document-statistic/@meta:row-count"/>
+			</元:行数_5219>
+		</xsl:if>
+		<xsl:if test="meta:document-statistic/@meta:paragraph-count">
+			<元:段落数_521A>
+				<xsl:value-of select="meta:document-statistic/@meta:paragraph-count"/>
+			</元:段落数_521A>
+		</xsl:if>
+		<xsl:if test="meta:document-statistic/@meta:object-count">
+			<元:对象数_521B>
+				<xsl:value-of select="meta:document-statistic/@meta:object-count"/>
+			</元:对象数_521B>
+		</xsl:if>
+		<xsl:if test="meta:user-defined!=''">
+			<xsl:for-each select="meta:user-defined">
+				<xsl:choose>
+					<xsl:when test="@meta:name = '作者'">
+						<元:作者_5204>
+							<xsl:value-of select="."/>
+						</元:作者_5204>
+					</xsl:when>
+					<xsl:when test=".!=''">
+						<元:用户自定义元数据集_520F>
+							<元:用户自定义元数据_5210>
+								<xsl:attribute name="名称_5211"><xsl:value-of select="@meta:name"/></xsl:attribute>
+								<xsl:if test="@meta:type">
+									<xsl:attribute name="类型_5212"><xsl:value-of select="@meta:type"/></xsl:attribute>
+								</xsl:if>
+								<xsl:value-of select="."/>
+							</元:用户自定义元数据_5210>
+						</元:用户自定义元数据集_520F>
+					</xsl:when>
+				</xsl:choose>
+			</xsl:for-each>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="Hyperlinks">
+		<xsl:if test="//text:a |  //draw:a">
+			<xsl:for-each select="//text:a |  //draw:a">
+				<xsl:variable name="hyperStr" select="@xlink:href"/>
+				<超链:超级链接_AA0C>
+					<xsl:attribute name="标识符_AA0A"><xsl:value-of select="generate-id(.)"/></xsl:attribute>
+					<xsl:variable name="ID" select="generate-id(.)"/>
+					<xsl:element name="超链:链源_AA00">
+						<xsl:value-of select="concat('hlnk', $ID)"/>
+					</xsl:element>
+					<!--xsl:attribute name="超链:标识符"><xsl:value-of select="generate-id(.)"/></xsl:attribute-->
+					<xsl:if test="not(contains($hyperStr,'#'))">
+						<xsl:element name="超链:目标_AA01">
+							<xsl:value-of select="$hyperStr"/>
+						</xsl:element>
+					</xsl:if>
+					<xsl:if test="./@text:style-name or ./@text:visited-style-name">
+						<xsl:element name="超链:式样_AA02">
+							<xsl:if test="./@text:style-name">
+								<xsl:attribute name="未访问式样引用_AA03"><xsl:value-of select="@text:style-name"/></xsl:attribute>
+							</xsl:if>
+							<xsl:if test="./@text:visited-style-name">
+								<xsl:attribute name="已访问式样引用_AA04"><xsl:value-of select="@text:visited-style-name"/></xsl:attribute>
+							</xsl:if>
+						</xsl:element>
+					</xsl:if>
+					<xsl:if test="not(contains($hyperStr,'#'))">
+						<xsl:choose>
+							<xsl:when test="contains($hyperStr,'@')">
+								<xsl:element name="超链:提示_AA05">链接到邮件地址</xsl:element>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:element name="超链:提示_AA05">
+									<xsl:value-of select="$hyperStr"/>
+								</xsl:element>
+							</xsl:otherwise>
+						</xsl:choose>
+					</xsl:if>
+					<xsl:if test="contains($hyperStr,'#')">
+						<xsl:choose>
+							<xsl:when test="$documentType='spreadsheet' and /office:document/office:body/office:spreadsheet/table:named-expressions/table:named-range">
+								<xsl:for-each select="/office:document/office:body/office:spreadsheet/table:named-expressions/table:named-range">
+									<xsl:variable name="determineCell">
+										<xsl:value-of select="substring-after($hyperStr,'#')"/>
+									</xsl:variable>
+									<xsl:choose>
+										<xsl:when test="contains(@table:base-cell-address,$determineCell)">
+											<xsl:variable name="bookmarkForCell" select="@table:name"/>
+											<xsl:element name="超链:目标_AA01">
+												<xsl:value-of select="$bookmarkForCell"/>
+											</xsl:element>
+											<xsl:element name="超链:书签_AA0D">
+												<xsl:value-of select="$bookmarkForCell"/>
+											</xsl:element>
+										</xsl:when>
+										<xsl:otherwise>
+											<xsl:element name="超链:目标_AA01">
+												<xsl:value-of select="$determineCell"/>
+											</xsl:element>
+											<xsl:element name="超链:书签_AA0D">
+												<xsl:value-of select="$determineCell"/>
+											</xsl:element>
+										</xsl:otherwise>
+									</xsl:choose>
+								</xsl:for-each>
+							</xsl:when>
+							<xsl:when test="$documentType='spreadsheet'">
+								<xsl:element name="超链:目标_AA01">
+									<xsl:value-of select="$hyperStr"/>
+								</xsl:element>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:element name="超链:目标_AA01">
+									<xsl:choose>
+										<xsl:when test="substring-before($hyperStr,'#') != ''">
+											<xsl:value-of select="substring-before($hyperStr,'#')"/>
+										</xsl:when>
+										<xsl:otherwise>
+											<xsl:value-of select="substring-after($hyperStr,'#')"/>
+										</xsl:otherwise>
+									</xsl:choose>
+								</xsl:element>
+								<xsl:element name="超链:书签_AA0D">
+									<xsl:value-of select="substring-after($hyperStr,'#')"/>
+								</xsl:element>
+							</xsl:otherwise>
+						</xsl:choose>
+						<xsl:element name="超链:提示_AA05">
+							<xsl:value-of select="."/>
+						</xsl:element>
+					</xsl:if>
+					<xsl:if test="0">
+						<xsl:element name="超链:声音_AA06">
+							<xsl:attribute name="预定义声音_C631"/>
+							<xsl:attribute name="自定义声音_C632"/>
+							<xsl:attribute name="是否循环播放_C633"/>
+						</xsl:element>
+					</xsl:if>
+					<xsl:if test="0">
+						<xsl:element name="超链:触发方式_AA07">
+							<xsl:attribute name="是否高亮显示_AA08"/>
+							<xsl:attribute name="是否单击触发_AA09"/>
+						</xsl:element>
+					</xsl:if>
+				</超链:超级链接_AA0C>
+			</xsl:for-each>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="Fonts">
+		<式样:字体集_990C>
+			<式样:字体声明_990D 名称_9903="Wingdings" 标识符_9902="Wingdings"/>
+			<式样:字体声明_990D 名称_9903="Vrinda" 标识符_9902="Vrinda"/>
+			<式样:字体声明_990D 名称_9903="Webdings" 标识符_9902="Webdings"/>
+			<xsl:for-each select="office:font-face-decls/style:font-face">
+				<xsl:if test="not(@style:name = 'Wingdings') and not(@style:name = 'Vrinda') and not(@style:name = 'Webdings')">
+					<xsl:element name="式样:字体声明_990D">
+						<xsl:attribute name="标识符_9902"><xsl:value-of select="translate(@style:name,' ','_')"/></xsl:attribute>
+						<xsl:attribute name="名称_9903"><xsl:variable name="ss">'</xsl:variable><xsl:choose><xsl:when test="contains(@svg:font-family,' ')"><xsl:value-of select="translate(@svg:font-family,$ss,'')"/></xsl:when><xsl:otherwise><xsl:value-of select="@svg:font-family"/></xsl:otherwise></xsl:choose></xsl:attribute>
+						<!--暂无对应
+						<xsl:if test="1">
+							<xsl:attribute name="替换字体_9904"/>
+						</xsl:if-->
+						<xsl:if test="@style:font-family-generic">
+							<xsl:choose>
+								<xsl:when test="@style:font-family-generic = 'swiss'">
+									<xsl:element name="式样:字体族_9900">swiss</xsl:element>
+								</xsl:when>
+								<xsl:when test="@style:font-family-generic ='modern'">
+									<xsl:element name="式样:字体族_9900">modern</xsl:element>
+								</xsl:when>
+								<xsl:when test="@style:font-family-generic='roman'">
+									<xsl:element name="式样:字体族_9900">roman</xsl:element>
+								</xsl:when>
+								<xsl:when test="@style:font-family-generic ='script'">
+									<xsl:element name="式样:字体族_9900">script</xsl:element>
+								</xsl:when>
+								<xsl:when test="@style:font-family-generic ='decorative'">
+									<xsl:element name="式样:字体族_9900">decorative</xsl:element>
+								</xsl:when>
+								<xsl:when test="@style:font-family-generic ='system'">
+									<xsl:element name="式样:字体族_9900">auto</xsl:element>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:element name="式样:字体族_9900">auto</xsl:element>
+								</xsl:otherwise>
+							</xsl:choose>
+						</xsl:if>
+						<xsl:if test="0">
+							<xsl:element name="式样:替换字体族_9901"/>
+						</xsl:if>
+					</xsl:element>
+				</xsl:if>
+			</xsl:for-each>
+		</式样:字体集_990C>
+	</xsl:template>
+	<xsl:template name="convert2cm">
+		<xsl:param name="value"/>
+		<xsl:param name="rounding-factor" select="10000"/>
+		<xsl:param name="dpi" select="111"/>
+		<xsl:param name="centimeter-in-mm" select="10"/>
+		<xsl:param name="inch-in-mm" select="25.4"/>
+		<xsl:param name="didot-point-in-mm" select="0.376065"/>
+		<xsl:param name="pica-in-mm" select="4.2333333"/>
+		<xsl:param name="point-in-mm" select="0.3527778"/>
+		<xsl:param name="twip-in-mm" select="0.017636684"/>
+		<xsl:param name="pixel-in-mm" select="$inch-in-mm div $dpi"/>
+		<xsl:choose>
+			<xsl:when test="contains($value, 'mm')">
+				<xsl:value-of select="round($rounding-factor * number(number(substring-before($value, 'mm')) div $centimeter-in-mm)) div $rounding-factor"/>
+			</xsl:when>
+			<xsl:when test="contains($value, 'in')">
+				<xsl:value-of select="round($rounding-factor * number(number(substring-before($value, 'in')) div $centimeter-in-mm * $inch-in-mm)) div $rounding-factor"/>
+			</xsl:when>
+			<xsl:when test="contains($value, 'pt')">
+				<xsl:value-of select="round($rounding-factor * number(number(substring-before($value, 'pt')) div $centimeter-in-mm * $point-in-mm)) div $rounding-factor"/>
+			</xsl:when>
+			<xsl:when test="contains($value, 'dpt')">
+				<xsl:value-of select="round($rounding-factor * number(number(substring-before($value, 'dpt')) div $centimeter-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
+			</xsl:when>
+			<xsl:when test="contains($value, 'pica')">
+				<xsl:value-of select="round($rounding-factor * number(number(substring-before($value, 'pica')) div $centimeter-in-mm * $pica-in-mm)) div $rounding-factor"/>
+			</xsl:when>
+			<xsl:when test="contains($value, 'twip')">
+				<xsl:value-of select="round($rounding-factor * number(number(substring-before($value, 'twip')) div $centimeter-in-mm * $twip-in-mm)) div $rounding-factor"/>
+			</xsl:when>
+			<xsl:when test="contains($value, 'px')">
+				<xsl:value-of select="round($rounding-factor * number(number(substring-before($value, 'px')) div $centimeter-in-mm * $pixel-in-mm)) div $rounding-factor"/>
+			</xsl:when>
+			<xsl:when test="contains($value, 'cm')">
+				<xsl:value-of select="substring-before($value,'cm')"/>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'cm'!</xsl:message>
+				<xsl:value-of select="$value"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+	<xsl:function name="fun:Convert2uofUnit">
+		<xsl:param name="value"/>
+		<xsl:variable name="CurrentUnit">
+			<xsl:choose>
+				<xsl:when test="contains($value, 'cm')">cm</xsl:when>
+				<xsl:when test="contains($value, 'mm')">mm</xsl:when>
+				<xsl:when test="contains($value, 'in')">in</xsl:when>
+				<xsl:when test="contains($value, 'dpt')">dpt</xsl:when>
+				<xsl:when test="contains($value, 'pt')">pt</xsl:when>
+				<xsl:when test="contains($value, 'pica')">pica</xsl:when>
+				<xsl:when test="contains($value, 'twip')">twip</xsl:when>
+				<xsl:when test="contains($value, 'px')">px</xsl:when>
+				<xsl:otherwise>cm</xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+		<xsl:choose>
+			<xsl:when test="$CurrentUnit = $uofUnit">
+				<xsl:value-of select="number(substring-before($value, $CurrentUnit))"/>
+			</xsl:when>
+			<xsl:when test="string($value) = '' or $value ='NAN'">
+				<xsl:value-of select="0"/>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:variable name="valuecm">
+					<xsl:call-template name="convert2cm">
+						<xsl:with-param name="value" select="$value"/>
+					</xsl:call-template>
+				</xsl:variable>
+				<xsl:value-of select="number($valuecm) div number($other-to-cm-conversion-factor)"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:function>
+	<xsl:template name="OneBorderAttrLst">
+		<xsl:param name="border"/>
+		<xsl:param name="border-width"/>
+		<xsl:param name="padding"/>
+		<xsl:param name="shadow"/>
+		<xsl:if test="$border != ''">
+			<xsl:variable name="linetype">
+				<xsl:choose>
+					<xsl:when test="substring-before(substring-after($border,' '),' ')='solid'">single</xsl:when>
+					<xsl:when test="substring-before(substring-after($border,' '),' ')='double'">
+						<xsl:variable name="first" select="fun:Convert2uofUnit(substring-before($border-width,' '))"/>
+						<xsl:variable name="last" select="fun:Convert2uofUnit(substring-after(substring-after($border-width,' '),' '))"/>
+						<xsl:choose>
+							<xsl:when test="$first &lt; $last">thin-thick</xsl:when>
+							<xsl:when test="$first &gt; $last">thick-thin</xsl:when>
+							<xsl:otherwise>double</xsl:otherwise>
+						</xsl:choose>
+					</xsl:when>
+					<xsl:otherwise>none</xsl:otherwise>
+				</xsl:choose>
+			</xsl:variable>
+			<xsl:attribute name="线型_C60D"><xsl:value-of select="$linetype"/></xsl:attribute>
+			<xsl:if test="$border != 'none'">
+				<xsl:variable name="linewidth" select="fun:Convert2uofUnit(substring-before($border,' '))"/>
+				<xsl:attribute name="宽度_C60F"><xsl:value-of select="$linewidth"/></xsl:attribute>
+				<xsl:attribute name="颜色_C611"><xsl:value-of select="substring-after(substring-after($border,' '),' ')"/></xsl:attribute>
+			</xsl:if>
+		</xsl:if>
+		<xsl:if test="$padding != ''">
+			<xsl:variable name="uof_padding" select="fun:Convert2uofUnit($padding)"/>
+			<xsl:attribute name="边距_C610"><xsl:value-of select="$uof_padding"/></xsl:attribute>
+		</xsl:if>
+		<!--xsl:if test="$shadow = 'true'">
+			<xsl:attribute name="是否加阴影_C612">true</xsl:attribute>
+		</xsl:if-->
+	</xsl:template>
+	<xsl:template name="LeftBorder">
+		<xsl:variable name="border">
+			<xsl:choose>
+				<xsl:when test="@fo:border-left != ''">
+					<xsl:value-of select="@fo:border-left"/>
+				</xsl:when>
+				<xsl:when test="@fo:border != ''">
+					<xsl:value-of select="@fo:border"/>
+				</xsl:when>
+			</xsl:choose>
+		</xsl:variable>
+		<!--<xsl:if test="$border != '' and $border != 'none'">-->
+		<!--存在边框类型为none时,但是仍然设置边距的情况-->
+		<xsl:if test="$border != ''">
+			<xsl:element name="uof:å·¦_C613">
+				<xsl:variable name="border-width">
+					<xsl:choose>
+						<xsl:when test="@style:border-line-width-left != ''">
+							<xsl:value-of select="@style:border-line-width-left"/>
+						</xsl:when>
+						<xsl:when test="@style:border-line-width != ''">
+							<xsl:value-of select="@style:border-line-width"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<xsl:variable name="padding">
+					<xsl:choose>
+						<xsl:when test="@fo:padding-left != ''">
+							<xsl:value-of select="@fo:padding-left"/>
+						</xsl:when>
+						<xsl:when test="@fo:padding != ''">
+							<xsl:value-of select="@fo:padding"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<!--xsl:variable name="shadow">
+					<xsl:if test="@style:shadow">
+						<xsl:variable name="shadowhori" select="fun:Convert2uofUnit(substring-before(substring-after(@style:shadow,' '),' '))"/>
+						<xsl:choose>
+							<xsl:when test="$shadowhori &lt; 0">
+								<xsl:value-of select="'true'"/>
+							</xsl:when>
+							<xsl:otherwise>false</xsl:otherwise>
+						</xsl:choose>
+					</xsl:if>
+				</xsl:variable-->
+				<xsl:call-template name="OneBorderAttrLst">
+					<xsl:with-param name="border" select="$border"/>
+					<xsl:with-param name="border-width" select="$border-width"/>
+					<xsl:with-param name="padding" select="$padding"/>
+					<!--xsl:with-param name="shadow" select="$shadow"/-->
+				</xsl:call-template>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="TopBorder">
+		<xsl:variable name="border">
+			<xsl:choose>
+				<xsl:when test="@fo:border-top != ''">
+					<xsl:value-of select="@fo:border-top"/>
+				</xsl:when>
+				<xsl:when test="@fo:border != ''">
+					<xsl:value-of select="@fo:border"/>
+				</xsl:when>
+			</xsl:choose>
+		</xsl:variable>
+		<!--<xsl:if test="$border != '' and $border != 'none'">-->
+		<!--存在边框类型为none时,但是仍然设置边距的情况-->
+		<xsl:if test="$border != ''">
+			<xsl:element name="uof:上_C614">
+				<xsl:variable name="border-width">
+					<xsl:choose>
+						<xsl:when test="@style:border-line-width-top != ''">
+							<xsl:value-of select="@style:border-line-width-top"/>
+						</xsl:when>
+						<xsl:when test="@style:border-line-width != ''">
+							<xsl:value-of select="@style:border-line-width"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<xsl:variable name="padding">
+					<xsl:choose>
+						<xsl:when test="@fo:padding-top != ''">
+							<xsl:value-of select="@fo:padding-top"/>
+						</xsl:when>
+						<xsl:when test="@fo:padding != ''">
+							<xsl:value-of select="@fo:padding"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<!--xsl:variable name="shadow">
+					<xsl:if test="@style:shadow">
+						<xsl:variable name="shadowvert" select="fun:Convert2uofUnit(substring-after(substring-after(@style:shadow,' '),' '))"/>
+						<xsl:choose>
+							<xsl:when test="$shadowvert &lt; 0">
+								<xsl:value-of select="'true'"/>
+							</xsl:when>
+							<xsl:otherwise>false</xsl:otherwise>
+						</xsl:choose>
+					</xsl:if>
+				</xsl:variable-->
+				<xsl:call-template name="OneBorderAttrLst">
+					<xsl:with-param name="border" select="$border"/>
+					<xsl:with-param name="border-width" select="$border-width"/>
+					<xsl:with-param name="padding" select="$padding"/>
+					<!--xsl:with-param name="shadow" select="$shadow"/-->
+				</xsl:call-template>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="RightBorder">
+		<xsl:variable name="border">
+			<xsl:choose>
+				<xsl:when test="@fo:border-right != ''">
+					<xsl:value-of select="@fo:border-right"/>
+				</xsl:when>
+				<xsl:when test="@fo:border != ''">
+					<xsl:value-of select="@fo:border"/>
+				</xsl:when>
+			</xsl:choose>
+		</xsl:variable>
+		<!--<xsl:if test="$border != '' and $border != 'none'">-->
+		<!--存在边框类型为none时,但是仍然设置边距的情况-->
+		<xsl:if test="$border != ''">
+			<xsl:element name="uof:右_C615">
+				<xsl:variable name="border-width">
+					<xsl:choose>
+						<xsl:when test="@style:border-line-width-right != ''">
+							<xsl:value-of select="@style:border-line-width-right"/>
+						</xsl:when>
+						<xsl:when test="@style:border-line-width != ''">
+							<xsl:value-of select="@style:border-line-width"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<xsl:variable name="padding">
+					<xsl:choose>
+						<xsl:when test="@fo:padding-right != ''">
+							<xsl:value-of select="@fo:padding-right"/>
+						</xsl:when>
+						<xsl:when test="@fo:padding != ''">
+							<xsl:value-of select="@fo:padding"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<!--xsl:variable name="shadow">
+					<xsl:if test="@style:shadow">
+						<xsl:variable name="shadowhori" select="fun:Convert2uofUnit(substring-before(substring-after(@style:shadow,' '),' '))"/>
+						<xsl:choose>
+							<xsl:when test="$shadowhori &gt; 0">
+								<xsl:value-of select="'true'"/>
+							</xsl:when>
+							<xsl:otherwise>false</xsl:otherwise>
+						</xsl:choose>
+					</xsl:if>
+				</xsl:variable-->
+				<xsl:call-template name="OneBorderAttrLst">
+					<xsl:with-param name="border" select="$border"/>
+					<xsl:with-param name="border-width" select="$border-width"/>
+					<xsl:with-param name="padding" select="$padding"/>
+					<!--xsl:with-param name="shadow" select="$shadow"/-->
+				</xsl:call-template>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="BottomBorder">
+		<xsl:variable name="border">
+			<xsl:choose>
+				<xsl:when test="@fo:border-bottom != ''">
+					<xsl:value-of select="@fo:border-bottom"/>
+				</xsl:when>
+				<xsl:when test="@fo:border != ''">
+					<xsl:value-of select="@fo:border"/>
+				</xsl:when>
+			</xsl:choose>
+		</xsl:variable>
+		<!--<xsl:if test="$border != '' and $border != 'none'">-->
+		<!--存在边框类型为none时,但是仍然设置边距的情况-->
+		<xsl:if test="$border != ''">
+			<xsl:element name="uof:下_C616">
+				<xsl:variable name="border-width">
+					<xsl:choose>
+						<xsl:when test="@style:border-line-width-bottom != ''">
+							<xsl:value-of select="@style:border-line-width-bottom"/>
+						</xsl:when>
+						<xsl:when test="@style:border-line-width != ''">
+							<xsl:value-of select="@style:border-line-width"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<xsl:variable name="padding">
+					<xsl:choose>
+						<xsl:when test="@fo:padding-bottom != ''">
+							<xsl:value-of select="@fo:padding-bottom"/>
+						</xsl:when>
+						<xsl:when test="@fo:padding != ''">
+							<xsl:value-of select="@fo:padding"/>
+						</xsl:when>
+					</xsl:choose>
+				</xsl:variable>
+				<!--xsl:variable name="shadow">
+					<xsl:if test="@style:shadow">
+						<xsl:variable name="shadowvert" select="fun:Convert2uofUnit(substring-after(substring-after(@style:shadow,' '),' '))"/>
+						<xsl:choose>
+							<xsl:when test="$shadowvert &gt; 0">
+								<xsl:value-of select="'true'"/>
+							</xsl:when>
+							<xsl:otherwise>false</xsl:otherwise>
+						</xsl:choose>
+					</xsl:if>
+				</xsl:variable-->
+				<xsl:call-template name="OneBorderAttrLst">
+					<xsl:with-param name="border" select="$border"/>
+					<xsl:with-param name="border-width" select="$border-width"/>
+					<xsl:with-param name="padding" select="$padding"/>
+					<!--xsl:with-param name="shadow" select="$shadow"/-->
+				</xsl:call-template>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="UOFDiagonal1">
+		<xsl:variable name="border">
+			<xsl:value-of select="@style:diagonal-tl-br"/>
+		</xsl:variable>
+		<!--<xsl:if test="$border != '' and $border != 'none'">-->
+		<!--存在边框类型为none时,但是仍然设置边距的情况-->
+		<xsl:if test="$border != ''">
+			<xsl:element name="uof:对角线1_C617">
+				<xsl:variable name="border-width">
+					<xsl:value-of select="@style:diagonal-tl-br-width"/>
+				</xsl:variable>
+				<xsl:call-template name="OneBorderAttrLst">
+					<xsl:with-param name="border" select="$border"/>
+					<xsl:with-param name="border-width" select="$border-width"/>
+				</xsl:call-template>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="UOFDiagonal2">
+		<xsl:variable name="border">
+			<xsl:value-of select="@style:diagonal-bl-tr"/>
+		</xsl:variable>
+		<!--<xsl:if test="$border != '' and $border != 'none'">-->
+		<!--存在边框类型为none时,但是仍然设置边距的情况-->
+		<xsl:if test="$border != ''">
+			<xsl:element name="uof:对角线2_C618">
+				<xsl:variable name="border-width">
+					<xsl:value-of select="@style:diagonal-bl-tr-width"/>
+				</xsl:variable>
+				<xsl:call-template name="OneBorderAttrLst">
+					<xsl:with-param name="border" select="$border"/>
+					<xsl:with-param name="border-width" select="$border-width"/>
+				</xsl:call-template>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="Border">
+		<xsl:call-template name="LeftBorder"/>
+		<xsl:call-template name="TopBorder"/>
+		<xsl:call-template name="RightBorder"/>
+		<xsl:call-template name="BottomBorder"/>
+		<xsl:call-template name="UOFDiagonal1"/>
+		<xsl:call-template name="UOFDiagonal2"/>
+	</xsl:template>
+	<xsl:template name="UOFFill">
+		<xsl:choose>
+			<xsl:when test="style:background-image/office:binary-data or style:background-image/@xlink:href">
+				<图:图片_8005>
+					<xsl:attribute name="位置_8006"><xsl:choose><xsl:when test="style:background-image/@style:repeat = 'stretch'">stretch</xsl:when><xsl:when test="style:background-image/@style:repeat = 'no-repeat' and contains(style:background-image/@style:position,'center')">center</xsl:when><xsl:otherwise>tile</xsl:otherwise></xsl:choose></xsl:attribute>
+					<xsl:attribute name="图形引用_8007"><xsl:value-of select="generate-id(style:background-image)"/></xsl:attribute>
+					<!--xsl:attribute name="图形引用_8007"><xsl:choose><xsl:when test="style:background-image/@xlink:href"><xsl:value-of select="translate(style:background-image/@xlink:href,'Pictures','data')"/></xsl:when><xsl:otherwise><xsl:value-of select="generate-id(style:background-image)"/></xsl:otherwise></xsl:choose></xsl:attribute-->
+					<xsl:attribute name="类型_8008"><xsl:choose><xsl:when test="ends-with(style:background-image/@xlink:href,'png')">png</xsl:when><xsl:when test="ends-with(style:background-image/@xlink:href,'bmp')">bmp</xsl:when><xsl:when test="ends-with(style:background-image/@xlink:href,'ras')">ras</xsl:when><xsl:when test="ends-with(style:background-image/@xlink:href,'gif')">gif</xsl:when><xsl:otherwise>jpg</xsl:otherwise></xsl:choose></xsl:attribute>
+					<xsl:attribute name="名称_8009">background-image</xsl:attribute>
+				</图:图片_8005>
+			</xsl:when>
+			<xsl:when test="@fo:background-color">
+				<图:颜色_8004>
+					<xsl:choose>
+						<xsl:when test="@fo:background-color='transparent' or @fo:background-color='transprent'">auto</xsl:when>
+						<xsl:otherwise>
+							<xsl:value-of select="@fo:background-color"/>
+						</xsl:otherwise>
+					</xsl:choose>
+				</图:颜色_8004>
+			</xsl:when>
+			<xsl:when test="style:table-cell-properties/@fo:background-color">
+				<图:颜色_8004>
+					<xsl:choose>
+						<xsl:when test="style:table-cell-properties/@fo:background-color='transparent' or style:table-cell-properties/@fo:background-color='transprent'">auto</xsl:when>
+						<xsl:otherwise>
+							<xsl:value-of select="style:table-cell-properties/@fo:background-color"/>
+						</xsl:otherwise>
+					</xsl:choose>
+				</图:颜色_8004>
+			</xsl:when>
+			<xsl:otherwise>
+				<图:颜色_8004>auto</图:颜色_8004>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+	<xsl:template name="InMasterPage">
+		<xsl:choose>
+			<xsl:when test="$documentType = 'presentation'">
+				<xsl:for-each select="..">
+					<xsl:choose>
+						<xsl:when test="name(.) = 'office:master-styles'">
+							<xsl:value-of select="'true'"/>
+						</xsl:when>
+						<xsl:when test="name(.) = 'draw:page'">
+							<xsl:value-of select="'false'"/>
+						</xsl:when>
+						<xsl:when test="name(.) = 'office:document'">
+							<xsl:value-of select="'false'"/>
+						</xsl:when>
+						<xsl:otherwise>
+							<xsl:call-template name="InMasterPage"/>
+						</xsl:otherwise>
+					</xsl:choose>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:value-of select="'false'"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+	<xsl:template name="character-to-number">
+		<xsl:param name="character"/>
+		<xsl:choose>
+			<xsl:when test="$character = 'A'">1</xsl:when>
+			<xsl:when test="$character = 'B'">2</xsl:when>
+			<xsl:when test="$character = 'C'">3</xsl:when>
+			<xsl:when test="$character = 'D'">4</xsl:when>
+			<xsl:when test="$character = 'E'">5</xsl:when>
+			<xsl:when test="$character = 'F'">6</xsl:when>
+			<xsl:when test="$character = 'G'">7</xsl:when>
+			<xsl:when test="$character = 'H'">8</xsl:when>
+			<xsl:when test="$character = 'I'">9</xsl:when>
+			<xsl:when test="$character = 'J'">10</xsl:when>
+			<xsl:when test="$character = 'K'">11</xsl:when>
+			<xsl:when test="$character = 'L'">12</xsl:when>
+			<xsl:when test="$character = 'M'">13</xsl:when>
+			<xsl:when test="$character = 'N'">14</xsl:when>
+			<xsl:when test="$character = 'O'">15</xsl:when>
+			<xsl:when test="$character = 'P'">16</xsl:when>
+			<xsl:when test="$character = 'Q'">17</xsl:when>
+			<xsl:when test="$character = 'R'">18</xsl:when>
+			<xsl:when test="$character = 'S'">19</xsl:when>
+			<xsl:when test="$character = 'T'">20</xsl:when>
+			<xsl:when test="$character = 'U'">21</xsl:when>
+			<xsl:when test="$character = 'V'">22</xsl:when>
+			<xsl:when test="$character = 'W'">23</xsl:when>
+			<xsl:when test="$character = 'X'">24</xsl:when>
+			<xsl:when test="$character = 'Y'">25</xsl:when>
+			<xsl:when test="$character = 'Z'">26</xsl:when>
+			<xsl:otherwise/>
+		</xsl:choose>
+	</xsl:template>
+	<xsl:template name="calculate-square-numbers">
+		<xsl:param name="base"/>
+		<xsl:param name="exponent"/>
+		<xsl:param name="return" select="1"/>
+		<xsl:choose>
+			<xsl:when test="$exponent &gt; 1">
+				<xsl:call-template name="calculate-square-numbers">
+					<xsl:with-param name="base" select="$base"/>
+					<xsl:with-param name="exponent" select="$exponent - 1"/>
+					<xsl:with-param name="return" select="$return * $base"/>
+				</xsl:call-template>
+			</xsl:when>
+			<xsl:when test="$exponent = 1">
+				<xsl:value-of select="$return * $base"/>
+			</xsl:when>
+			<!-- if exponent is equal '0' -->
+			<xsl:otherwise>
+				<xsl:value-of select="1"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+	<xsl:template name="decimal-to-hex">
+		<xsl:param name="number"/>
+		<xsl:choose>
+			<xsl:when test="round($number)=0">0</xsl:when>
+			<xsl:when test="round($number)=1">1</xsl:when>
+			<xsl:when test="round($number)=2">2</xsl:when>
+			<xsl:when test="round($number)=3">3</xsl:when>
+			<xsl:when test="round($number)=4">4</xsl:when>
+			<xsl:when test="round($number)=5">5</xsl:when>
+			<xsl:when test="round($number)=6">6</xsl:when>
+			<xsl:when test="round($number)=7">7</xsl:when>
+			<xsl:when test="round($number)=8">8</xsl:when>
+			<xsl:when test="round($number)=9">9</xsl:when>
+			<xsl:when test="round($number)=10">a</xsl:when>
+			<xsl:when test="round($number)=11">b</xsl:when>
+			<xsl:when test="round($number)=12">c</xsl:when>
+			<xsl:when test="round($number)=13">d</xsl:when>
+			<xsl:when test="round($number)=14">e</xsl:when>
+			<xsl:when test="round($number)=15">f</xsl:when>
+		</xsl:choose>
+	</xsl:template>
+	<xsl:template name="ExpandText">
+		<xsl:for-each select="office:styles/draw:hatch">
+			<xsl:call-template name="OneTextStyle">
+				<xsl:with-param name="Type">
+					<xsl:value-of select="string('default')"/>
+				</xsl:with-param>
+			</xsl:call-template>
+		</xsl:for-each>
+		<xsl:variable name="customshapetype">fontwork-arch-up-curve fontwork-plain-text fontwork-wave fontwork-inflate fontwork-curve-up fontwork-slant-up fontwork-chevron-up fontwork-slant-up fontwork-triangle-down fontwork-curve-down fontwork-arch-down-pour fontwork-triangle-down fontwork-fade-down fontwork-triangle-up fontwork-fade-right fontwork-fade-down fontwork-fade-up fontwork-curve-up fontwork-stop fontwork-chevron-down fontwork-inflate fontwork-curve-down fontwork-arch-up-pour fontwork-arch-up-pour fontwork-plain-text fontwork-plain-text fontwork-plain-text fontwork-slant-up fontwork-wave fontwork-triangle-up fontwork-inflate round-callout fontwork-triangle-down fontwork-circle-pour mso-spt100 fontwork-fade-up-and-right fontwork-fade-up non-primitive block-arc frame col-60da8460 col-502ad400 flowchart-alternate-process rectangular-callout round-rectangular-callout round-callout cloud-callout line-callout-1 line-callout-2 line-callout-3</xsl:variable>
+		<扩展:扩展_B201>
+			<扩展:软件名称_B202>NSO</扩展:软件名称_B202>
+			<扩展:软件版本_B203>v4.5</扩展:软件版本_B203>
+		</扩展:扩展_B201>
+		<xsl:if test="/office:document/office:automatic-styles/style:style/style:graphic-properties/@draw:marker-end or /office:document/office:automatic-styles/style:style/style:graphic-properties/@draw:marker-start">
+			<xsl:for-each select="office:body//draw:*[@draw:style-name]">
+				<xsl:variable name="drawStyleName" select="@draw:style-name"/>
+				<xsl:if test="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties[@draw:marker-start] or /office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties[@draw:marker-end]">
+					<xsl:variable name="styleName" select="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties/@draw:marker-start"/>
+					<xsl:variable name="markerStart" select="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties/@draw:marker-start"/>
+					<xsl:variable name="markerEnd" select="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties/@draw:marker-end"/>
+					<扩展:扩展_B201>
+						<扩展:软件名称_B202>NSO</扩展:软件名称_B202>
+						<扩展:软件版本_B203>v4.5</扩展:软件版本_B203>
+						<扩展:扩展内容_B204>
+							<扩展:路径_B205>
+								<xsl:choose>
+									<xsl:when test="@draw:id">
+										<xsl:value-of select="@draw:id"/>
+									</xsl:when>
+									<xsl:otherwise>
+										<xsl:value-of select="generate-id(.)"/>
+									</xsl:otherwise>
+								</xsl:choose>
+							</扩展:路径_B205>
+							<扩展:内容_B206 名称="draw:marker">
+								<xsl:if test="$markerStart != ''">
+									<扩展:前端箭头>
+										<xsl:copy-of select="/office:document/office:styles/draw:marker[@draw:name = $markerStart]/@*"/>
+										<xsl:attribute name="draw:marker-start-width"><xsl:value-of select="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties[@draw:marker-start]/@draw:marker-start-width"/></xsl:attribute>
+									</扩展:前端箭头>
+								</xsl:if>
+								<xsl:if test="$markerEnd != ''">
+									<扩展:后端箭头>
+										<xsl:copy-of select="/office:document/office:styles/draw:marker[@draw:name = $markerEnd]/@*"/>
+										<xsl:attribute name="draw:marker-end-width"><xsl:value-of select="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties[@draw:marker-end]/@draw:marker-end-width"/></xsl:attribute>
+									</扩展:后端箭头>
+								</xsl:if>
+							</扩展:内容_B206>
+						</扩展:扩展内容_B204>
+					</扩展:扩展_B201>
+				</xsl:if>
+			</xsl:for-each>
+		</xsl:if>
+		<xsl:if test="office:styles/draw:hatch">
+			<扩展:扩展_B201>
+				<扩展:软件名称_B202>NSO</扩展:软件名称_B202>
+				<扩展:软件版本_B203>v4.5</扩展:软件版本_B203>
+				<扩展:扩展内容_B204>
+					<扩展:路径_B205>文字处理</扩展:路径_B205>
+					<扩展:内容_B206 名称="draw:hatch">
+						<xsl:for-each select="office:styles/draw:hatch">
+							<扩展:图案数据>
+								<xsl:attribute name="uof:name" select="@draw:name"/>
+								<xsl:attribute name="uof:display-name" select="@draw:display-name"/>
+								<xsl:attribute name="uof:style" select="@draw:style"/>
+								<xsl:attribute name="uof:color" select="@draw:color"/>
+								<xsl:attribute name="uof:distance" select="@draw:distance"/>
+								<xsl:attribute name="uof:rotation" select="@draw:rotation"/>
+							</扩展:图案数据>
+						</xsl:for-each>
+					</扩展:内容_B206>
+				</扩展:扩展内容_B204>
+			</扩展:扩展_B201>
+		</xsl:if>
+		<xsl:if test="office:automatic-styles/style:style/style:graphic-properties/@draw:stroke-dash">
+			<xsl:for-each select="office:body//draw:*[@draw:style-name]">
+				<xsl:variable name="drawStyleName" select="@draw:style-name"/>
+				<xsl:if test="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties[@draw:stroke-dash]">
+					<xsl:variable name="styleName" select="/office:document/office:automatic-styles/style:style[@style:name = $drawStyleName]/style:graphic-properties/@draw:stroke-dash"/>
+					<xsl:if test="/office:document/office:styles/draw:stroke-dash[@draw:name = $styleName]">
+						<扩展:扩展_B201>
+							<扩展:软件名称_B202>NSO</扩展:软件名称_B202>
+							<扩展:软件版本_B203>v4.5</扩展:软件版本_B203>
+							<扩展:扩展内容_B204>
+								<扩展:路径_B205>
+									<xsl:value-of select="generate-id(.)"/>
+								</扩展:路径_B205>
+								<扩展:内容_B206 名称="draw:stroke-dash">
+									<扩展:线型数据>
+										<xsl:copy-of select="/office:document/office:styles/draw:stroke-dash[@draw:name = $styleName]/@*"/>
+									</扩展:线型数据>
+								</扩展:内容_B206>
+							</扩展:扩展内容_B204>
+						</扩展:扩展_B201>
+					</xsl:if>
+				</xsl:if>
+			</xsl:for-each>
+		</xsl:if>
+		<xsl:for-each select="office:body//draw:custom-shape[contains($customshapetype,draw:enhanced-geometry/@draw:type)]">
+			<xsl:if test="contains($customshapetype,draw:enhanced-geometry/@draw:type)">
+				<扩展:扩展_B201>
+					<扩展:软件名称_B202>NSO</扩展:软件名称_B202>
+					<扩展:软件版本_B203>v4.5</扩展:软件版本_B203>
+					<扩展:扩展内容_B204>
+						<扩展:路径_B205>
+							<xsl:value-of select="generate-id(.)"/>
+						</扩展:路径_B205>
+						<扩展:内容_B206 名称="draw:custom-shape">
+							<扩展:预定义图形数据>
+								<xsl:for-each select="draw:enhanced-geometry">
+									<xsl:copy-of select="@*|node()"/>
+								</xsl:for-each>
+							</扩展:预定义图形数据>
+						</扩展:内容_B206>
+					</扩展:扩展内容_B204>
+				</扩展:扩展_B201>
+			</xsl:if>
+		</xsl:for-each>
+		<xsl:if test="$documentType!='spreadsheet' and office:body//office:document[office:body/office:chart/chart:chart/table:table/@table:name = 'local-table']">
+			<xsl:for-each select="office:body//office:document[office:body/office:chart/chart:chart/table:table/@table:name = 'local-table']">
+				<扩展:扩展_B201>
+					<扩展:软件名称_B202>NSO</扩展:软件名称_B202>
+					<扩展:软件版本_B203>v4.5</扩展:软件版本_B203>
+					<扩展:扩展内容_B204>
+						<扩展:路径_B205>
+							<xsl:value-of select="generate-id(..)"/>
+						</扩展:路径_B205>
+						<扩展:内容_B206 名称="chart">
+							<扩展:local-table>
+								<xsl:for-each select="office:body/office:chart/chart:chart/table:table[@table:name = 'local-table']">
+									<xsl:copy-of select="@*|node()"/>
+								</xsl:for-each>
+							</扩展:local-table>
+						</扩展:内容_B206>
+					</扩展:扩展内容_B204>
+				</扩展:扩展_B201>
+			</xsl:for-each>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:字体-sentence">
+		<xsl:if test="style:text-properties/@fo:font-family or style:text-properties/@style:font-name or style:text-properties/@style:font-family-asian or style:text-properties/@style:western-content or style:text-properties/@fo:color or style:text-properties/@fo:font-size">
+			<xsl:element name="字:字体_4128">
+				<xsl:if test="contains(@style:parent-style-name,'Header') or contains(@style:parent-style-name,'Foot') or contains(@style:parent-style-name,'Endnote')">
+					<xsl:attribute name="字号_412D">9</xsl:attribute>
+				</xsl:if>
+				<xsl:choose>
+					<xsl:when test="style:text-properties/@fo:font-family = 'Bookshelf Symbol 7' or style:text-properties/@fo:font-family = 'MS Reference Specialty' or style:text-properties/@fo:font-family = 'Marlett' or style:text-properties/@fo:font-family = 'Wingdings' or style:text-properties/@fo:font-family = 'MT Extra' or style:text-properties/@fo:font-family = 'Webdings' or style:text-properties/@fo:font-family = 'Wingdings 2' or style:text-properties/@fo:font-family = 'Wingdings 3'">
+						<xsl:variable name="ss">'</xsl:variable>
+						<xsl:choose>
+							<xsl:when test="contains(style:text-properties/@fo:font-family,$ss) and contains(style:text-properties/@fo:font-family,' ')">
+								<xsl:attribute name="特殊字体引用_412B"><xsl:value-of select="translate(substring-before(substring-after(style:text-properties/@fo:font-family,$ss),$ss),' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:when test="not(contains(style:text-properties/@fo:font-family,$ss)) and contains(style:text-properties/@fo:font-family,' ')">
+								<xsl:attribute name="特殊字体引用_412B"><xsl:value-of select="translate(style:text-properties/@fo:font-family,' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:attribute name="特殊字体引用_412B"><xsl:value-of select="style:text-properties/@fo:font-family"/></xsl:attribute>
+							</xsl:otherwise>
+						</xsl:choose>
+					</xsl:when>
+					<xsl:when test="style:text-properties/@style:font-name = 'Bookshelf Symbol 7' or style:text-properties/@style:font-name = 'MS Reference Specialty' or style:text-properties/@style:font-name = 'Marlett' or style:text-properties/@style:font-name = 'Wingdings' or style:text-properties/@style:font-name = 'MT Extra' or style:text-properties/@style:font-name = 'Webdings' or style:text-properties/@style:font-name = 'Wingdings 2' or style:text-properties/@style:font-name = 'Wingdings 3'">
+						<xsl:variable name="ss">'</xsl:variable>
+						<xsl:choose>
+							<xsl:when test="contains(style:text-properties/@style:font-name,$ss) and contains(style:text-properties/@style:font-name,' ')">
+								<xsl:attribute name="特殊字体引用_412B"><xsl:value-of select="translate(substring-before(substring-after(style:text-properties/@style:font-name,$ss),$ss),' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:when test="not(contains(style:text-properties/@style:font-name,$ss)) and contains(style:text-properties/@style:font-name,' ')">
+								<xsl:attribute name="特殊字体引用_412B"><xsl:value-of select="translate(style:text-properties/@style:font-name,' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:attribute name="特殊字体引用_412B"><xsl:value-of select="style:text-properties/@style:font-name"/></xsl:attribute>
+							</xsl:otherwise>
+						</xsl:choose>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:if test="style:text-properties/@fo:font-family">
+							<xsl:variable name="ss">'</xsl:variable>
+							<xsl:choose>
+								<xsl:when test="contains(style:text-properties/@fo:font-family,$ss) and contains(style:text-properties/@fo:font-family,' ')">
+									<xsl:attribute name="西文字体引用_4129"><xsl:value-of select="translate(substring-before(substring-after(style:text-properties/@fo:font-family,$ss),$ss),' ','_')"/></xsl:attribute>
+								</xsl:when>
+								<xsl:when test="not(contains(style:text-properties/@fo:font-family,$ss)) and contains(style:text-properties/@fo:font-family,' ')">
+									<xsl:attribute name="西文字体引用_4129"><xsl:value-of select="translate(style:text-properties/@fo:font-family,' ','_')"/></xsl:attribute>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:attribute name="西文字体引用_4129"><xsl:value-of select="style:text-properties/@fo:font-family"/></xsl:attribute>
+								</xsl:otherwise>
+							</xsl:choose>
+						</xsl:if>
+						<xsl:if test="style:text-properties/@style:font-name">
+							<xsl:variable name="ss">'</xsl:variable>
+							<xsl:choose>
+								<xsl:when test="contains(style:text-properties/@style:font-name,$ss) and contains(style:text-properties/@style:font-name,' ')">
+									<xsl:attribute name="西文字体引用_4129"><xsl:value-of select="translate(substring-before(substring-after(style:text-properties/@style:font-name,$ss),$ss),' ','_')"/></xsl:attribute>
+								</xsl:when>
+								<xsl:when test="not(contains(style:text-properties/@style:font-name,$ss)) and contains(style:text-properties/@style:font-name,' ')">
+									<xsl:attribute name="西文字体引用_4129"><xsl:value-of select="translate(style:text-properties/@style:font-name,' ','_')"/></xsl:attribute>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:attribute name="西文字体引用_4129"><xsl:value-of select="style:text-properties/@style:font-name"/></xsl:attribute>
+								</xsl:otherwise>
+							</xsl:choose>
+						</xsl:if>
+					</xsl:otherwise>
+				</xsl:choose>
+				<xsl:choose>
+					<xsl:when test="style:text-properties/@style:font-family-asian">
+						<xsl:variable name="ss">'</xsl:variable>
+						<xsl:choose>
+							<xsl:when test="contains(style:text-properties/@style:font-family-asian,$ss) and contains(style:text-properties/@style:font-family-asian,' ')">
+								<xsl:attribute name="中文字体引用_412A"><xsl:value-of select="translate(substring-before(substring-after(style:text-properties/@style:font-family-asian,$ss),$ss),' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:when test="not(contains(style:text-properties/@style:font-family-asian,$ss)) and contains(style:text-properties/@style:font-family-asian,' ')">
+								<xsl:attribute name="中文字体引用_412A"><xsl:value-of select="translate(style:text-properties/@style:font-family-asian,' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:attribute name="中文字体引用_412A"><xsl:value-of select="style:text-properties/@style:font-family-asian"/></xsl:attribute>
+							</xsl:otherwise>
+						</xsl:choose>
+					</xsl:when>
+					<xsl:when test="style:text-properties/@style:font-name-asian">
+						<xsl:variable name="ss">'</xsl:variable>
+						<xsl:choose>
+							<xsl:when test="contains(style:text-properties/@style:font-name-asian,$ss) and contains(style:text-properties/@style:font-name-asian,' ')">
+								<xsl:attribute name="中文字体引用_412A"><xsl:value-of select="translate(substring-before(substring-after(style:text-properties/@style:font-name-asian,$ss),$ss),' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:when test="not(contains(style:text-properties/@style:font-name-asian,$ss)) and contains(style:text-properties/@style:font-name-asian,' ')">
+								<xsl:attribute name="中文字体引用_412A"><xsl:value-of select="translate(style:text-properties/@style:font-name-asian,' ','_')"/></xsl:attribute>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:attribute name="中文字体引用_412A"><xsl:value-of select="style:text-properties/@style:font-name-asian"/></xsl:attribute>
+							</xsl:otherwise>
+						</xsl:choose>
+					</xsl:when>
+				</xsl:choose>
+				<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">
+					<xsl:choose>
+						<xsl:when test="contains(style:text-properties/@fo:font-size,'%') or contains(style:text-properties/@style:font-size-asian,'%')">
+							<xsl:attribute name="相对字号_412E"><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>
+						</xsl:when>
+						<xsl:otherwise>
+							<xsl:variable name="fontsize">
+								<xsl:choose>
+									<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:when test="style:text-properties/@fo:font-size">
+										<xsl:value-of select="substring-before(style:text-properties/@fo:font-size,'pt')"/>
+									</xsl:when>
+								</xsl:choose>
+							</xsl:variable>
+							<xsl:attribute name="字号_412D"><xsl:value-of select="$fontsize"/></xsl:attribute>
+						</xsl:otherwise>
+					</xsl:choose>
+				</xsl:if>
+				<xsl:if test="style:text-properties/@fo:color">
+					<xsl:attribute name="颜色_412F"><xsl:value-of select="style:text-properties/@fo:color"/></xsl:attribute>
+				</xsl:if>
+				<xsl:if test="contains(@style:name,'默认-outline') and style:text-properties/@style:use-window-font-color = 'true'">
+					<xsl:attribute name="颜色_412F">auto</xsl:attribute>
+				</xsl:if>
+				<xsl:if test="style:text-properties/@style:western-content">
+					<xsl:choose>
+						<xsl:when test="style:text-properties/@style:western-content = 'true'">
+							<xsl:attribute name="是否西文绘制_412C">true</xsl:attribute>
+						</xsl:when>
+						<xsl:otherwise>
+							<xsl:attribute name="是否西文绘制_412C">false</xsl:attribute>
+						</xsl:otherwise>
+					</xsl:choose>
+				</xsl:if>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:粗体-sentence">
+		<xsl:for-each select="style:text-properties">
+			<xsl:if test="@fo:font-weight or @style:font-weight-asian">
+				<xsl:element name="字:是否粗体_4130">
+					<xsl:choose>
+						<xsl:when test="@fo:font-weight ='normal' or @style:font-weight-asian ='normal' ">false</xsl:when>
+						<xsl:otherwise>true</xsl:otherwise>
+					</xsl:choose>
+				</xsl:element>
+			</xsl:if>
+		</xsl:for-each>
+		<!--xsl:if test="contains(@style:name,'默认-outline') and style:text-properties/@fo:font-weight ='normal'">
+			<xsl:element name="字:粗体">
+				<xsl:attribute name="uof:locID">t0089</xsl:attribute>
+				<xsl:attribute name="uof:attrList">值</xsl:attribute>
+				<xsl:attribute name="字:值">false</xsl:attribute>
+			</xsl:element>
+		</xsl:if-->
+	</xsl:template>
+	<xsl:template name="字:斜体-sentence">
+		<xsl:if test="style:text-properties/@fo:font-style or style:text-properties/@style:font-style-asian">
+			<xsl:element name="字:是否斜体_4131">
+				<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:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:突出显示-sentence">
+		<xsl:if test="style:text-properties/@fo:background-color|style:text-properties/@style:text-background-color">
+			<xsl:element name="字:突出显示颜色_4132">
+				<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:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:填充-sentence">
+		<xsl:if test="style:text-properties/@fo:background-color and not(style:text-properties/@style:text-background-color='transparent')">
+			<xsl:element name="字:填充_4134">
+				<xsl:element name="图:图案_800A">
+					<xsl:if test="style:text-properties/@fo:background-color">
+						<xsl:attribute name="前景色_800B"><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>
+					</xsl:if>
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:删除线-sentence">
+		<xsl:if test="style:text-properties/@style:text-line-through-style">
+			<xsl:element name="字:删除线_4135">
+				<xsl:choose>
+					<xsl:when test="style:text-properties/@style:text-line-through-style='solid' and not(style:text-properties/@style:text-line-through-type='double')">single</xsl:when>
+					<xsl:when test="style:text-properties/@style:text-line-through-style='solid' and style:text-properties/@style:text-line-through-type='double'">double</xsl:when>
+					<xsl:otherwise>none</xsl:otherwise>
+				</xsl:choose>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:下划线-sentence">
+		<xsl:if test="style:text-properties/@style:text-underline-style or style:text-properties/@style:text-underline-type">
+			<xsl:element name="字:下划线_4136">
+				<xsl:variable name="lineType">
+					<xsl:choose>
+						<xsl:when test="style:text-properties/@style:text-underline-type='double'">double</xsl:when>
+						<xsl:when test="style:text-properties/@style:text-underline-style != '' and style:text-properties/@style:text-underline-style != 'none'">single</xsl:when>
+						<xsl:when test="style:text-properties/@style:text-underline-type = 'single'">single</xsl:when>
+						<xsl:otherwise>none</xsl:otherwise>
+					</xsl:choose>
+				</xsl:variable>
+				<xsl:variable name="lineStyle">
+					<xsl:choose>
+						<xsl:when test="style:text-properties/@style:text-underline-style='solid'">solid</xsl:when>
+						<xsl:when test="style:text-properties/@style:text-underline-style='dotted'">round-dot</xsl:when>
+						<xsl:when test="style:text-properties/@style:text-underline-style='dash'">dash</xsl:when>
+						<xsl:when test="style:text-properties/@style:text-underline-style='dot-dash'">dash-dot</xsl:when>
+						<xsl:when test="style:text-properties/@style:text-underline-style='dot-dot-dash'">dash-dot-dot</xsl:when>
+						<xsl:when test="style:text-properties/@style:text-underline-style='long-dash'">long-dash</xsl:when>
+						<xsl:otherwise>solid</xsl:otherwise>
+					</xsl:choose>
+				</xsl:variable>
+				<xsl:attribute name="线型_4137"><xsl:value-of select="$lineType"/></xsl:attribute>
+				<xsl:attribute name="虚实_4138"><xsl:value-of select="$lineStyle"/></xsl:attribute>
+				<xsl:if test="style:text-properties/@style:text-underline-color">
+					<xsl:attribute name="颜色_412F"><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>
+				</xsl:if>
+				<xsl:attribute name="是否字下划线_4139"><xsl:choose><xsl:when test="style:text-properties/@style:text-line-through-mode = 'skip-white-space'">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:着重号-sentence">
+		<xsl:if test="style:text-properties/@style:text-emphasize">
+			<xsl:element name="字:着重号_413A">
+				<xsl:attribute name="类型_413B"><xsl:choose><xsl:when test="style:text-properties/@style:text-emphasize='none'">none</xsl:when><xsl:otherwise>dot</xsl:otherwise></xsl:choose></xsl:attribute>
+				<xsl:if test="not(style:text-properties/@style:text-emphasize='none') and contains(style:text-properties/@style:text-emphasize,'space')">
+					<xsl:attribute name="是否字着重号_413C"><xsl:choose><xsl:when test="contains(style:text-properties/@style:text-emphasize,'spaceex')">true</xsl:when><xsl:when test="contains(style:text-properties/@style:text-emphasize,'spacein')">false</xsl:when></xsl:choose></xsl:attribute>
+				</xsl:if>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:隐藏文字-sentence">
+		<xsl:if test="style:text-properties/@text:display">
+			<xsl:element name="字:是否隐藏文字_413D">true</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:空心-sentence">
+		<xsl:if test="style:text-properties/@style:text-outline">
+			<xsl:element name="字:是否空心_413E">
+				<xsl:value-of select="style:text-properties/@style:text-outline"/>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:浮雕-sentence">
+		<xsl:if test="style:text-properties/@style:font-relief">
+			<xsl:element name="字:浮雕_413F">
+				<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:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:阴影-sentence">
+		<xsl:if test="style:text-properties/@fo:text-shadow">
+			<xsl:element name="字:是否阴影_4140">
+				<xsl:choose>
+					<xsl:when test="style:text-properties/@fo:text-shadow='none'">false</xsl:when>
+					<xsl:otherwise>true</xsl:otherwise>
+				</xsl:choose>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:醒目字体-sentence">
+		<xsl:if test="style:text-properties/@fo:text-transform or style:text-properties/@fo:font-variant">
+			<xsl:element name="字:醒目字体类型_4141">
+				<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:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="ODFGetCharSize">
+		<xsl:choose>
+			<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/@fo:font-size">
+				<xsl:value-of select="substring-before(style:text-properties/@fo:font-size,'pt')"/>
+			</xsl:when>
+			<xsl:when test="@style:parent-style-name != ''">
+				<xsl:for-each select="key('ParaStyle',@style:parent-style-name)">
+					<xsl:call-template name="ODFGetCharSize"/>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:otherwise>10.5</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+	<xsl:template name="字:上下标-sentence">
+		<xsl:if test="style:text-properties/@style:text-position">
+			<xsl:variable name="poffset" select="substring-before(style:text-properties/@style:text-position,' ')"/>
+			<xsl:variable name="foffset" select="substring-before(substring-after(style:text-properties/@style:text-position,' '),'%')"/>
+			<xsl:choose>
+				<xsl:when test="$poffset ='sub' or $poffset = 'super' ">
+					<xsl:element name="字:上下标类型_4143">
+						<xsl:choose>
+							<xsl:when test="$poffset='sub'">sub</xsl:when>
+							<xsl:when test="$poffset='super'">sup</xsl:when>
+						</xsl:choose>
+					</xsl:element>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:element name="字:位置_4142">
+						<xsl:variable name="offset">
+							<xsl:variable name="size">
+								<xsl:call-template name="ODFGetCharSize"/>
+							</xsl:variable>
+							<xsl:choose>
+								<xsl:when test="$poffset='sub'">
+									<xsl:value-of select="-33 * $size div 100"/>
+								</xsl:when>
+								<xsl:when test="$poffset='super'">
+									<xsl:value-of select="33 * $size div 100"/>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:value-of select="string(number(substring-before($poffset,'%')) * number($size) div 100)"/>
+								</xsl:otherwise>
+							</xsl:choose>
+						</xsl:variable>
+						<xsl:if test="$offset!=''">
+							<字:偏移量_4126>
+								<xsl:value-of select="$offset"/>
+							</字:偏移量_4126>
+						</xsl:if>
+						<xsl:if test="$foffset != ''">
+							<字:缩放量_4127>
+								<xsl:value-of select="$foffset"/>
+							</字:缩放量_4127>
+						</xsl:if>
+					</xsl:element>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:缩放-sentence">
+		<xsl:if test="style:text-properties/@style:text-scale">
+			<xsl:element name="字:缩放_4144">
+				<xsl:variable name="scale" select="style:text-properties/@style:text-scale"/>
+				<xsl:choose>
+					<xsl:when test="contains($scale,'%')">
+						<xsl:value-of select="substring-before($scale,'%')"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:value-of select="style:text-properties/@style:text-scale"/>
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:字符间距-sentence">
+		<xsl:if test="style:text-properties/@fo:letter-spacing and (not(style:text-properties/@fo:letter-spacing='normal'))">
+			<xsl:element name="字:字符间距_4145">
+				<xsl:value-of select="fun:Convert2uofUnit(string(style:text-properties/@fo:letter-spacing))"/>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="字:调整字间距-sentence">
+		<xsl:if test="style:text-properties/@style:letter-kerning">
+			<xsl:element name="字:调整字间距_4146">
+				<xsl:variable name="tt" select="style:text-properties/@style:letter-kerning"/>
+				<xsl:choose>
+					<xsl:when test="$tt='true'">
+						<xsl:value-of select="fun:Convert2uofUnit(string(style:text-properties/@fo:letter-spacing))"/>
+					</xsl:when>
+					<xsl:otherwise>0</xsl:otherwise>
+				</xsl:choose>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template name="UOFTextStyle">
+		<xsl:call-template name="字:字体-sentence"/>
+		<xsl:call-template name="字:粗体-sentence"/>
+		<xsl:call-template name="字:斜体-sentence"/>
+		<xsl:call-template name="字:突出显示-sentence"/>
+		<xsl:call-template name="字:填充-sentence"/>
+		<xsl:call-template name="字:删除线-sentence"/>
+		<xsl:call-template name="字:下划线-sentence"/>
+		<xsl:call-template name="字:着重号-sentence"/>
+		<xsl:call-template name="字:隐藏文字-sentence"/>
+		<xsl:call-template name="字:空心-sentence"/>
+		<xsl:call-template name="字:浮雕-sentence"/>
+		<xsl:call-template name="字:阴影-sentence"/>
+		<xsl:call-template name="字:醒目字体-sentence"/>
+		<xsl:call-template name="字:上下标-sentence"/>
+		<xsl:call-template name="字:缩放-sentence"/>
+		<xsl:call-template name="字:字符间距-sentence"/>
+		<xsl:call-template name="字:调整字间距-sentence"/>

[... 14987 lines stripped ...]


Mime
View raw message