diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-08-11 09:57:55 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-09-20 16:11:23 +0200 |
commit | 28dff3780f9074f585bd626e2f06c94124ef4910 (patch) | |
tree | 9af8f298166c110af5e180170ed3a4ea3ff8d240 /filter/source/docbook | |
parent | 732d2e8bb19dbb65f6786e0d109020c189920e1e (diff) |
Clean up xsl files
* Remove trailing spaces
* Use 4 spaces for indentation everywhere
See discussion at https://lists.freedesktop.org/archives/libreoffice/2017-September/078433.html
Change-Id: I0bb9a0b9b0502cdf0870529cea37ee9c4d1ffdf4
Reviewed-on: https://gerrit.libreoffice.org/41009
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'filter/source/docbook')
-rw-r--r-- | filter/source/docbook/docbooktosoffheadings.xsl | 2748 | ||||
-rw-r--r-- | filter/source/docbook/sofftodocbookheadings.xsl | 2100 |
2 files changed, 2424 insertions, 2424 deletions
diff --git a/filter/source/docbook/docbooktosoffheadings.xsl b/filter/source/docbook/docbooktosoffheadings.xsl index 00f18380a315..08d1838632d4 100644 --- a/filter/source/docbook/docbooktosoffheadings.xsl +++ b/filter/source/docbook/docbooktosoffheadings.xsl @@ -17,1400 +17,1400 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:config="http://openoffice.org/2001/config" office:class="text" office:version="1.0"> - <xsl:decimal-format name="staff" digit="D"/> - <xsl:template match="/"> - <xsl:element name="office:document"> - <office:meta> - <dc:title> - <xsl:value-of select="/article/articleinfo/title"/> - </dc:title> - <dc:description></dc:description> - <dc:subject></dc:subject> - <dc:date> - <xsl:value-of select="article/articleinfo/pubdate"/> - </dc:date> - <dc:language> - <xsl:value-of select="article/@lang"/> - </dc:language> - <meta:user-defined meta:name="Info 1"/> - <meta:user-defined meta:name="Info 2"/> - <meta:user-defined meta:name="Info 3"/> - <meta:user-defined meta:name="Info 4"/> - </office:meta> - <office:font-decls> - <style:font-decl style:name="Tahoma1" fo:font-family="Tahoma"/> - <style:font-decl style:name="Thorndale" fo:font-family="Thorndale" style:font-family-generic="roman" style:font-pitch="variable"/> - <style:font-decl style:name="Albany" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable"/> - <style:font-decl style:name="Andale Sans UI" fo:font-family="'Andale Sans UI'" style:font-family-generic="system" style:font-pitch="variable"/> - <style:font-decl style:name="MS Mincho" fo:font-family="'MS Mincho'" style:font-family-generic="system" style:font-pitch="variable"/> - <style:font-decl style:name="Tahoma" fo:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/> - </office:font-decls> - <office:styles> - <style:default-style style:family="graphics"> - <style:properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false" style:use-window-font-color="true" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"> - <style:tab-stops/> - </style:properties> - </style:default-style> - <style:default-style style:family="paragraph"> - <style:properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="2.205cm" style:writing-mode="page" style:use-window-font-color="true" style:font-name="Thorndale" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-name-asian="Andale Sans UI" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/> - </style:default-style> - <style:default-style style:family="table"> - <style:properties table:border-model="separating"/> - </style:default-style> - <style:default-style style:family="table-row"> - <style:properties fo:keep-together="always"/> - </style:default-style> - <style:style style:name="Standard" style:family="paragraph" style:class="text"/> - <style:style style:name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text"> - <style:properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/> - </style:style> - <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text body" style:class="text"> - <style:properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="true" style:font-name="Albany" fo:font-size="14pt" style:font-name-asian="MS Mincho" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-size-complex="14pt"/> - </style:style> - <style:style style:name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> - <style:properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/> - </style:style> - <style:style style:name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> - <style:properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/> - </style:style> - <style:style style:name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> - <style:properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/> - </style:style> - <style:style style:name="Heading 4" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> - <style:properties fo:font-size="85%" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="85%" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="85%" style:font-style-complex="italic" style:font-weight-complex="bold"/> - </style:style> - <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text body" style:class="list"> - <style:properties style:font-name-complex="Tahoma1"/> - </style:style> - <style:style style:name="Table Contents" style:family="paragraph" style:parent-style-name="Text body" style:class="extra"> - <style:properties text:number-lines="false" text:line-number="0"/> - </style:style> - <style:style style:name="Table Heading" style:family="paragraph" style:parent-style-name="Table Contents" style:class="extra"> - <style:properties fo:text-align="center" style:justify-single-word="false" text:number-lines="false" text:line-number="0" fo:font-style="italic" fo:font-weight="bold" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-style-complex="italic" style:font-weight-complex="bold"/> - </style:style> - <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> - <style:properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" text:number-lines="false" text:line-number="0" fo:font-size="10pt" fo:font-style="italic" style:font-size-asian="10pt" style:font-style-asian="italic" style:font-size-complex="10pt" style:font-style-complex="italic"/> - </style:style> - <style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/> - <style:style style:name="Frame contents" style:family="paragraph" style:parent-style-name="Text body" style:class="extra"/> - <style:style style:name="Footnote" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> - <style:properties fo:margin-left="0.499cm" fo:margin-right="0cm" fo:text-indent="-0.499cm" style:auto-text-indent="false" text:number-lines="false" text:line-number="0" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/> - </style:style> - <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index"> - <style:properties text:number-lines="false" text:line-number="0" style:font-name-complex="Tahoma1"/> - </style:style> - <style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="chapter"> - <style:properties fo:text-align="center" style:justify-single-word="false" fo:font-size="14pt" fo:font-style="italic" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-size-complex="14pt" style:font-style-complex="italic"/> - </style:style> - <style:style style:name="Mediaobject" style:family="paragraph" style:class="text"/> - <style:style style:name="Object" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/> - <style:style style:name="Section Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> - <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="14pt"/> - </style:style> - <style:style style:name="Appendix Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> - <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="14pt"/> - </style:style> - <style:style style:name="Section1 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> - <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="14pt"/> - </style:style> - <style:style style:name="Section2 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> - <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="13pt"/> - </style:style> - <style:style style:name="Section3 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> - <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="12pt"/> - </style:style> - <style:style style:name="Section4 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> - <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="12pt"/> - </style:style> - <style:style style:name="Section5 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> - <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="12pt"/> - </style:style> - <style:style style:name="Document Title" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Document SubTitle"> - <style:properties fo:text-align="center" style:justify-single-word="false" fo:font-size="20pt"/> - </style:style> - <style:style style:name="Document SubTitle" style:family="paragraph" style:parent-style-name="Document Title" style:next-style-name="Text body"> - <style:properties fo:font-size="14pt"/> - </style:style> - <style:style style:name="Section SubTitle" style:family="paragraph" style:parent-style-name="Section Title"/> - <style:style style:name="CopyRight" style:family="paragraph" style:parent-style-name="Text body"/> - <style:style style:name="VarList Item" style:family="paragraph" style:parent-style-name="Text body" style:list-style-name="Var List" style:class="text"> - <style:properties fo:margin-left="3cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"> - <style:tab-stops> - <style:tab-stop style:position="0cm"/> - </style:tab-stops> - </style:properties> - </style:style> - <style:style style:name="VarList Term" style:family="paragraph" style:parent-style-name="Text body" style:list-style-name="Var List" style:class="text"> - <style:properties fo:margin-left="1cm" fo:margin-right="0cm" fo:text-indent="-4.5cm" style:auto-text-indent="false"> - <style:tab-stops> - <style:tab-stop style:position="0cm"/> - </style:tab-stops> - </style:properties> - </style:style> - <style:style style:name="Footnote Symbol" style:family="text"/> - <style:style style:name="Numbering Symbols" style:family="text"/> - <style:style style:name="Bullet Symbols" style:family="text"> - <style:properties fo:font-size="9pt" style:font-size-asian="9pt" style:font-size-complex="9pt"/> - </style:style> - <style:style style:name="Internet link" style:family="text"> - <style:properties fo:color="#000080" style:text-underline-color="font-color" style:text-underline="single"/> - </style:style> - <style:style style:name="Endnote Symbol" style:family="text"/> - <style:style style:name="Emphasis" style:family="text"> - <style:properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/> - </style:style> - <style:style style:name="Source Text" style:family="text"/> - <style:style style:name="Highlight" style:family="text"> - <style:properties style:text-background-color="#fff000"/> - </style:style> - <style:style style:name="KeyCap" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="Command" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="Application" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="FileName" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="SuperScript" style:family="text"> - <style:properties style:text-position="super 58%"/> - </style:style> - <style:style style:name="SubScript" style:family="text"> - <style:properties style:text-position="sub 58%"/> - </style:style> - <style:style style:name="SystemItem" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="ComputerOutput" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="KeyCombo" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="KeySym" style:family="text"> - <style:properties fo:font-weight="bold"/> - </style:style> - <style:style style:name="GuiMenu" style:family="text"> - <style:properties fo:color="#000fff" fo:font-style="italic"/> - </style:style> - <style:style style:name="GuiSubMenu" style:family="text"> - <style:properties fo:color="#ff9966" fo:font-style="italic"/> - </style:style> - <style:style style:name="GuiButton" style:family="text"> - <style:properties fo:color="#00f0ff" fo:font-style="italic"/> - </style:style> - <style:style style:name="GuiMenuItem" style:family="text"> - <style:properties fo:color="#00ffff" fo:font-style="italic"/> - </style:style> - <style:style style:name="GuiLabel" style:family="text"> - <style:properties fo:color="#00777f" fo:font-style="italic"/> - </style:style> - <style:style style:name="Frame" style:family="graphics"> - <style:properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.002cm solid #000000"/> - </style:style> - <text:outline-style> - <text:outline-level-style text:level="1" style:num-format=""/> - <text:outline-level-style text:level="2" style:num-format=""/> - <text:outline-level-style text:level="3" style:num-format=""/> - <text:outline-level-style text:level="4" style:num-format=""/> - <text:outline-level-style text:level="5" style:num-format=""/> - <text:outline-level-style text:level="6" style:num-format=""/> - <text:outline-level-style text:level="7" style:num-format=""/> - <text:outline-level-style text:level="8" style:num-format=""/> - <text:outline-level-style text:level="9" style:num-format=""/> - <text:outline-level-style text:level="10" style:num-format=""/> - </text:outline-style> - <text:list-style style:name="Ordered List"> - <text:list-level-style-number text:level="1" text:style-name="Numbering Symbols" style:num-suffix="." style:num-format="1"> - <style:properties text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="2" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="0.501cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="3" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="1cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="4" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="1.501cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="5" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="2cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="6" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="2.501cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="7" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="3.001cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="8" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="3.502cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="9" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="4.001cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - <text:list-level-style-number text:level="10" style:num-suffix="." style:num-format="1"> - <style:properties text:space-before="4.502cm" text:min-label-width="0.499cm"/> - </text:list-level-style-number> - </text:list-style> - <text:list-style style:name="UnOrdered List"> - <text:list-level-style-bullet text:level="1" text:style-name="Bullet Symbols" text:bullet-char="•"> - <style:properties text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="2" text:style-name="Bullet Symbols" text:bullet-char="•"> - <style:properties text:space-before="0.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="3" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="1cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="4" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="1.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="5" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="2cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="6" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="2.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="7" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="3.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="8" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="3.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="9" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="4.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="10" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="4.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - </text:list-style> - <text:list-style style:name="Var List"> - <text:list-level-style-bullet text:level="1" text:style-name="Bullet Symbols" text:bullet-char="•"> - <style:properties text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="2" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="0.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="3" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="1cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="4" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="1.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="5" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="2cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="6" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="2.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="7" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="3.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="8" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="3.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="9" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="4.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - <text:list-level-style-bullet text:level="10" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> - <style:properties text:space-before="4.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> - </text:list-level-style-bullet> - </text:list-style> - <text:footnotes-configuration text:citation-style-name="Footnote Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/> - <text:endnotes-configuration text:citation-style-name="Endnote Symbol" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/> - <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/> - </office:styles> - <office:automatic-styles> - <style:page-master style:name="pm1"> - <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> - <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/> - </style:properties> - <style:header-style/> - <style:footer-style/> - </style:page-master> - <style:page-master style:name="pm2"> - <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> - <style:footnote-sep style:adjustment="left" style:rel-width="25%" style:color="#000000"/> - </style:properties> - <style:header-style/> - <style:footer-style/> - </style:page-master> - </office:automatic-styles> - <office:master-styles> - <style:master-page style:name="Standard" style:page-master-name="pm1"/> - <style:master-page style:name="Endnote" style:page-master-name="pm2"/> - </office:master-styles> - <office:body> - <xsl:apply-templates/> - </office:body> - </xsl:element> - </xsl:template> - - <xsl:template match="subtitle"> - <xsl:choose> - <xsl:when test="parent::table"> - <xsl:apply-templates/> - </xsl:when> - <xsl:when test="parent::informaltable"> - <xsl:apply-templates/> - </xsl:when> - <xsl:otherwise> - <xsl:element name="text:p"> - <xsl:attribute name="text:style-name">Section SubTitle</xsl:attribute> - </xsl:element> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - - - <xsl:template match="title"> - <xsl:choose> - <xsl:when test="parent::figure"></xsl:when> - <xsl:when test="parent::table"></xsl:when> - <xsl:when test="parent::sect1"></xsl:when> - <xsl:when test="parent::sect2"></xsl:when> - <xsl:when test="parent::sect3"></xsl:when> - <xsl:when test="parent::sect4"></xsl:when> - <xsl:when test="parent::sect5"></xsl:when> - <xsl:when test="parent::informaltable"> - <xsl:apply-templates/> - </xsl:when> - - <xsl:otherwise> - <xsl:element name="text:p"> - <xsl:choose> - - <xsl:when test="parent::appendix"> - <xsl:attribute name="text:style-name">Appendix Title</xsl:attribute> - </xsl:when> - </xsl:choose> - <xsl:apply-templates/> - </xsl:element> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - <xsl:template match="articleinfo"> - <xsl:element name="text:section"> - <xsl:attribute name="text:style-name">ArticleInfo</xsl:attribute> - <xsl:attribute name="text:name">ArticleInfo</xsl:attribute> - <xsl:if test="/article/articleinfo/title !=''"> - <xsl:element name="text:p"> - <xsl:attribute name="text:style-name">Document Title</xsl:attribute> - <xsl:value-of select="/article/articleinfo/title"/> - </xsl:element> - <xsl:if test="/article/articleinfo/subtitle !=''"> - <xsl:element name="text:p"> - <xsl:attribute name="text:style-name">Document SubTitle</xsl:attribute> - <xsl:value-of select="/article/articleinfo/subtitle"/> - </xsl:element> - </xsl:if> - </xsl:if> - <xsl:apply-templates/> - </xsl:element> - - </xsl:template> - - <xsl:template match="appendix"> - <xsl:element name="text:section"> - <xsl:attribute name="text:style-name">Appendix</xsl:attribute> - <xsl:attribute name="text:name">Appendix</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - - </xsl:template> + <xsl:decimal-format name="staff" digit="D"/> + <xsl:template match="/"> + <xsl:element name="office:document"> + <office:meta> + <dc:title> + <xsl:value-of select="/article/articleinfo/title"/> + </dc:title> + <dc:description></dc:description> + <dc:subject></dc:subject> + <dc:date> + <xsl:value-of select="article/articleinfo/pubdate"/> + </dc:date> + <dc:language> + <xsl:value-of select="article/@lang"/> + </dc:language> + <meta:user-defined meta:name="Info 1"/> + <meta:user-defined meta:name="Info 2"/> + <meta:user-defined meta:name="Info 3"/> + <meta:user-defined meta:name="Info 4"/> + </office:meta> + <office:font-decls> + <style:font-decl style:name="Tahoma1" fo:font-family="Tahoma"/> + <style:font-decl style:name="Thorndale" fo:font-family="Thorndale" style:font-family-generic="roman" style:font-pitch="variable"/> + <style:font-decl style:name="Albany" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable"/> + <style:font-decl style:name="Andale Sans UI" fo:font-family="'Andale Sans UI'" style:font-family-generic="system" style:font-pitch="variable"/> + <style:font-decl style:name="MS Mincho" fo:font-family="'MS Mincho'" style:font-family-generic="system" style:font-pitch="variable"/> + <style:font-decl style:name="Tahoma" fo:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/> + </office:font-decls> + <office:styles> + <style:default-style style:family="graphics"> + <style:properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false" style:use-window-font-color="true" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"> + <style:tab-stops/> + </style:properties> + </style:default-style> + <style:default-style style:family="paragraph"> + <style:properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="2.205cm" style:writing-mode="page" style:use-window-font-color="true" style:font-name="Thorndale" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-name-asian="Andale Sans UI" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/> + </style:default-style> + <style:default-style style:family="table"> + <style:properties table:border-model="separating"/> + </style:default-style> + <style:default-style style:family="table-row"> + <style:properties fo:keep-together="always"/> + </style:default-style> + <style:style style:name="Standard" style:family="paragraph" style:class="text"/> + <style:style style:name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text"> + <style:properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/> + </style:style> + <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text body" style:class="text"> + <style:properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="true" style:font-name="Albany" fo:font-size="14pt" style:font-name-asian="MS Mincho" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-size-complex="14pt"/> + </style:style> + <style:style style:name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> + <style:properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/> + </style:style> + <style:style style:name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> + <style:properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/> + </style:style> + <style:style style:name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> + <style:properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/> + </style:style> + <style:style style:name="Heading 4" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="text"> + <style:properties fo:font-size="85%" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="85%" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="85%" style:font-style-complex="italic" style:font-weight-complex="bold"/> + </style:style> + <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text body" style:class="list"> + <style:properties style:font-name-complex="Tahoma1"/> + </style:style> + <style:style style:name="Table Contents" style:family="paragraph" style:parent-style-name="Text body" style:class="extra"> + <style:properties text:number-lines="false" text:line-number="0"/> + </style:style> + <style:style style:name="Table Heading" style:family="paragraph" style:parent-style-name="Table Contents" style:class="extra"> + <style:properties fo:text-align="center" style:justify-single-word="false" text:number-lines="false" text:line-number="0" fo:font-style="italic" fo:font-weight="bold" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-style-complex="italic" style:font-weight-complex="bold"/> + </style:style> + <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" text:number-lines="false" text:line-number="0" fo:font-size="10pt" fo:font-style="italic" style:font-size-asian="10pt" style:font-style-asian="italic" style:font-size-complex="10pt" style:font-style-complex="italic"/> + </style:style> + <style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/> + <style:style style:name="Frame contents" style:family="paragraph" style:parent-style-name="Text body" style:class="extra"/> + <style:style style:name="Footnote" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:properties fo:margin-left="0.499cm" fo:margin-right="0cm" fo:text-indent="-0.499cm" style:auto-text-indent="false" text:number-lines="false" text:line-number="0" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index"> + <style:properties text:number-lines="false" text:line-number="0" style:font-name-complex="Tahoma1"/> + </style:style> + <style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text body" style:class="chapter"> + <style:properties fo:text-align="center" style:justify-single-word="false" fo:font-size="14pt" fo:font-style="italic" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-size-complex="14pt" style:font-style-complex="italic"/> + </style:style> + <style:style style:name="Mediaobject" style:family="paragraph" style:class="text"/> + <style:style style:name="Object" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/> + <style:style style:name="Section Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> + <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="14pt"/> + </style:style> + <style:style style:name="Appendix Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> + <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="14pt"/> + </style:style> + <style:style style:name="Section1 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> + <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="14pt"/> + </style:style> + <style:style style:name="Section2 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> + <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="13pt"/> + </style:style> + <style:style style:name="Section3 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> + <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="12pt"/> + </style:style> + <style:style style:name="Section4 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> + <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="12pt"/> + </style:style> + <style:style style:name="Section5 Title" style:family="paragraph" style:next-style-name="Text body" style:master-page-name=""> + <style:properties fo:line-height="200%" fo:text-transform="capitalize" fo:font-size="12pt"/> + </style:style> + <style:style style:name="Document Title" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Document SubTitle"> + <style:properties fo:text-align="center" style:justify-single-word="false" fo:font-size="20pt"/> + </style:style> + <style:style style:name="Document SubTitle" style:family="paragraph" style:parent-style-name="Document Title" style:next-style-name="Text body"> + <style:properties fo:font-size="14pt"/> + </style:style> + <style:style style:name="Section SubTitle" style:family="paragraph" style:parent-style-name="Section Title"/> + <style:style style:name="CopyRight" style:family="paragraph" style:parent-style-name="Text body"/> + <style:style style:name="VarList Item" style:family="paragraph" style:parent-style-name="Text body" style:list-style-name="Var List" style:class="text"> + <style:properties fo:margin-left="3cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"> + <style:tab-stops> + <style:tab-stop style:position="0cm"/> + </style:tab-stops> + </style:properties> + </style:style> + <style:style style:name="VarList Term" style:family="paragraph" style:parent-style-name="Text body" style:list-style-name="Var List" style:class="text"> + <style:properties fo:margin-left="1cm" fo:margin-right="0cm" fo:text-indent="-4.5cm" style:auto-text-indent="false"> + <style:tab-stops> + <style:tab-stop style:position="0cm"/> + </style:tab-stops> + </style:properties> + </style:style> + <style:style style:name="Footnote Symbol" style:family="text"/> + <style:style style:name="Numbering Symbols" style:family="text"/> + <style:style style:name="Bullet Symbols" style:family="text"> + <style:properties fo:font-size="9pt" style:font-size-asian="9pt" style:font-size-complex="9pt"/> + </style:style> + <style:style style:name="Internet link" style:family="text"> + <style:properties fo:color="#000080" style:text-underline-color="font-color" style:text-underline="single"/> + </style:style> + <style:style style:name="Endnote Symbol" style:family="text"/> + <style:style style:name="Emphasis" style:family="text"> + <style:properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/> + </style:style> + <style:style style:name="Source Text" style:family="text"/> + <style:style style:name="Highlight" style:family="text"> + <style:properties style:text-background-color="#fff000"/> + </style:style> + <style:style style:name="KeyCap" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="Command" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="Application" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="FileName" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="SuperScript" style:family="text"> + <style:properties style:text-position="super 58%"/> + </style:style> + <style:style style:name="SubScript" style:family="text"> + <style:properties style:text-position="sub 58%"/> + </style:style> + <style:style style:name="SystemItem" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="ComputerOutput" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="KeyCombo" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="KeySym" style:family="text"> + <style:properties fo:font-weight="bold"/> + </style:style> + <style:style style:name="GuiMenu" style:family="text"> + <style:properties fo:color="#000fff" fo:font-style="italic"/> + </style:style> + <style:style style:name="GuiSubMenu" style:family="text"> + <style:properties fo:color="#ff9966" fo:font-style="italic"/> + </style:style> + <style:style style:name="GuiButton" style:family="text"> + <style:properties fo:color="#00f0ff" fo:font-style="italic"/> + </style:style> + <style:style style:name="GuiMenuItem" style:family="text"> + <style:properties fo:color="#00ffff" fo:font-style="italic"/> + </style:style> + <style:style style:name="GuiLabel" style:family="text"> + <style:properties fo:color="#00777f" fo:font-style="italic"/> + </style:style> + <style:style style:name="Frame" style:family="graphics"> + <style:properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.002cm solid #000000"/> + </style:style> + <text:outline-style> + <text:outline-level-style text:level="1" style:num-format=""/> + <text:outline-level-style text:level="2" style:num-format=""/> + <text:outline-level-style text:level="3" style:num-format=""/> + <text:outline-level-style text:level="4" style:num-format=""/> + <text:outline-level-style text:level="5" style:num-format=""/> + <text:outline-level-style text:level="6" style:num-format=""/> + <text:outline-level-style text:level="7" style:num-format=""/> + <text:outline-level-style text:level="8" style:num-format=""/> + <text:outline-level-style text:level="9" style:num-format=""/> + <text:outline-level-style text:level="10" style:num-format=""/> + </text:outline-style> + <text:list-style style:name="Ordered List"> + <text:list-level-style-number text:level="1" text:style-name="Numbering Symbols" style:num-suffix="." style:num-format="1"> + <style:properties text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="2" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="0.501cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="3" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="1cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="4" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="1.501cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="5" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="2cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="6" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="2.501cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="7" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="3.001cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="8" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="3.502cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="9" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="4.001cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + <text:list-level-style-number text:level="10" style:num-suffix="." style:num-format="1"> + <style:properties text:space-before="4.502cm" text:min-label-width="0.499cm"/> + </text:list-level-style-number> + </text:list-style> + <text:list-style style:name="UnOrdered List"> + <text:list-level-style-bullet text:level="1" text:style-name="Bullet Symbols" text:bullet-char="•"> + <style:properties text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="2" text:style-name="Bullet Symbols" text:bullet-char="•"> + <style:properties text:space-before="0.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="3" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="1cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="4" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="1.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="5" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="2cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="6" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="2.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="7" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="3.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="8" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="3.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="9" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="4.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="10" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="4.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + </text:list-style> + <text:list-style style:name="Var List"> + <text:list-level-style-bullet text:level="1" text:style-name="Bullet Symbols" text:bullet-char="•"> + <style:properties text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="2" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="0.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="3" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="1cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="4" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="1.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="5" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="2cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="6" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="2.501cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="7" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="3.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="8" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="3.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="9" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="4.001cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + <text:list-level-style-bullet text:level="10" text:style-name="Bullet Symbols" style:num-suffix="." text:bullet-char="•"> + <style:properties text:space-before="4.502cm" text:min-label-width="0.499cm" fo:font-family="StarSymbol" style:font-charset="x-symbol"/> + </text:list-level-style-bullet> + </text:list-style> + <text:footnotes-configuration text:citation-style-name="Footnote Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/> + <text:endnotes-configuration text:citation-style-name="Endnote Symbol" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/> + <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/> + </office:styles> + <office:automatic-styles> + <style:page-master style:name="pm1"> + <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> + <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/> + </style:properties> + <style:header-style/> + <style:footer-style/> + </style:page-master> + <style:page-master style:name="pm2"> + <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> + <style:footnote-sep style:adjustment="left" style:rel-width="25%" style:color="#000000"/> + </style:properties> + <style:header-style/> + <style:footer-style/> + </style:page-master> + </office:automatic-styles> + <office:master-styles> + <style:master-page style:name="Standard" style:page-master-name="pm1"/> + <style:master-page style:name="Endnote" style:page-master-name="pm2"/> + </office:master-styles> + <office:body> + <xsl:apply-templates/> + </office:body> + </xsl:element> + </xsl:template> + + <xsl:template match="subtitle"> + <xsl:choose> + <xsl:when test="parent::table"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="parent::informaltable"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:element name="text:p"> + <xsl:attribute name="text:style-name">Section SubTitle</xsl:attribute> + </xsl:element> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + + + + <xsl:template match="title"> + <xsl:choose> + <xsl:when test="parent::figure"></xsl:when> + <xsl:when test="parent::table"></xsl:when> + <xsl:when test="parent::sect1"></xsl:when> + <xsl:when test="parent::sect2"></xsl:when> + <xsl:when test="parent::sect3"></xsl:when> + <xsl:when test="parent::sect4"></xsl:when> + <xsl:when test="parent::sect5"></xsl:when> + <xsl:when test="parent::informaltable"> + <xsl:apply-templates/> + </xsl:when> + + <xsl:otherwise> + <xsl:element name="text:p"> + <xsl:choose> + + <xsl:when test="parent::appendix"> + <xsl:attribute name="text:style-name">Appendix Title</xsl:attribute> + </xsl:when> + </xsl:choose> + <xsl:apply-templates/> + </xsl:element> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="articleinfo"> + <xsl:element name="text:section"> + <xsl:attribute name="text:style-name">ArticleInfo</xsl:attribute> + <xsl:attribute name="text:name">ArticleInfo</xsl:attribute> + <xsl:if test="/article/articleinfo/title !=''"> + <xsl:element name="text:p"> + <xsl:attribute name="text:style-name">Document Title</xsl:attribute> + <xsl:value-of select="/article/articleinfo/title"/> + </xsl:element> + <xsl:if test="/article/articleinfo/subtitle !=''"> + <xsl:element name="text:p"> + <xsl:attribute name="text:style-name">Document SubTitle</xsl:attribute> + <xsl:value-of select="/article/articleinfo/subtitle"/> + </xsl:element> + </xsl:if> + </xsl:if> + <xsl:apply-templates/> + </xsl:element> + + </xsl:template> + + <xsl:template match="appendix"> + <xsl:element name="text:section"> + <xsl:attribute name="text:style-name">Appendix</xsl:attribute> + <xsl:attribute name="text:name">Appendix</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + + </xsl:template> <!-- <xsl:template match="author"> - <xsl:apply-templates/> + <xsl:apply-templates/> </xsl:template> <xsl:template match="firstname"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:name"> - <xsl:if test="ancestor::articleinfo/author"> - <xsl:text disable-output-escaping="yes">articleinfo.author</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/> - </xsl:if> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:name"> + <xsl:if test="ancestor::articleinfo/author"> + <xsl:text disable-output-escaping="yes">articleinfo.author</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/> + </xsl:if> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> </xsl:template>--> - <xsl:template match="articleinfo/title"> - <!-- <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text> - </xsl:attribute> - </xsl:element> - - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element>--></xsl:template> - - <xsl:template match="articleinfo/subtitle"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - <xsl:template match="articleinfo/edition"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - <xsl:template match="articleinfo/releaseinfo"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text> - <xsl:value-of select="count(preceding-sibling::releaseinfo)"/> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text> - <xsl:value-of select="count(preceding-sibling::releaseinfo)"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - - <xsl:template match="author/firstname"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - - <xsl:attribute name="text:name"> - <xsl:if test="ancestor::articleinfo"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.firstname_</xsl:text> - <xsl:value-of select="count(preceding-sibling::firstname)"/> - </xsl:if> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:if test="ancestor::articleinfo"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.firstname_</xsl:text> - <xsl:value-of select="count(preceding-sibling::firstname)"/> - </xsl:if> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - - - <xsl:template match="articleinfo/copyright/year"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - - <xsl:attribute name="text:name"> - <xsl:if test="ancestor::articleinfo/copyright"> - <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> - <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> - <xsl:text disable-output-escaping="yes">.year_</xsl:text> - <xsl:value-of select="count(preceding-sibling::year)"/> - </xsl:if> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:if test="ancestor::articleinfo/copyright"> - <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> - <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> - <xsl:text disable-output-escaping="yes">.year_</xsl:text> - <xsl:value-of select="count(preceding-sibling::year)"/> - </xsl:if> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - <xsl:template match="authorgroup"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="articleinfo/copyright/holder"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - - <xsl:attribute name="text:name"> - <xsl:if test="ancestor::articleinfo/copyright"> - <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> - <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> - <xsl:text disable-output-escaping="yes">.holder_</xsl:text> - <xsl:value-of select="count(preceding-sibling::holder)"/> - </xsl:if> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:if test="ancestor::articleinfo/copyright"> - <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> - <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> - <xsl:text disable-output-escaping="yes">.holder_</xsl:text> - <xsl:value-of select="count(preceding-sibling::holder)"/> - </xsl:if> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - - - - <xsl:template name="affiliation"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="author/affiliation/address"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> - <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> - <xsl:text disable-output-escaping="yes">.address_</xsl:text> - <xsl:value-of select="count(preceding-sibling::address)"/> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> - <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> - <xsl:text disable-output-escaping="yes">.address_</xsl:text> - <xsl:value-of select="count(preceding-sibling::address)"/> - - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - <xsl:template match="author/affiliation/orgname"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:if test="ancestor::articleinfo"> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> - <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> - <xsl:text disable-output-escaping="yes">.orgname_</xsl:text> - <xsl:value-of select="count(preceding-sibling::orgname)"/> - </xsl:attribute> - </xsl:if> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:if test="ancestor::articleinfo"> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> - <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> - <xsl:text disable-output-escaping="yes">.orgname_</xsl:text> - <xsl:value-of select="count(preceding-sibling::orgname)"/> - </xsl:attribute> - </xsl:if> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - - - <xsl:template match="author/surname"> - <xsl:element name="text:variable-decls"> - <xsl:element name="text:variable-decl"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.surname_</xsl:text> - <xsl:value-of select="count(preceding-sibling::surname)"/> - </xsl:attribute> - </xsl:element> - </xsl:element> - <xsl:element name="text:p"> - <xsl:element name="text:variable-set"> - <xsl:attribute name="text:value-type"> - <xsl:text>string</xsl:text> - </xsl:attribute> - <xsl:attribute name="text:name"> - <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> - <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> - <xsl:text disable-output-escaping="yes">.surname_</xsl:text> - <xsl:value-of select="count(preceding-sibling::surname)"/> - - - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - - - - - <xsl:template match="para"> - - <xsl:element name="text:p"> - - <xsl:choose> - <xsl:when test="ancestor-or-self::footnote"> - <xsl:attribute name="text:style-name">Footnote</xsl:attribute> - </xsl:when> - <xsl:when test="ancestor-or-self::listitem"> - <xsl:attribute name="text:style-name">VarList Item</xsl:attribute> - </xsl:when> - <xsl:when test="ancestor-or-self::informaltable"> - <xsl:if test="ancestor-or-self::informaltable"> - <xsl:attribute name="text:style-name">Table Contents</xsl:attribute> - </xsl:if> - <xsl:if test="ancestor-or-self::thead"> - <xsl:attribute name="text:style-name">Table Heading</xsl:attribute> - </xsl:if> - </xsl:when> - <xsl:when test="ancestor-or-self::table"> - <xsl:if test="ancestor-or-self::table"> - <xsl:attribute name="text:style-name">Table Contents</xsl:attribute> - </xsl:if> - <xsl:if test="ancestor-or-self::thead"> - <xsl:attribute name="text:style-name">Table Heading</xsl:attribute> - </xsl:if> - </xsl:when> - <xsl:otherwise> - <xsl:attribute name="text:style-name">Text body</xsl:attribute> - </xsl:otherwise> - </xsl:choose> - - <xsl:apply-templates/> - </xsl:element> - - </xsl:template> - - <xsl:template match="section"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level"> - <xsl:value-of select="count(ancestor-or-self::section)"/> - </xsl:attribute> - <xsl:value-of select="child::title"/> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="abstract"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level">1</xsl:attribute> - <xsl:text>abstract</xsl:text> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - - <xsl:template match="appendix"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level">1</xsl:attribute> - <xsl:text>appendix</xsl:text> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="sect1"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level">1</xsl:attribute> - <xsl:attribute name="text:style-name">Heading 1</xsl:attribute> - <xsl:value-of select="child::title"/> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="sect2"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level">2</xsl:attribute> - <xsl:attribute name="text:style-name">Heading 2</xsl:attribute> - <xsl:value-of select="child::title"/> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="sect3"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level">3</xsl:attribute> - <xsl:attribute name="text:style-name">Heading 3</xsl:attribute> - <xsl:value-of select="child::title"/> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="sect4"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level">4</xsl:attribute> - <xsl:attribute name="text:style-name">Heading 4</xsl:attribute> - <xsl:value-of select="child::title"/> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="sect5"> - <xsl:element name="text:h"> - <xsl:attribute name="text:level">5</xsl:attribute> - <xsl:value-of select="child::title"/> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> + <xsl:template match="articleinfo/title"> + <!-- <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text> + </xsl:attribute> + </xsl:element> + + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element>--></xsl:template> + + <xsl:template match="articleinfo/subtitle"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + <xsl:template match="articleinfo/edition"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + <xsl:template match="articleinfo/releaseinfo"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text> + <xsl:value-of select="count(preceding-sibling::releaseinfo)"/> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text> + <xsl:value-of select="count(preceding-sibling::releaseinfo)"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + + <xsl:template match="author/firstname"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + + <xsl:attribute name="text:name"> + <xsl:if test="ancestor::articleinfo"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.firstname_</xsl:text> + <xsl:value-of select="count(preceding-sibling::firstname)"/> + </xsl:if> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:if test="ancestor::articleinfo"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.firstname_</xsl:text> + <xsl:value-of select="count(preceding-sibling::firstname)"/> + </xsl:if> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + + + <xsl:template match="articleinfo/copyright/year"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + + <xsl:attribute name="text:name"> + <xsl:if test="ancestor::articleinfo/copyright"> + <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> + <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> + <xsl:text disable-output-escaping="yes">.year_</xsl:text> + <xsl:value-of select="count(preceding-sibling::year)"/> + </xsl:if> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:if test="ancestor::articleinfo/copyright"> + <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> + <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> + <xsl:text disable-output-escaping="yes">.year_</xsl:text> + <xsl:value-of select="count(preceding-sibling::year)"/> + </xsl:if> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + <xsl:template match="authorgroup"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="articleinfo/copyright/holder"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + + <xsl:attribute name="text:name"> + <xsl:if test="ancestor::articleinfo/copyright"> + <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> + <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> + <xsl:text disable-output-escaping="yes">.holder_</xsl:text> + <xsl:value-of select="count(preceding-sibling::holder)"/> + </xsl:if> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:if test="ancestor::articleinfo/copyright"> + <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text> + <xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/> + <xsl:text disable-output-escaping="yes">.holder_</xsl:text> + <xsl:value-of select="count(preceding-sibling::holder)"/> + </xsl:if> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + + + + <xsl:template name="affiliation"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="author/affiliation/address"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> + <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> + <xsl:text disable-output-escaping="yes">.address_</xsl:text> + <xsl:value-of select="count(preceding-sibling::address)"/> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> + <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> + <xsl:text disable-output-escaping="yes">.address_</xsl:text> + <xsl:value-of select="count(preceding-sibling::address)"/> + + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + <xsl:template match="author/affiliation/orgname"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:if test="ancestor::articleinfo"> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> + <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> + <xsl:text disable-output-escaping="yes">.orgname_</xsl:text> + <xsl:value-of select="count(preceding-sibling::orgname)"/> + </xsl:attribute> + </xsl:if> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:if test="ancestor::articleinfo"> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.affiliation_</xsl:text> + <xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/> + <xsl:text disable-output-escaping="yes">.orgname_</xsl:text> + <xsl:value-of select="count(preceding-sibling::orgname)"/> + </xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + + + <xsl:template match="author/surname"> + <xsl:element name="text:variable-decls"> + <xsl:element name="text:variable-decl"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.surname_</xsl:text> + <xsl:value-of select="count(preceding-sibling::surname)"/> + </xsl:attribute> + </xsl:element> + </xsl:element> + <xsl:element name="text:p"> + <xsl:element name="text:variable-set"> + <xsl:attribute name="text:value-type"> + <xsl:text>string</xsl:text> + </xsl:attribute> + <xsl:attribute name="text:name"> + <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text> + <xsl:value-of select="count(parent::author[preceding-sibling::author])"/> + <xsl:text disable-output-escaping="yes">.surname_</xsl:text> + <xsl:value-of select="count(preceding-sibling::surname)"/> + + + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + + + + + <xsl:template match="para"> + + <xsl:element name="text:p"> + + <xsl:choose> + <xsl:when test="ancestor-or-self::footnote"> + <xsl:attribute name="text:style-name">Footnote</xsl:attribute> + </xsl:when> + <xsl:when test="ancestor-or-self::listitem"> + <xsl:attribute name="text:style-name">VarList Item</xsl:attribute> + </xsl:when> + <xsl:when test="ancestor-or-self::informaltable"> + <xsl:if test="ancestor-or-self::informaltable"> + <xsl:attribute name="text:style-name">Table Contents</xsl:attribute> + </xsl:if> + <xsl:if test="ancestor-or-self::thead"> + <xsl:attribute name="text:style-name">Table Heading</xsl:attribute> + </xsl:if> + </xsl:when> + <xsl:when test="ancestor-or-self::table"> + <xsl:if test="ancestor-or-self::table"> + <xsl:attribute name="text:style-name">Table Contents</xsl:attribute> + </xsl:if> + <xsl:if test="ancestor-or-self::thead"> + <xsl:attribute name="text:style-name">Table Heading</xsl:attribute> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="text:style-name">Text body</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + + <xsl:apply-templates/> + </xsl:element> + + </xsl:template> + + <xsl:template match="section"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level"> + <xsl:value-of select="count(ancestor-or-self::section)"/> + </xsl:attribute> + <xsl:value-of select="child::title"/> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="abstract"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level">1</xsl:attribute> + <xsl:text>abstract</xsl:text> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + + <xsl:template match="appendix"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level">1</xsl:attribute> + <xsl:text>appendix</xsl:text> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="sect1"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level">1</xsl:attribute> + <xsl:attribute name="text:style-name">Heading 1</xsl:attribute> + <xsl:value-of select="child::title"/> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="sect2"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level">2</xsl:attribute> + <xsl:attribute name="text:style-name">Heading 2</xsl:attribute> + <xsl:value-of select="child::title"/> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="sect3"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level">3</xsl:attribute> + <xsl:attribute name="text:style-name">Heading 3</xsl:attribute> + <xsl:value-of select="child::title"/> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="sect4"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level">4</xsl:attribute> + <xsl:attribute name="text:style-name">Heading 4</xsl:attribute> + <xsl:value-of select="child::title"/> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="sect5"> + <xsl:element name="text:h"> + <xsl:attribute name="text:level">5</xsl:attribute> + <xsl:value-of select="child::title"/> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> <!--<xsl:template match="sect5"> - <xsl:element name="text:section"> - <xsl:attribute name="text:style-name">Sect1</xsl:attribute> - <xsl:attribute name="text:name"><xsl:value-of select="@id"/></xsl:attribute> - <xsl:apply-templates/> - </xsl:element> + <xsl:element name="text:section"> + <xsl:attribute name="text:style-name">Sect1</xsl:attribute> + <xsl:attribute name="text:name"><xsl:value-of select="@id"/></xsl:attribute> + <xsl:apply-templates/> + </xsl:element> </xsl:template>--> - <xsl:template match="informaltable"> - <xsl:element name="table:table"> - <xsl:attribute name="table:name"></xsl:attribute> - <xsl:attribute name="table:style-name">Table1</xsl:attribute> - <xsl:attribute name="table:name"> - <xsl:value-of select="@id"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - - <xsl:template match="table"> - <xsl:variable name="tabletitle"> - <xsl:value-of select="title"/> - </xsl:variable> - <xsl:element name="table:table"> - <xsl:attribute name="table:name"></xsl:attribute> - <xsl:attribute name="table:style-name">Table1</xsl:attribute> - <xsl:attribute name="table:name"> - <xsl:value-of select="@id"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - <xsl:if test="not($tabletitle='')"> - <xsl:element name="text:p"> - <xsl:attribute name="text:style-name">Table</xsl:attribute> - <xsl:value-of select="$tabletitle"/> - </xsl:element> - </xsl:if> - </xsl:template> - - <xsl:template match="tgroup"> - <xsl:element name="table:table-column"> - <xsl:attribute name="table:style-name">Table1.A</xsl:attribute> - <xsl:choose> - <xsl:when test="@cols >0"> - <xsl:attribute name="table:number-columns-repeated"> - <xsl:value-of select="@cols"/> - </xsl:attribute> - </xsl:when> - <xsl:otherwise> - <xsl:attribute name="table:number-columns-repeated"> - <xsl:value-of select="count(child::tbody/row/entry) div count(child::tbody/row)"/> - </xsl:attribute> - </xsl:otherwise> - </xsl:choose> - </xsl:element> - <xsl:apply-templates/> - </xsl:template> - - - <xsl:template match="indexterm"></xsl:template> - - <xsl:template match="thead"> - <xsl:element name="table:table-header-rows"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="tbody"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="row"> - <xsl:element name="table:table-row"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="entry"> - <xsl:element name="table:table-cell"> - <xsl:if test="ancestor-or-self::thead"> - <xsl:attribute name="table:style-name">Table1.A1</xsl:attribute> - </xsl:if> - <xsl:if test="not(ancestor-or-self::thead)"> - <xsl:attribute name="table:style-name">Table1.A2</xsl:attribute> - </xsl:if> - - <xsl:choose> - <xsl:when test="@spanname"> - <!--<xsl:if test="@spanname">--> - <xsl:variable name="sname"> - <xsl:value-of select="@spanname"/> - </xsl:variable> - <xsl:attribute name="table:number-columns-spanned"> - <xsl:variable name="colnamestart"> - <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@namest"/> - </xsl:variable> - <xsl:variable name="colnameend"> - <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@nameend"/> - </xsl:variable> - <xsl:variable name="colnumstart"> - <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/> - </xsl:variable> - <xsl:variable name="colnumend"> - <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/> - </xsl:variable> - <xsl:value-of select="$colnumend - $colnumstart + 1"/> - </xsl:attribute> - </xsl:when> - <xsl:when test="@namest and @nameend"> - <!--<xsl:if test="@namest and @nameend">--> - <xsl:variable name="colnamestart"> - <xsl:value-of select="@namest"/> - </xsl:variable> - <xsl:variable name="colnameend"> - <xsl:value-of select="@nameend"/> - </xsl:variable> - - <xsl:attribute name="table:number-columns-spanned"> - <xsl:variable name="colnumstart"> - <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/> - </xsl:variable> - <xsl:variable name="colnumend"> - <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/> - </xsl:variable> - <xsl:value-of select="$colnumend - $colnumstart + 1"/> - - </xsl:attribute> - </xsl:when> - </xsl:choose> - <!-- - <xsl:if test="not(@namest = '' ) "> - <xsl:attribute name="table:number-columns-spanned"> - <xsl:value-of select="(substring-after(@nameend,'c')-substring-after(@namest,'c'))+1"/> - - </xsl:attribute> - </xsl:if> - --> - <xsl:choose> - <xsl:when test="not(child::para)"> - <xsl:element name="text:p"> - <xsl:if test="ancestor-or-self::thead"> - <xsl:attribute name="text:style-name">Table Heading</xsl:attribute> - </xsl:if> - <xsl:if test="ancestor-or-self::tbody"> - <xsl:attribute name="text:style-name">Table Contents</xsl:attribute> - </xsl:if> - <xsl:apply-templates/> - </xsl:element> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - </xsl:element> - </xsl:template> - - - - - - - <xsl:template match="figure"> - <xsl:apply-templates/> - </xsl:template> + <xsl:template match="informaltable"> + <xsl:element name="table:table"> + <xsl:attribute name="table:name"></xsl:attribute> + <xsl:attribute name="table:style-name">Table1</xsl:attribute> + <xsl:attribute name="table:name"> + <xsl:value-of select="@id"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + + <xsl:template match="table"> + <xsl:variable name="tabletitle"> + <xsl:value-of select="title"/> + </xsl:variable> + <xsl:element name="table:table"> + <xsl:attribute name="table:name"></xsl:attribute> + <xsl:attribute name="table:style-name">Table1</xsl:attribute> + <xsl:attribute name="table:name"> + <xsl:value-of select="@id"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + <xsl:if test="not($tabletitle='')"> + <xsl:element name="text:p"> + <xsl:attribute name="text:style-name">Table</xsl:attribute> + <xsl:value-of select="$tabletitle"/> + </xsl:element> + </xsl:if> + </xsl:template> + + <xsl:template match="tgroup"> + <xsl:element name="table:table-column"> + <xsl:attribute name="table:style-name">Table1.A</xsl:attribute> + <xsl:choose> + <xsl:when test="@cols >0"> + <xsl:attribute name="table:number-columns-repeated"> + <xsl:value-of select="@cols"/> + </xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="table:number-columns-repeated"> + <xsl:value-of select="count(child::tbody/row/entry) div count(child::tbody/row)"/> + </xsl:attribute> + </xsl:otherwise> + </xsl:choose> + </xsl:element> + <xsl:apply-templates/> + </xsl:template> + + + <xsl:template match="indexterm"></xsl:template> + + <xsl:template match="thead"> + <xsl:element name="table:table-header-rows"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="tbody"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="row"> + <xsl:element name="table:table-row"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="entry"> + <xsl:element name="table:table-cell"> + <xsl:if test="ancestor-or-self::thead"> + <xsl:attribute name="table:style-name">Table1.A1</xsl:attribute> + </xsl:if> + <xsl:if test="not(ancestor-or-self::thead)"> + <xsl:attribute name="table:style-name">Table1.A2</xsl:attribute> + </xsl:if> + + <xsl:choose> + <xsl:when test="@spanname"> + <!--<xsl:if test="@spanname">--> + <xsl:variable name="sname"> + <xsl:value-of select="@spanname"/> + </xsl:variable> + <xsl:attribute name="table:number-columns-spanned"> + <xsl:variable name="colnamestart"> + <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@namest"/> + </xsl:variable> + <xsl:variable name="colnameend"> + <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@nameend"/> + </xsl:variable> + <xsl:variable name="colnumstart"> + <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/> + </xsl:variable> + <xsl:variable name="colnumend"> + <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/> + </xsl:variable> + <xsl:value-of select="$colnumend - $colnumstart + 1"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="@namest and @nameend"> + <!--<xsl:if test="@namest and @nameend">--> + <xsl:variable name="colnamestart"> + <xsl:value-of select="@namest"/> + </xsl:variable> + <xsl:variable name="colnameend"> + <xsl:value-of select="@nameend"/> + </xsl:variable> + + <xsl:attribute name="table:number-columns-spanned"> + <xsl:variable name="colnumstart"> + <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/> + </xsl:variable> + <xsl:variable name="colnumend"> + <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/> + </xsl:variable> + <xsl:value-of select="$colnumend - $colnumstart + 1"/> + + </xsl:attribute> + </xsl:when> + </xsl:choose> + <!-- + <xsl:if test="not(@namest = '' ) "> + <xsl:attribute name="table:number-columns-spanned"> + <xsl:value-of select="(substring-after(@nameend,'c')-substring-after(@namest,'c'))+1"/> + + </xsl:attribute> + </xsl:if> + --> + <xsl:choose> + <xsl:when test="not(child::para)"> + <xsl:element name="text:p"> + <xsl:if test="ancestor-or-self::thead"> + <xsl:attribute name="text:style-name">Table Heading</xsl:attribute> + </xsl:if> + <xsl:if test="ancestor-or-self::tbody"> + <xsl:attribute name="text:style-name">Table Contents</xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </xsl:element> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:element> + </xsl:template> + + + + + + + <xsl:template match="figure"> + <xsl:apply-templates/> + </xsl:template> <!-- lists Section --> - <xsl:template match="itemizedlist"> - <xsl:element name="text:unordered-list"> - <xsl:if test="not(ancestor::itemizedlist)"> - <xsl:attribute name="text:style-name">L1</xsl:attribute> - </xsl:if> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="variablelist"> - <xsl:element name="text:unordered-list"> - <xsl:attribute name="text:style-name">Var List</xsl:attribute> - <xsl:attribute name="text:continue-numbering">false</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="orderedlist"> - <xsl:element name="text:ordered-list"> - <xsl:attribute name="text:style-name">Ordered List</xsl:attribute> - <xsl:attribute name="text:continue-numbering">false</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="term"> - <xsl:if test="parent::varlistentry"> - <text:list-item> - <xsl:element name="text:p"> - <xsl:attribute name="text:style-name">VarList Term</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </text:list-item> - </xsl:if> - </xsl:template> - - <xsl:template match="listitem"> - <text:list-item> - <xsl:apply-templates/> - </text:list-item> - </xsl:template> + <xsl:template match="itemizedlist"> + <xsl:element name="text:unordered-list"> + <xsl:if test="not(ancestor::itemizedlist)"> + <xsl:attribute name="text:style-name">L1</xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="variablelist"> + <xsl:element name="text:unordered-list"> + <xsl:attribute name="text:style-name">Var List</xsl:attribute> + <xsl:attribute name="text:continue-numbering">false</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="orderedlist"> + <xsl:element name="text:ordered-list"> + <xsl:attribute name="text:style-name">Ordered List</xsl:attribute> + <xsl:attribute name="text:continue-numbering">false</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="term"> + <xsl:if test="parent::varlistentry"> + <text:list-item> + <xsl:element name="text:p"> + <xsl:attribute name="text:style-name">VarList Term</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </text:list-item> + </xsl:if> + </xsl:template> + + <xsl:template match="listitem"> + <text:list-item> + <xsl:apply-templates/> + </text:list-item> + </xsl:template> <!-- end of lists--> - <xsl:template match="menuchoice"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="guimenuitem"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">GuiMenuItem</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="guibutton"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">GuiButton</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="guisubmenu"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="emphasis"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">Emphasis</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - - <xsl:template match="guimenu"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">GuiMenu</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="guisubmenu"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - - <xsl:template match="guilabel"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">GuiLabel</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="guibutton"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">GuiButton</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="keycap"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">KeyCap</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - - <xsl:template match="keysym"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">KeySym</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - - <xsl:template match="keycombo"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">KeyCombo</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="command"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">Command</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="application"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">Application</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="filename"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">FileName</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="systemitem"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">SystemItem</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="computeroutput"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">ComputerOutput</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="inlinegraphic"> - <xsl:element name="draw:image"> - <xsl:attribute name="draw:style-name">fr1</xsl:attribute> - <xsl:attribute name="draw:name"></xsl:attribute> - <xsl:attribute name="text:anchor-type"></xsl:attribute> - <xsl:attribute name="draw:z-index"></xsl:attribute> - <xsl:attribute name="xlink:href"> - <xsl:value-of select="@fileref"/> - </xsl:attribute> - <xsl:attribute name="xlink:type"></xsl:attribute> - <xsl:attribute name="svg:width"> - <!--<xsl:value-of select="@width"/>--> - <xsl:text>1cm</xsl:text> - </xsl:attribute> - <xsl:attribute name="svg:height"> - <xsl:text>1cm</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:show"> - <xsl:text>embed</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:actuate"> - <xsl:text>onLoad</xsl:text> - </xsl:attribute> - <xsl:attribute name="draw:filter-name"> - <xsl:text disable-output-escaping="yes"><All formats></xsl:text> - </xsl:attribute> - </xsl:element> - </xsl:template> - - - <xsl:template match="footnote"> - <xsl:element name="text:footnote"> - <!--<xsl:element name="text:footnote-citation">Aidan</xsl:element>--> - <xsl:element name="text:footnote-body"> - <xsl:apply-templates/> - </xsl:element> - </xsl:element> - </xsl:template> - - <xsl:template match="highlight"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">Highlight</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="ulink"> - <xsl:element name="text:a"> - <xsl:attribute name="xlink:type"> - <xsl:text>simple</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:href"> - <xsl:value-of select="@url"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - - </xsl:template> - - <xsl:template match="link"> - <xsl:element name="text:a"> - <xsl:attribute name="xlink:type"> - <xsl:text>simple</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:href"> - <xsl:text>#</xsl:text> - <xsl:value-of select="@linkend"/> - <xsl:text>%7Cregion</xsl:text> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - - </xsl:template> - - <xsl:template match="olink"> - <xsl:element name="text:a"> - <xsl:attribute name="xlink:type"> - <xsl:text>simple</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:href"> - <xsl:value-of select="@targetdocent"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="note"> - <office:annotation> - <text:p> - <xsl:apply-templates/> - </text:p> - </office:annotation> - </xsl:template> - - <xsl:template match="imageobject"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="textobject"></xsl:template> - - <xsl:template match="caption"> - <xsl:apply-templates/> - </xsl:template> - - - <xsl:template match="imagedata"> - <xsl:element name="draw:image"> - <xsl:attribute name="draw:style-name">fr1</xsl:attribute> - <xsl:attribute name="draw:name"></xsl:attribute> - <xsl:attribute name="text:anchor-type"></xsl:attribute> - <xsl:attribute name="draw:z-index"></xsl:attribute> - <xsl:attribute name="xlink:href"> - <xsl:value-of select="@fileref"/> - </xsl:attribute> - <xsl:attribute name="xlink:type"></xsl:attribute> - <xsl:attribute name="svg:width"> - <!--<xsl:value-of select="@width"/>--> - <xsl:text>1cm</xsl:text> - </xsl:attribute> - <xsl:attribute name="svg:height"> - <xsl:text>1cm</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:show"> - <xsl:text>embed</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:actuate"> - <xsl:text>onLoad</xsl:text> - </xsl:attribute> - <xsl:attribute name="draw:filter-name"> - <xsl:text disable-output-escaping="yes"><All formats></xsl:text> - </xsl:attribute> - </xsl:element> - </xsl:template> - - <xsl:template match="audioobject"> - <xsl:element name="draw:plugin"> - <xsl:attribute name="draw:style-name">fr1</xsl:attribute> - <xsl:attribute name="draw:name"></xsl:attribute> - <xsl:attribute name="text:anchor-type"></xsl:attribute> - <xsl:attribute name="draw:z-index"></xsl:attribute> - <xsl:attribute name="xlink:href"> - <xsl:value-of select="@fileref"/> - </xsl:attribute> - <xsl:attribute name="xlink:type"></xsl:attribute> - <xsl:attribute name="svg:width"> - <!--<xsl:value-of select="@width"/>--> - <xsl:text>1cm</xsl:text> - </xsl:attribute> - <xsl:attribute name="svg:height"> - <xsl:text>1cm</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:show"> - <xsl:text>embed</xsl:text> - </xsl:attribute> - <xsl:attribute name="xlink:actuate"> - <xsl:text>onLoad</xsl:text> - </xsl:attribute> - <xsl:attribute name="draw:filter-name"> - <xsl:text disable-output-escaping="yes"><All formats></xsl:text> - </xsl:attribute> - </xsl:element> - </xsl:template> - - <xsl:template match="remark"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="mediaobject"> - <xsl:element name="text:p"> - <xsl:attribute name="text:style-name">Mediaobject</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="superscript"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">SuperScript</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="subscript"> - <xsl:element name="text:span"> - <xsl:attribute name="text:style-name">SubScript</xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="anchor"> - <xsl:element name="text:bookmark"> - <xsl:attribute name="text:name"><xsl:value-of select="@id"/></xsl:attribute> - </xsl:element> - </xsl:template> + <xsl:template match="menuchoice"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="guimenuitem"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">GuiMenuItem</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="guibutton"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">GuiButton</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="guisubmenu"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="emphasis"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">Emphasis</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + + <xsl:template match="guimenu"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">GuiMenu</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="guisubmenu"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + + <xsl:template match="guilabel"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">GuiLabel</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="guibutton"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">GuiButton</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="keycap"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">KeyCap</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + + <xsl:template match="keysym"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">KeySym</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + + <xsl:template match="keycombo"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">KeyCombo</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="command"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">Command</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="application"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">Application</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="filename"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">FileName</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="systemitem"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">SystemItem</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="computeroutput"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">ComputerOutput</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="inlinegraphic"> + <xsl:element name="draw:image"> + <xsl:attribute name="draw:style-name">fr1</xsl:attribute> + <xsl:attribute name="draw:name"></xsl:attribute> + <xsl:attribute name="text:anchor-type"></xsl:attribute> + <xsl:attribute name="draw:z-index"></xsl:attribute> + <xsl:attribute name="xlink:href"> + <xsl:value-of select="@fileref"/> + </xsl:attribute> + <xsl:attribute name="xlink:type"></xsl:attribute> + <xsl:attribute name="svg:width"> + <!--<xsl:value-of select="@width"/>--> + <xsl:text>1cm</xsl:text> + </xsl:attribute> + <xsl:attribute name="svg:height"> + <xsl:text>1cm</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:show"> + <xsl:text>embed</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:actuate"> + <xsl:text>onLoad</xsl:text> + </xsl:attribute> + <xsl:attribute name="draw:filter-name"> + <xsl:text disable-output-escaping="yes"><All formats></xsl:text> + </xsl:attribute> + </xsl:element> + </xsl:template> + + + <xsl:template match="footnote"> + <xsl:element name="text:footnote"> + <!--<xsl:element name="text:footnote-citation">Aidan</xsl:element>--> + <xsl:element name="text:footnote-body"> + <xsl:apply-templates/> + </xsl:element> + </xsl:element> + </xsl:template> + + <xsl:template match="highlight"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">Highlight</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="ulink"> + <xsl:element name="text:a"> + <xsl:attribute name="xlink:type"> + <xsl:text>simple</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:href"> + <xsl:value-of select="@url"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + + </xsl:template> + + <xsl:template match="link"> + <xsl:element name="text:a"> + <xsl:attribute name="xlink:type"> + <xsl:text>simple</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:href"> + <xsl:text>#</xsl:text> + <xsl:value-of select="@linkend"/> + <xsl:text>%7Cregion</xsl:text> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + + </xsl:template> + + <xsl:template match="olink"> + <xsl:element name="text:a"> + <xsl:attribute name="xlink:type"> + <xsl:text>simple</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:href"> + <xsl:value-of select="@targetdocent"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="note"> + <office:annotation> + <text:p> + <xsl:apply-templates/> + </text:p> + </office:annotation> + </xsl:template> + + <xsl:template match="imageobject"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="textobject"></xsl:template> + + <xsl:template match="caption"> + <xsl:apply-templates/> + </xsl:template> + + + <xsl:template match="imagedata"> + <xsl:element name="draw:image"> + <xsl:attribute name="draw:style-name">fr1</xsl:attribute> + <xsl:attribute name="draw:name"></xsl:attribute> + <xsl:attribute name="text:anchor-type"></xsl:attribute> + <xsl:attribute name="draw:z-index"></xsl:attribute> + <xsl:attribute name="xlink:href"> + <xsl:value-of select="@fileref"/> + </xsl:attribute> + <xsl:attribute name="xlink:type"></xsl:attribute> + <xsl:attribute name="svg:width"> + <!--<xsl:value-of select="@width"/>--> + <xsl:text>1cm</xsl:text> + </xsl:attribute> + <xsl:attribute name="svg:height"> + <xsl:text>1cm</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:show"> + <xsl:text>embed</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:actuate"> + <xsl:text>onLoad</xsl:text> + </xsl:attribute> + <xsl:attribute name="draw:filter-name"> + <xsl:text disable-output-escaping="yes"><All formats></xsl:text> + </xsl:attribute> + </xsl:element> + </xsl:template> + + <xsl:template match="audioobject"> + <xsl:element name="draw:plugin"> + <xsl:attribute name="draw:style-name">fr1</xsl:attribute> + <xsl:attribute name="draw:name"></xsl:attribute> + <xsl:attribute name="text:anchor-type"></xsl:attribute> + <xsl:attribute name="draw:z-index"></xsl:attribute> + <xsl:attribute name="xlink:href"> + <xsl:value-of select="@fileref"/> + </xsl:attribute> + <xsl:attribute name="xlink:type"></xsl:attribute> + <xsl:attribute name="svg:width"> + <!--<xsl:value-of select="@width"/>--> + <xsl:text>1cm</xsl:text> + </xsl:attribute> + <xsl:attribute name="svg:height"> + <xsl:text>1cm</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:show"> + <xsl:text>embed</xsl:text> + </xsl:attribute> + <xsl:attribute name="xlink:actuate"> + <xsl:text>onLoad</xsl:text> + </xsl:attribute> + <xsl:attribute name="draw:filter-name"> + <xsl:text disable-output-escaping="yes"><All formats></xsl:text> + </xsl:attribute> + </xsl:element> + </xsl:template> + + <xsl:template match="remark"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="mediaobject"> + <xsl:element name="text:p"> + <xsl:attribute name="text:style-name">Mediaobject</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="superscript"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">SuperScript</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="subscript"> + <xsl:element name="text:span"> + <xsl:attribute name="text:style-name">SubScript</xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="anchor"> + <xsl:element name="text:bookmark"> + <xsl:attribute name="text:name"><xsl:value-of select="@id"/></xsl:attribute> + </xsl:element> + </xsl:template> <!-- Change Made By Kevin Fowlks (fowlks@msu.edu) July 2nd, 2003 --> - <xsl:template match="example"> - <xsl:element name="text:p"> - <xsl:attribute name="text:style-name">Example</xsl:attribute> - <xsl:value-of select="programlisting"/> - </xsl:element> - </xsl:template> + <xsl:template match="example"> + <xsl:element name="text:p"> + <xsl:attribute name="text:style-name">Example</xsl:attribute> + <xsl:value-of select="programlisting"/> + </xsl:element> + </xsl:template> </xsl:stylesheet>
\ No newline at end of file diff --git a/filter/source/docbook/sofftodocbookheadings.xsl b/filter/source/docbook/sofftodocbookheadings.xsl index 1b6c4973bf76..a1e8ff0c7374 100644 --- a/filter/source/docbook/sofftodocbookheadings.xsl +++ b/filter/source/docbook/sofftodocbookheadings.xsl @@ -17,122 +17,122 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> <xsl:stylesheet version="1.0" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:office="http://openoffice.org/2000/office" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:config="http://openoffice.org/2001/config" office:class="text" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="office meta table number dc fo xlink chart math script xsl draw svg dr3d form config text style"> - <xsl:output method="xml" indent="yes" omit-xml-declaration="no" version="1.0" encoding="UTF-8" doctype-public="-//OASIS//DTD DocBook XML V4.1.2//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> - - - <!-- Heading will be mapped to sections. - In OpenDocument headings are not nested, they do not embrace their related content, the XML hierarchy has to be restructured. - - Example of OpenDocument content: - - <office:body> - <text:h text:style-name="Heading 1" text:level="1">Heading 1</text:h> - <text:p text:style-name="Text body">Heading 1 Content</text:p> - <text:h text:style-name="Heading 2" text:level="2">Heading 2</text:h> - <text:p text:style-name="Text body">Heading 2 Content</text:p> - <office:body> - - Example of DocBook content: - - <article lang="en-US"> - <sect1> - <title>Heading 1</title> - <para>Heading 1 Content</para> - <sect2> - <title>Heading 2</title> - <para>Heading 2 Content</para> - </sect2> - </sect1> - </article> - --> - - <!-- The key function "nestedContent" returns all ODF elements that are children of the current heading (i.e. text:h) or their parent office:body in case there is no text:h. - It works by matching all ODF elements, that text:h refer to (it's sibling or office:body childring) - Various keyed element sets of these matched elements are being generated. A set is identified by having the same last (closest) preceding text:h or if none existent the parent document. - All those elements, that have the current heading as last preceding heading (text:h) are returned as a nodeset. - --> - <xsl:key name="nestedContent" - match="text:p | table:table | text:span | text:ordered-list | office:annotation | text:unordered-list | text:footnote | text:a | text:list-item | draw:plugin | draw:text-box | text:footnote-body | text:section" - use="generate-id((.. | preceding::text:h)[last()])"/> - - <!-- The key function "nestedHeadings" returns a nodeset of all heading (text:h) elements, which belong to this heading (follow and have a higher outline number than the current text:h, which ID is given to the function) --> - <xsl:key name="nestedHeadings" - match="text:h" - use="generate-id(preceding::text:h[@text:level < current()/@text:level][1])"/> - - <!-- The key function "getHeadingsByOutline" returns all headings of a certain outline level --> - <xsl:key name="getHeadingsByOutline" - match="text:h" - use="@text:level"/> - - <!-- A further problem during mapping of Heading to sections is the quantity of levels. In OpenDocument there can exist more than 4 hierarchies (outline levels). - Furthermore an OpenDocument have not to start with heading outline level 1 nor does a outline level 2 have to follow. - Therefore all possible existing heading outline levels from 1 to 10 have to be mapped to the section1 to section4 in DocBook. - The lowest outline number is mapped section1, second is section2... until fourth and higher are all mapped to section4 --> - - <!-- Each global variable hold the outline level which has been mapped to one of the four sections in DocBook --> - <xsl:variable name="section1_OutlineLevel"> - <xsl:call-template name="findOutlineLevel"> - <xsl:with-param name="candidateOutlineLevel" select="1"/> - </xsl:call-template> - </xsl:variable> - <xsl:variable name="section2_OutlineLevel"> - <xsl:call-template name="findOutlineLevel"> - <xsl:with-param name="candidateOutlineLevel" select="$section1_OutlineLevel + 1"/> - </xsl:call-template> - </xsl:variable> - <xsl:variable name="section3_OutlineLevel"> - <xsl:call-template name="findOutlineLevel"> - <xsl:with-param name="candidateOutlineLevel" select="$section2_OutlineLevel + 1"/> - </xsl:call-template> - </xsl:variable> - <xsl:variable name="section4_OutlineLevel"> - <xsl:call-template name="findOutlineLevel"> - <xsl:with-param name="candidateOutlineLevel" select="$section3_OutlineLevel + 1"/> - </xsl:call-template> - </xsl:variable> - - <!-- get the minimum available heading outline level (usually '1') --> - <xsl:template name="findOutlineLevel"> - <xsl:param name="candidateOutlineLevel"/> - <xsl:choose> - <xsl:when test="key('getHeadingsByOutline', $candidateOutlineLevel)[1]/@text:level != ''"> - <xsl:value-of select="$candidateOutlineLevel"/> - </xsl:when> - <xsl:otherwise> - <xsl:if test="$candidateOutlineLevel < 11"> - <xsl:call-template name="findOutlineLevel"> - <xsl:with-param name="candidateOutlineLevel" select="$candidateOutlineLevel + 1"/> - </xsl:call-template> - </xsl:if> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - <!-- START --> - <xsl:template match="/*"> - <xsl:element name="article"> - <xsl:attribute name="lang"> - <xsl:value-of select="/*/office:meta/dc:language"/> - </xsl:attribute> + <xsl:output method="xml" indent="yes" omit-xml-declaration="no" version="1.0" encoding="UTF-8" doctype-public="-//OASIS//DTD DocBook XML V4.1.2//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> + + + <!-- Heading will be mapped to sections. + In OpenDocument headings are not nested, they do not embrace their related content, the XML hierarchy has to be restructured. + + Example of OpenDocument content: + + <office:body> + <text:h text:style-name="Heading 1" text:level="1">Heading 1</text:h> + <text:p text:style-name="Text body">Heading 1 Content</text:p> + <text:h text:style-name="Heading 2" text:level="2">Heading 2</text:h> + <text:p text:style-name="Text body">Heading 2 Content</text:p> + <office:body> + + Example of DocBook content: + + <article lang="en-US"> + <sect1> + <title>Heading 1</title> + <para>Heading 1 Content</para> + <sect2> + <title>Heading 2</title> + <para>Heading 2 Content</para> + </sect2> + </sect1> + </article> + --> + + <!-- The key function "nestedContent" returns all ODF elements that are children of the current heading (i.e. text:h) or their parent office:body in case there is no text:h. + It works by matching all ODF elements, that text:h refer to (it's sibling or office:body childring) + Various keyed element sets of these matched elements are being generated. A set is identified by having the same last (closest) preceding text:h or if none existent the parent document. + All those elements, that have the current heading as last preceding heading (text:h) are returned as a nodeset. + --> + <xsl:key name="nestedContent" + match="text:p | table:table | text:span | text:ordered-list | office:annotation | text:unordered-list | text:footnote | text:a | text:list-item | draw:plugin | draw:text-box | text:footnote-body | text:section" + use="generate-id((.. | preceding::text:h)[last()])"/> + + <!-- The key function "nestedHeadings" returns a nodeset of all heading (text:h) elements, which belong to this heading (follow and have a higher outline number than the current text:h, which ID is given to the function) --> + <xsl:key name="nestedHeadings" + match="text:h" + use="generate-id(preceding::text:h[@text:level < current()/@text:level][1])"/> + + <!-- The key function "getHeadingsByOutline" returns all headings of a certain outline level --> + <xsl:key name="getHeadingsByOutline" + match="text:h" + use="@text:level"/> + + <!-- A further problem during mapping of Heading to sections is the quantity of levels. In OpenDocument there can exist more than 4 hierarchies (outline levels). + Furthermore an OpenDocument have not to start with heading outline level 1 nor does a outline level 2 have to follow. + Therefore all possible existing heading outline levels from 1 to 10 have to be mapped to the section1 to section4 in DocBook. + The lowest outline number is mapped section1, second is section2... until fourth and higher are all mapped to section4 --> + + <!-- Each global variable hold the outline level which has been mapped to one of the four sections in DocBook --> + <xsl:variable name="section1_OutlineLevel"> + <xsl:call-template name="findOutlineLevel"> + <xsl:with-param name="candidateOutlineLevel" select="1"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="section2_OutlineLevel"> + <xsl:call-template name="findOutlineLevel"> + <xsl:with-param name="candidateOutlineLevel" select="$section1_OutlineLevel + 1"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="section3_OutlineLevel"> + <xsl:call-template name="findOutlineLevel"> + <xsl:with-param name="candidateOutlineLevel" select="$section2_OutlineLevel + 1"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="section4_OutlineLevel"> + <xsl:call-template name="findOutlineLevel"> + <xsl:with-param name="candidateOutlineLevel" select="$section3_OutlineLevel + 1"/> + </xsl:call-template> + </xsl:variable> + + <!-- get the minimum available heading outline level (usually '1') --> + <xsl:template name="findOutlineLevel"> + <xsl:param name="candidateOutlineLevel"/> + <xsl:choose> + <xsl:when test="key('getHeadingsByOutline', $candidateOutlineLevel)[1]/@text:level != ''"> + <xsl:value-of select="$candidateOutlineLevel"/> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$candidateOutlineLevel < 11"> + <xsl:call-template name="findOutlineLevel"> + <xsl:with-param name="candidateOutlineLevel" select="$candidateOutlineLevel + 1"/> + </xsl:call-template> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + + <!-- START --> + <xsl:template match="/*"> + <xsl:element name="article"> + <xsl:attribute name="lang"> + <xsl:value-of select="/*/office:meta/dc:language"/> + </xsl:attribute> <!-- page style header --> <xsl:call-template name="page-style"> <xsl:with-param name="area" select="'header'"/> - </xsl:call-template> - <xsl:apply-templates select="office:body"/> + </xsl:call-template> + <xsl:apply-templates select="office:body"/> <!-- page style footer --> <xsl:call-template name="page-style"/> - </xsl:element> - </xsl:template> - - + </xsl:element> + </xsl:template> + + <xsl:key match="style:master-page" name="styleMasterPage" use="@style:name" /> <!-- using a simple heuristic for "standard" page-style heading/footer from page styles --> <xsl:template name="page-style"> <xsl:param name="area"/> - - <xsl:variable name="defaultPageStyle" select="key('styleMasterPage', 'Standard')"/> + + <xsl:variable name="defaultPageStyle" select="key('styleMasterPage', 'Standard')"/> <xsl:choose> <xsl:when test="$area = 'header'"> <xsl:apply-templates select="$defaultPageStyle/style:header/*"/> @@ -141,19 +141,19 @@ <xsl:apply-templates select="$defaultPageStyle/style:footer/*"/> </xsl:otherwise> </xsl:choose> - + </xsl:template> - <xsl:template match="office:body"> - <!-- here all children of office:body before the first heading are matched --> - <xsl:apply-templates select="key('nestedContent', generate-id())"/> - <!-- have to be descendant as text:h can be in a list:item in some list --> - <xsl:variable name="firstHeading" select="descendant::text:h[1]"/> - <!-- changing the context node from office:body to text:h as required for used key functions --> - <xsl:for-each select="descendant::text:h[@text:level=$section1_OutlineLevel][1]"> - <!-- if the first heading is not of the section1 level --> - <xsl:if test="generate-id(.) != generate-id($firstHeading)"> - <!-- create an anonymous section1 and embrace all headings preceding the first real existent section1 --> + <xsl:template match="office:body"> + <!-- here all children of office:body before the first heading are matched --> + <xsl:apply-templates select="key('nestedContent', generate-id())"/> + <!-- have to be descendant as text:h can be in a list:item in some list --> + <xsl:variable name="firstHeading" select="descendant::text:h[1]"/> + <!-- changing the context node from office:body to text:h as required for used key functions --> + <xsl:for-each select="descendant::text:h[@text:level=$section1_OutlineLevel][1]"> + <!-- if the first heading is not of the section1 level --> + <xsl:if test="generate-id(.) != generate-id($firstHeading)"> + <!-- create an anonymous section1 and embrace all headings preceding the first real existent section1 --> <xsl:element name="sect1"> <title></title> <!-- create sections for all the first section1 preluding headings --> @@ -168,70 +168,70 @@ </xsl:call-template> </xsl:for-each> </xsl:element> - </xsl:if> - </xsl:for-each> - <!-- match all headings, which are mapped to section1 to create a nested section structure used in docbook (see first comment after copyright) --> - <xsl:apply-templates mode="recreateStructure" select="descendant::text:h[@text:level = $section1_OutlineLevel]"/> - </xsl:template> - - <xsl:template match="text:h" mode="recreateStructure"> - <!-- relate the current ODF outline level of the heading to one of the four docbook section levels--> - <xsl:variable name="currentSectionLevel"> - <xsl:call-template name="getSectionLevel"> - <xsl:with-param name="outlineLevel" select="@text:level"/> - </xsl:call-template> - </xsl:variable> - <xsl:choose> - <!-- heading with outline level 1 might be an Abstract --> - <xsl:when test="$currentSectionLevel = 1"> - <xsl:choose> - <!-- when the content of a level 1 heading is 'Abstract' the <abstract> docbook element is used instead of <section1> --> - <xsl:when test=".='Abstract'"> - <abstract> - <xsl:apply-templates select="key('nestedContent', generate-id())"/> - <xsl:apply-templates select="key('nestedHeadings', generate-id())" mode="recreateStructure"/> - </abstract> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="make-section"> - <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/> - <xsl:with-param name="previousSectionLevel" select="$currentSectionLevel"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:variable name="previousHeading" select="preceding::text:h[@text:level < current()/@text:level][1]"/> - <xsl:choose> - <xsl:when test="$previousHeading/@text:level != ''"> - <xsl:call-template name="make-section"> - <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/> - <xsl:with-param name="previousSectionLevel"> - <xsl:call-template name="getSectionLevel"> - <xsl:with-param name="outlineLevel" select="$previousHeading/@text:level"/> - </xsl:call-template> - </xsl:with-param> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="make-section"> - <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/> - <xsl:with-param name="previousSectionLevel" select="$currentSectionLevel"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - <xsl:template match="text:bookmark | text:bookmark-start"> - <xsl:element name="anchor"> - <xsl:attribute name="id"> - <!-- ID have to be an NCName which have to start with a letter or '_' - in case of the frequent starting number a '_' will be added as prefix --> - <xsl:choose> - <xsl:when test="(starts-with(@text:name, '0') or - starts-with(@text:name, '1') or + </xsl:if> + </xsl:for-each> + <!-- match all headings, which are mapped to section1 to create a nested section structure used in docbook (see first comment after copyright) --> + <xsl:apply-templates mode="recreateStructure" select="descendant::text:h[@text:level = $section1_OutlineLevel]"/> + </xsl:template> + + <xsl:template match="text:h" mode="recreateStructure"> + <!-- relate the current ODF outline level of the heading to one of the four docbook section levels--> + <xsl:variable name="currentSectionLevel"> + <xsl:call-template name="getSectionLevel"> + <xsl:with-param name="outlineLevel" select="@text:level"/> + </xsl:call-template> + </xsl:variable> + <xsl:choose> + <!-- heading with outline level 1 might be an Abstract --> + <xsl:when test="$currentSectionLevel = 1"> + <xsl:choose> + <!-- when the content of a level 1 heading is 'Abstract' the <abstract> docbook element is used instead of <section1> --> + <xsl:when test=".='Abstract'"> + <abstract> + <xsl:apply-templates select="key('nestedContent', generate-id())"/> + <xsl:apply-templates select="key('nestedHeadings', generate-id())" mode="recreateStructure"/> + </abstract> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="make-section"> + <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/> + <xsl:with-param name="previousSectionLevel" select="$currentSectionLevel"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="previousHeading" select="preceding::text:h[@text:level < current()/@text:level][1]"/> + <xsl:choose> + <xsl:when test="$previousHeading/@text:level != ''"> + <xsl:call-template name="make-section"> + <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/> + <xsl:with-param name="previousSectionLevel"> + <xsl:call-template name="getSectionLevel"> + <xsl:with-param name="outlineLevel" select="$previousHeading/@text:level"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="make-section"> + <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/> + <xsl:with-param name="previousSectionLevel" select="$currentSectionLevel"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="text:bookmark | text:bookmark-start"> + <xsl:element name="anchor"> + <xsl:attribute name="id"> + <!-- ID have to be an NCName which have to start with a letter or '_' + in case of the frequent starting number a '_' will be added as prefix --> + <xsl:choose> + <xsl:when test="(starts-with(@text:name, '0') or + starts-with(@text:name, '1') or starts-with(@text:name, '2') or starts-with(@text:name, '3') or starts-with(@text:name, '4') or @@ -240,35 +240,35 @@ starts-with(@text:name, '7') or starts-with(@text:name, '8') or starts-with(@text:name, '9'))"> - <xsl:value-of select="concat('_', @text:name)"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="@text:name"/> - </xsl:otherwise> - </xsl:choose> - </xsl:attribute> - </xsl:element> - </xsl:template> - - <xsl:template name="getSectionLevel"> - <xsl:param name="outlineLevel"/> - <xsl:choose> - <xsl:when test="$outlineLevel = $section1_OutlineLevel">1</xsl:when> - <xsl:when test="$outlineLevel = $section2_OutlineLevel">2</xsl:when> - <xsl:when test="$outlineLevel = $section3_OutlineLevel">3</xsl:when> - <xsl:otherwise>4</xsl:otherwise> - </xsl:choose> - </xsl:template> - - <!-- make-section creates the nested section hierarchy and - in case the difference between the parent section and the new section is higher than one - a section is inserted to keep the output format valid --> - <xsl:template name="make-section"> - <xsl:param name="currentSectionLevel"/> - <xsl:param name="previousSectionLevel"/> - <xsl:choose> - <!-- empty title as it is an empty section between two headings with an outline level difference higher than 1 --> - <xsl:when test="$currentSectionLevel > $previousSectionLevel+1"> + <xsl:value-of select="concat('_', @text:name)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@text:name"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:element> + </xsl:template> + + <xsl:template name="getSectionLevel"> + <xsl:param name="outlineLevel"/> + <xsl:choose> + <xsl:when test="$outlineLevel = $section1_OutlineLevel">1</xsl:when> + <xsl:when test="$outlineLevel = $section2_OutlineLevel">2</xsl:when> + <xsl:when test="$outlineLevel = $section3_OutlineLevel">3</xsl:when> + <xsl:otherwise>4</xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- make-section creates the nested section hierarchy and + in case the difference between the parent section and the new section is higher than one + a section is inserted to keep the output format valid --> + <xsl:template name="make-section"> + <xsl:param name="currentSectionLevel"/> + <xsl:param name="previousSectionLevel"/> + <xsl:choose> + <!-- empty title as it is an empty section between two headings with an outline level difference higher than 1 --> + <xsl:when test="$currentSectionLevel > $previousSectionLevel+1"> <xsl:element name="{concat('sect', $previousSectionLevel + 1)}"> <title></title> <xsl:call-template name="make-section"> @@ -276,8 +276,8 @@ <xsl:with-param name="previousSectionLevel" select="$previousSectionLevel +1"/> </xsl:call-template> </xsl:element> - </xsl:when> - <xsl:otherwise> + </xsl:when> + <xsl:otherwise> <xsl:element name="{concat('sect', $currentSectionLevel)}"> <title> <xsl:apply-templates/> @@ -285,868 +285,868 @@ <xsl:apply-templates select="key('nestedContent', generate-id())"/> <xsl:apply-templates select="key('nestedHeadings', generate-id())" mode="recreateStructure"/> </xsl:element> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - <xsl:template match="office:meta"> - <!--<xsl:apply-templates/>--></xsl:template> - - <xsl:template match="meta:editing-cycles"></xsl:template> - - <xsl:template match="meta:user-defined"></xsl:template> - - <xsl:template match="meta:editing-duration"></xsl:template> - - <xsl:template match="dc:language"></xsl:template> - - <xsl:template match="dc:date"> - <!--<pubdate> - <xsl:value-of select="substring-before(.,'T')"/> - </pubdate>--></xsl:template> - - <xsl:template match="meta:creation-date"></xsl:template> - - <xsl:template match="office:styles"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="office:script"></xsl:template> - - - <xsl:template match="office:settings"></xsl:template> - - <xsl:template match="office:font-decls"></xsl:template> - - <xsl:template match="text:section"> - <xsl:choose> - <xsl:when test="@text:name='ArticleInfo'"> - <articleinfo> - <title> - <xsl:value-of select="text:p[@text:style-name='Document Title']"/> - </title> - <subtitle> - <xsl:value-of select="text:p[@text:style-name='Document SubTitle']"/> - </subtitle> - <edition> - <xsl:value-of select="text:p/text:variable-set[@text:name='articleinfo.edition']"/> - </edition> - <xsl:for-each select="text:p/text:variable-set[substring-after(@text:name,'articleinfo.releaseinfo')]"> - <releaseinfo> - <xsl:value-of select="."/> - </releaseinfo> - </xsl:for-each> - <xsl:call-template name="ArticleInfo"> - <xsl:with-param name="level" select="0"/> - </xsl:call-template> - </articleinfo> - </xsl:when> - <xsl:when test="@text:name='Abstract'"> - <abstract> - <xsl:apply-templates/> - </abstract> - </xsl:when> - <xsl:when test="@text:name='Appendix'"> - <appendix> - <xsl:apply-templates/> - </appendix> - </xsl:when> - <xsl:otherwise> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + + <xsl:template match="office:meta"> + <!--<xsl:apply-templates/>--></xsl:template> + + <xsl:template match="meta:editing-cycles"></xsl:template> + + <xsl:template match="meta:user-defined"></xsl:template> + + <xsl:template match="meta:editing-duration"></xsl:template> + + <xsl:template match="dc:language"></xsl:template> + + <xsl:template match="dc:date"> + <!--<pubdate> + <xsl:value-of select="substring-before(.,'T')"/> + </pubdate>--></xsl:template> + + <xsl:template match="meta:creation-date"></xsl:template> + + <xsl:template match="office:styles"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="office:script"></xsl:template> + + + <xsl:template match="office:settings"></xsl:template> + + <xsl:template match="office:font-decls"></xsl:template> + + <xsl:template match="text:section"> + <xsl:choose> + <xsl:when test="@text:name='ArticleInfo'"> + <articleinfo> + <title> + <xsl:value-of select="text:p[@text:style-name='Document Title']"/> + </title> + <subtitle> + <xsl:value-of select="text:p[@text:style-name='Document SubTitle']"/> + </subtitle> + <edition> + <xsl:value-of select="text:p/text:variable-set[@text:name='articleinfo.edition']"/> + </edition> + <xsl:for-each select="text:p/text:variable-set[substring-after(@text:name,'articleinfo.releaseinfo')]"> + <releaseinfo> + <xsl:value-of select="."/> + </releaseinfo> + </xsl:for-each> + <xsl:call-template name="ArticleInfo"> + <xsl:with-param name="level" select="0"/> + </xsl:call-template> + </articleinfo> + </xsl:when> + <xsl:when test="@text:name='Abstract'"> + <abstract> + <xsl:apply-templates/> + </abstract> + </xsl:when> + <xsl:when test="@text:name='Appendix'"> + <appendix> + <xsl:apply-templates/> + </appendix> + </xsl:when> + <xsl:otherwise> <xsl:element name="{concat('sect', count(ancestor::text:section) + 1)}"> <xsl:attribute name="id"> <xsl:value-of select="@text:name"/> </xsl:attribute> <xsl:apply-templates/> </xsl:element> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - <xsl:template name="ArticleInfo"> - <xsl:param name="level"/> - <xsl:variable name="author"> - <xsl:value-of select="concat('articleinfo.author_','', $level)"/> - </xsl:variable> - <xsl:if test="text:p/text:variable-set[contains(@text:name, $author )]"> - <xsl:call-template name="Author"> - <xsl:with-param name="AuthorLevel" select="0"/> - </xsl:call-template> - <xsl:call-template name="Copyright"> - <xsl:with-param name="CopyrightLevel" select="0"/> - </xsl:call-template> - </xsl:if> - </xsl:template> - - <xsl:template name="Copyright"> - <xsl:param name="CopyrightLevel"/> - - <xsl:variable name="Copyright"> - <xsl:value-of select="concat('articleinfo.copyright_','', $CopyrightLevel)"/> - </xsl:variable> - - <xsl:if test="text:p/text:variable-set[contains(@text:name,$Copyright)]"> - <copyright> - <xsl:call-template name="Year"> - <xsl:with-param name="CopyrightLevel" select="$CopyrightLevel"/> - <xsl:with-param name="YearlLevel" select="0"/> - </xsl:call-template> - <xsl:call-template name="Holder"> - <xsl:with-param name="CopyrightLevel" select="$CopyrightLevel"/> - <xsl:with-param name="HolderlLevel" select="0"/> - - </xsl:call-template> - </copyright> - </xsl:if> - </xsl:template> - - - <xsl:template name="Year"> - <xsl:param name="CopyrightLevel"/> - <xsl:param name="YearLevel"/> - <xsl:variable name="Copyright"> - <xsl:value-of select="concat('articleinfo.copyright_','', $CopyrightLevel)"/> - </xsl:variable> - <xsl:variable name="Year"> - <xsl:value-of select="concat($Copyright,'',concat('.year_','',$YearLevel))"/> - </xsl:variable> - - <xsl:if test="text:p/text:variable-set[@text:name=$Year]"> - <orgname> - <xsl:value-of select="text:p/text:variable-set[@text:name=$Year]"/> - </orgname> - </xsl:if> - </xsl:template> - - - <xsl:template name="Holder"> - <xsl:param name="CopyrightLevel"/> - <xsl:param name="HolderLevel"/> - <xsl:variable name="Copyright"> - <xsl:value-of select="concat('articleinfo.copyright_','', $CopyrightLevel)"/> - </xsl:variable> - <xsl:variable name="Holder"> - <xsl:value-of select="concat($Copyright,'',concat('.holder_','',$HolderLevel))"/> - </xsl:variable> - - <xsl:if test="text:p/text:variable-set[@text:name=$Holder]"> - <orgname> - <xsl:value-of select="text:p/text:variable-set[@text:name=$Holder]"/> - </orgname> - </xsl:if> - </xsl:template> - - - - <xsl:template name="Author"> - <xsl:param name="AuthorLevel"/> - <xsl:variable name="Author"> - <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> - </xsl:variable> - <xsl:if test="text:p/text:variable-set[contains(@text:name, $Author )]"> - <author> - <xsl:call-template name="Surname"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> - <xsl:with-param name="SurnameLevel" select="0"/> - </xsl:call-template> - <xsl:call-template name="Firstname"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> - <xsl:with-param name="FirstnameLevel" select="0"/> - </xsl:call-template> - <xsl:call-template name="Affiliation"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> - <xsl:with-param name="AffilLevel" select="0"/> - </xsl:call-template> - </author> - <xsl:call-template name="Author"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel+1"/> - </xsl:call-template> - </xsl:if> - </xsl:template> - - - <xsl:template name="Surname"> - <xsl:param name="AuthorLevel"/> - <xsl:param name="SurnameLevel"/> - <xsl:variable name="Author"> - <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> - </xsl:variable> - <xsl:variable name="Surname"> - <xsl:value-of select="concat($Author,'',concat('.surname_','',$SurnameLevel))"/> - </xsl:variable> - <xsl:if test="text:p/text:variable-set[@text:name=$Surname]"> - <surname> - <xsl:value-of select="text:p/text:variable-set[@text:name=$Surname]"/> - </surname> - <xsl:call-template name="Surname"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> - <xsl:with-param name="SurnameLevel" select="SurnameLevel+1"/> - </xsl:call-template> - - </xsl:if> - </xsl:template> - - - - - <xsl:template name="Firstname"> - <xsl:param name="AuthorLevel"/> - <xsl:param name="FirstnameLevel"/> - <xsl:variable name="Author"> - <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> - </xsl:variable> - <xsl:variable name="Firstname"> - <xsl:value-of select="concat($Author,'',concat('.firstname_','',$FirstnameLevel))"/> - </xsl:variable> - <xsl:if test="text:p/text:variable-set[@text:name=$Firstname]"> - <firstname> - <xsl:value-of select="text:p/text:variable-set[@text:name=$Firstname]"/> - </firstname> - <xsl:call-template name="Surname"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> - <xsl:with-param name="FirstnameLevel" select="FirstnameLevel+1"/> - </xsl:call-template> - </xsl:if> - </xsl:template> - - - - <xsl:template name="Affiliation"> - <xsl:param name="AuthorLevel"/> - <xsl:param name="AffilLevel"/> - <xsl:variable name="Author"> - <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> - </xsl:variable> - <xsl:variable name="Affil"> - <xsl:value-of select="concat($Author,'',concat('.affiliation_','',$AffilLevel))"/> - </xsl:variable> - <xsl:if test="text:p/text:variable-set[contains(@text:name,$Affil)]"> - <affiliation> - <xsl:call-template name="Orgname"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> - <xsl:with-param name="AffilLevel" select="$AffilLevel"/> - <xsl:with-param name="OrgLevel" select="0"/> - </xsl:call-template> - <xsl:call-template name="Address"> - <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> - <xsl:with-param name="AffilLevel" select="$AffilLevel"/> - <xsl:with-param name="AddressLevel" select="0"/> - - </xsl:call-template> - </affiliation> - </xsl:if> - </xsl:template> - - <xsl:template name="Orgname"> - <xsl:param name="AuthorLevel"/> - <xsl:param name="AffilLevel"/> - <xsl:param name="OrgLevel"/> - - <xsl:variable name="Author"> - <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> - </xsl:variable> - <xsl:variable name="Affil"> - <xsl:value-of select="concat($Author,'',concat('.affiliation_','',$AffilLevel))"/> - </xsl:variable> - <xsl:variable name="Org"> - <xsl:value-of select="concat($Affil,'',concat('.orgname_','',$OrgLevel))"/> - </xsl:variable> - - <xsl:if test="text:p/text:variable-set[@text:name=$Org]"> - <orgname> - <xsl:value-of select="text:p/text:variable-set[@text:name=$Org]"/> - </orgname> - </xsl:if> - </xsl:template> - - <xsl:template name="Address"> - <xsl:param name="AuthorLevel"/> - <xsl:param name="AffilLevel"/> - <xsl:param name="AddressLevel"/> - - <xsl:variable name="Author"> - <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> - </xsl:variable> - <xsl:variable name="Affil"> - <xsl:value-of select="concat($Author,'',concat('.affiliation_','',$AffilLevel))"/> - </xsl:variable> - <xsl:variable name="Address"> - <xsl:value-of select="concat($Affil,'',concat('.address_','',$AddressLevel))"/> - </xsl:variable> - - <xsl:if test="text:p/text:variable-set[@text:name=$Address]"> - <address> - <xsl:value-of select="text:p/text:variable-set[@text:name=$Address]"/> - </address> - </xsl:if> - </xsl:template> - - - - - <xsl:template match="text:p[@text:style-name='Document Title']"></xsl:template> - - <xsl:template match="text:p[@text:style-name='Document SubTitle']"></xsl:template> - - - <xsl:template match="text:p[@text:style-name='Section Title']"> - <xsl:element name="title"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="text:p[@text:style-name='Appendix Title']"> - <xsl:element name="title"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="ArticleInfo"> + <xsl:param name="level"/> + <xsl:variable name="author"> + <xsl:value-of select="concat('articleinfo.author_','', $level)"/> + </xsl:variable> + <xsl:if test="text:p/text:variable-set[contains(@text:name, $author )]"> + <xsl:call-template name="Author"> + <xsl:with-param name="AuthorLevel" select="0"/> + </xsl:call-template> + <xsl:call-template name="Copyright"> + <xsl:with-param name="CopyrightLevel" select="0"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template name="Copyright"> + <xsl:param name="CopyrightLevel"/> + + <xsl:variable name="Copyright"> + <xsl:value-of select="concat('articleinfo.copyright_','', $CopyrightLevel)"/> + </xsl:variable> + + <xsl:if test="text:p/text:variable-set[contains(@text:name,$Copyright)]"> + <copyright> + <xsl:call-template name="Year"> + <xsl:with-param name="CopyrightLevel" select="$CopyrightLevel"/> + <xsl:with-param name="YearlLevel" select="0"/> + </xsl:call-template> + <xsl:call-template name="Holder"> + <xsl:with-param name="CopyrightLevel" select="$CopyrightLevel"/> + <xsl:with-param name="HolderlLevel" select="0"/> + + </xsl:call-template> + </copyright> + </xsl:if> + </xsl:template> + + + <xsl:template name="Year"> + <xsl:param name="CopyrightLevel"/> + <xsl:param name="YearLevel"/> + <xsl:variable name="Copyright"> + <xsl:value-of select="concat('articleinfo.copyright_','', $CopyrightLevel)"/> + </xsl:variable> + <xsl:variable name="Year"> + <xsl:value-of select="concat($Copyright,'',concat('.year_','',$YearLevel))"/> + </xsl:variable> + + <xsl:if test="text:p/text:variable-set[@text:name=$Year]"> + <orgname> + <xsl:value-of select="text:p/text:variable-set[@text:name=$Year]"/> + </orgname> + </xsl:if> + </xsl:template> + + + <xsl:template name="Holder"> + <xsl:param name="CopyrightLevel"/> + <xsl:param name="HolderLevel"/> + <xsl:variable name="Copyright"> + <xsl:value-of select="concat('articleinfo.copyright_','', $CopyrightLevel)"/> + </xsl:variable> + <xsl:variable name="Holder"> + <xsl:value-of select="concat($Copyright,'',concat('.holder_','',$HolderLevel))"/> + </xsl:variable> + + <xsl:if test="text:p/text:variable-set[@text:name=$Holder]"> + <orgname> + <xsl:value-of select="text:p/text:variable-set[@text:name=$Holder]"/> + </orgname> + </xsl:if> + </xsl:template> + + + + <xsl:template name="Author"> + <xsl:param name="AuthorLevel"/> + <xsl:variable name="Author"> + <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> + </xsl:variable> + <xsl:if test="text:p/text:variable-set[contains(@text:name, $Author )]"> + <author> + <xsl:call-template name="Surname"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> + <xsl:with-param name="SurnameLevel" select="0"/> + </xsl:call-template> + <xsl:call-template name="Firstname"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> + <xsl:with-param name="FirstnameLevel" select="0"/> + </xsl:call-template> + <xsl:call-template name="Affiliation"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> + <xsl:with-param name="AffilLevel" select="0"/> + </xsl:call-template> + </author> + <xsl:call-template name="Author"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel+1"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + + <xsl:template name="Surname"> + <xsl:param name="AuthorLevel"/> + <xsl:param name="SurnameLevel"/> + <xsl:variable name="Author"> + <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> + </xsl:variable> + <xsl:variable name="Surname"> + <xsl:value-of select="concat($Author,'',concat('.surname_','',$SurnameLevel))"/> + </xsl:variable> + <xsl:if test="text:p/text:variable-set[@text:name=$Surname]"> + <surname> + <xsl:value-of select="text:p/text:variable-set[@text:name=$Surname]"/> + </surname> + <xsl:call-template name="Surname"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> + <xsl:with-param name="SurnameLevel" select="SurnameLevel+1"/> + </xsl:call-template> + + </xsl:if> + </xsl:template> + + + + + <xsl:template name="Firstname"> + <xsl:param name="AuthorLevel"/> + <xsl:param name="FirstnameLevel"/> + <xsl:variable name="Author"> + <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> + </xsl:variable> + <xsl:variable name="Firstname"> + <xsl:value-of select="concat($Author,'',concat('.firstname_','',$FirstnameLevel))"/> + </xsl:variable> + <xsl:if test="text:p/text:variable-set[@text:name=$Firstname]"> + <firstname> + <xsl:value-of select="text:p/text:variable-set[@text:name=$Firstname]"/> + </firstname> + <xsl:call-template name="Surname"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> + <xsl:with-param name="FirstnameLevel" select="FirstnameLevel+1"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + + + <xsl:template name="Affiliation"> + <xsl:param name="AuthorLevel"/> + <xsl:param name="AffilLevel"/> + <xsl:variable name="Author"> + <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> + </xsl:variable> + <xsl:variable name="Affil"> + <xsl:value-of select="concat($Author,'',concat('.affiliation_','',$AffilLevel))"/> + </xsl:variable> + <xsl:if test="text:p/text:variable-set[contains(@text:name,$Affil)]"> + <affiliation> + <xsl:call-template name="Orgname"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> + <xsl:with-param name="AffilLevel" select="$AffilLevel"/> + <xsl:with-param name="OrgLevel" select="0"/> + </xsl:call-template> + <xsl:call-template name="Address"> + <xsl:with-param name="AuthorLevel" select="$AuthorLevel"/> + <xsl:with-param name="AffilLevel" select="$AffilLevel"/> + <xsl:with-param name="AddressLevel" select="0"/> + + </xsl:call-template> + </affiliation> + </xsl:if> + </xsl:template> + + <xsl:template name="Orgname"> + <xsl:param name="AuthorLevel"/> + <xsl:param name="AffilLevel"/> + <xsl:param name="OrgLevel"/> + + <xsl:variable name="Author"> + <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> + </xsl:variable> + <xsl:variable name="Affil"> + <xsl:value-of select="concat($Author,'',concat('.affiliation_','',$AffilLevel))"/> + </xsl:variable> + <xsl:variable name="Org"> + <xsl:value-of select="concat($Affil,'',concat('.orgname_','',$OrgLevel))"/> + </xsl:variable> + + <xsl:if test="text:p/text:variable-set[@text:name=$Org]"> + <orgname> + <xsl:value-of select="text:p/text:variable-set[@text:name=$Org]"/> + </orgname> + </xsl:if> + </xsl:template> + + <xsl:template name="Address"> + <xsl:param name="AuthorLevel"/> + <xsl:param name="AffilLevel"/> + <xsl:param name="AddressLevel"/> + + <xsl:variable name="Author"> + <xsl:value-of select="concat('articleinfo.author_','', $AuthorLevel)"/> + </xsl:variable> + <xsl:variable name="Affil"> + <xsl:value-of select="concat($Author,'',concat('.affiliation_','',$AffilLevel))"/> + </xsl:variable> + <xsl:variable name="Address"> + <xsl:value-of select="concat($Affil,'',concat('.address_','',$AddressLevel))"/> + </xsl:variable> + + <xsl:if test="text:p/text:variable-set[@text:name=$Address]"> + <address> + <xsl:value-of select="text:p/text:variable-set[@text:name=$Address]"/> + </address> + </xsl:if> + </xsl:template> + + + + + <xsl:template match="text:p[@text:style-name='Document Title']"></xsl:template> + + <xsl:template match="text:p[@text:style-name='Document SubTitle']"></xsl:template> + + + <xsl:template match="text:p[@text:style-name='Section Title']"> + <xsl:element name="title"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="text:p[@text:style-name='Appendix Title']"> + <xsl:element name="title"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> <!--<xsl:template match="text:p[@text:style-name='VarList Item']"> - <xsl:if test="not(preceding-sibling::text:p[@text:style-name='VarList Item'])"> - <xsl:text disable-output-escaping="yes"><listitem></xsl:text> - </xsl:if> - <para> - <xsl:apply-templates/> - </para> - <xsl:if test="not(following-sibling::text:p[@text:style-name='VarList Item'])"> - <xsl:text disable-output-escaping="yes"></listitem></xsl:text> - </xsl:if> + <xsl:if test="not(preceding-sibling::text:p[@text:style-name='VarList Item'])"> + <xsl:text disable-output-escaping="yes"><listitem></xsl:text> + </xsl:if> + <para> + <xsl:apply-templates/> + </para> + <xsl:if test="not(following-sibling::text:p[@text:style-name='VarList Item'])"> + <xsl:text disable-output-escaping="yes"></listitem></xsl:text> + </xsl:if> </xsl:template>--> - <xsl:template match="text:p[@text:style-name='Section1 Title']"> - <xsl:element name="title"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> + <xsl:template match="text:p[@text:style-name='Section1 Title']"> + <xsl:element name="title"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> - <xsl:template match="text:p[@text:style-name='Section2 Title']"> - <xsl:element name="title"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> + <xsl:template match="text:p[@text:style-name='Section2 Title']"> + <xsl:element name="title"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> - <xsl:template match="text:p[@text:style-name='Section3 Title']"> - <xsl:element name="title"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> + <xsl:template match="text:p[@text:style-name='Section3 Title']"> + <xsl:element name="title"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> - <xsl:template match="text:footnote-citation"></xsl:template> + <xsl:template match="text:footnote-citation"></xsl:template> - <xsl:template match="text:p[@text:style-name='Mediaobject']"> - <mediaobject> - <xsl:apply-templates/> - </mediaobject> - </xsl:template> + <xsl:template match="text:p[@text:style-name='Mediaobject']"> + <mediaobject> + <xsl:apply-templates/> + </mediaobject> + </xsl:template> - <xsl:template match="office:annotation/text:p"> - <note> - <remark> - <xsl:apply-templates/> - </remark> - </note> - </xsl:template> + <xsl:template match="office:annotation/text:p"> + <note> + <remark> + <xsl:apply-templates/> + </remark> + </note> + </xsl:template> <!--<xsl:template match="meta:initial-creator"> - <author> - <xsl:apply-templates /> - </author> + <author> + <xsl:apply-templates /> + </author> </xsl:template>--> - <xsl:template match="table:table"> - <xsl:choose> - <xsl:when test="following-sibling::text:p[@text:style-name='Table']"> - <table frame="all"> - <xsl:attribute name="id"> - <xsl:value-of select="@table:name"/> - </xsl:attribute> - <title> - <xsl:value-of select="following-sibling::text:p[@text:style-name='Table']"/> - </title> - <xsl:call-template name="generictable"/> - </table> - </xsl:when> - <xsl:otherwise> - <informaltable frame="all"> - <xsl:call-template name="generictable"/> - </informaltable> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - <xsl:template name="generictable"> - <xsl:variable name="cells" select="count(descendant::table:table-cell)"></xsl:variable> - <xsl:variable name="rows"> - <xsl:value-of select="count(descendant::table:table-row)"/> - </xsl:variable> - <xsl:variable name="cols"> - <xsl:value-of select="$cells div $rows"/> - </xsl:variable> - <xsl:variable name="numcols"> - <xsl:choose> - <xsl:when test="child::table:table-column/@table:number-columns-repeated"> - <xsl:value-of select="number(table:table-column/@table:number-columns-repeated+1)"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$cols"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:element name="tgroup"> - <xsl:attribute name="cols"> - <xsl:value-of select="$numcols"/> - </xsl:attribute> - <xsl:call-template name="colspec"> - <xsl:with-param name="left" select="1"/> - </xsl:call-template> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template name="colspec"> - <xsl:param name="left"/> - <xsl:if test="number($left < ( table:table-column/@table:number-columns-repeated +2) )"> - <xsl:element name="colspec"> - <xsl:attribute name="colnum"> - <xsl:value-of select="$left"/> - </xsl:attribute> - <xsl:attribute name="colname">c<xsl:value-of select="$left"/> - </xsl:attribute> - </xsl:element> - <xsl:call-template name="colspec"> - <xsl:with-param name="left" select="$left+1"/> - </xsl:call-template> - </xsl:if> - </xsl:template> - - <xsl:template match="table:table-column"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="table:table-header-rows"> - <thead> - <xsl:apply-templates/> - </thead> - </xsl:template> - - <xsl:template match="table:table-header-rows/table:table-row"> - <row> - <xsl:apply-templates/> - </row> - </xsl:template> - - <xsl:template match="table:table/table:table-row"> - <xsl:if test="not(preceding-sibling::table:table-row)"> - <xsl:text disable-output-escaping="yes"><tbody></xsl:text> - </xsl:if> - <row> - <xsl:apply-templates/> - </row> - <xsl:if test="not(following-sibling::table:table-row)"> - <xsl:text disable-output-escaping="yes"></tbody></xsl:text> - </xsl:if> - </xsl:template> - - <xsl:template match="table:table-cell"> - <xsl:element name="entry"> - <xsl:if test="@table:number-columns-spanned >'1'"> - <xsl:attribute name="namest"> - <xsl:value-of select="concat('c',count(preceding-sibling::table:table-cell[not(@table:number-columns-spanned)]) +sum(preceding-sibling::table:table-cell/@table:number-columns-spanned)+1)"/> - </xsl:attribute> - <xsl:attribute name="nameend"> - <xsl:value-of select="concat('c',count(preceding-sibling::table:table-cell[not(@table:number-columns-spanned)]) +sum(preceding-sibling::table:table-cell/@table:number-columns-spanned)+ @table:number-columns-spanned)"/> - </xsl:attribute> - </xsl:if> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="text:p"> - <xsl:choose> - <xsl:when test="@text:style-name='Table'"></xsl:when> - <xsl:otherwise> - <para> - <xsl:apply-templates/> - </para> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - <xsl:key match="text:list-style" name="getListStyle" use="@style:name"/> - - <xsl:template match="text:ordered-list"> - <xsl:param name="outlineLevel" select="1"/> - - <xsl:variable name="listStyle" select="key('getListStyle', @text:style-name)/*[@text:level = $outlineLevel]"/> - - <!-- if the list is not recognizable as a list (e.g. no indent, number/bullet, etc.) the list will be ignored --> - <xsl:if test="$listStyle/style:properties/@*"> - <orderedlist> - <xsl:apply-templates> - <xsl:with-param name="itemType" select="'listitem'"/> - <xsl:with-param name="outlineLevel" select="$outlineLevel + 1"/> - </xsl:apply-templates> - </orderedlist> - </xsl:if> - </xsl:template> - - <xsl:template match="text:unordered-list"> - <xsl:param name="outlineLevel" select="1"/> - - <xsl:variable name="listStyle" select="key('getListStyle', @text:style-name)/*[@text:level = $outlineLevel]"/> - <!-- if the list is not recognizable as a list (e.g. no indent, number/bullet, etc.) the list will be ignored --> - <xsl:if test="$listStyle/style:properties/@*"> - <xsl:choose> - <xsl:when test="@text:style-name='Var List'"> - <variablelist> - <xsl:apply-templates> - <xsl:with-param name="itemType" select="'varlist'"/> - <xsl:with-param name="outlineLevel" select="$outlineLevel + 1"/> - </xsl:apply-templates> - </variablelist> - </xsl:when> - <xsl:otherwise> - <itemizedlist> - <xsl:apply-templates> - <xsl:with-param name="itemType" select="'listitem'"/> - <xsl:with-param name="outlineLevel" select="$outlineLevel + 1"/> - </xsl:apply-templates> - </itemizedlist> - </xsl:otherwise> - </xsl:choose> - </xsl:if> - </xsl:template> - - <xsl:template match="text:list-item | text:list-header"> - <xsl:param name="listType"/> - <xsl:param name="outlineLevel"/> - - <xsl:choose> - <xsl:when test="$listType='Var List'"> - <xsl:element name="varlistentry"> - <xsl:apply-templates> - <xsl:with-param name="outlineLevel" select="$outlineLevel"/> - </xsl:apply-templates> - </xsl:element> - </xsl:when> - <xsl:otherwise> - <xsl:element name="listitem"> - <xsl:apply-templates> - <xsl:with-param name="outlineLevel" select="$outlineLevel"/> - </xsl:apply-templates> - </xsl:element> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - <xsl:template match="text:p[@text:style-name='VarList Term']"> - <xsl:element name="term"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="text:p[@text:style-name='VarList Item']"> - <xsl:element name="para"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <!-- text headings should only be matched once, when creating a nested docbook section structure, but might be as well become as part of a list a title --> - <xsl:template match="text:h"> - <title> - <xsl:apply-templates/> - </title> - </xsl:template> - - <xsl:template match="dc:title"></xsl:template> - - <xsl:template match="dc:description"> - <abstract> - <para> - <xsl:apply-templates/> - </para> - </abstract> - </xsl:template> - - <xsl:template match="dc:subject"></xsl:template> - - - <xsl:template match="meta:generator"></xsl:template> - - <xsl:template match="draw:plugin"> - <xsl:element name="audioobject"> - <xsl:attribute name="fileref"> - <xsl:value-of select="@xlink:href"/> - </xsl:attribute> - <xsl:attribute name="width"></xsl:attribute> - </xsl:element> - </xsl:template> - - <xsl:template match="text:footnote"> - <footnote> - <xsl:apply-templates/> - </footnote> - </xsl:template> - - <xsl:template match="text:footnote-body"> - <xsl:apply-templates/> - </xsl:template> - - - <xsl:template match="draw:text-box"></xsl:template> - - - - <xsl:template match="draw:image"> - <xsl:choose> - <xsl:when test="parent::text:p[@text:style-name='Mediaobject']"> - <xsl:element name="imageobject"> - <xsl:element name="imagedata"> - <xsl:attribute name="fileref"> - <xsl:value-of select="@xlink:href"/> - </xsl:attribute> - </xsl:element> - <xsl:element name="caption"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:element> - </xsl:when> - <xsl:otherwise> - <xsl:element name="inlinegraphic"> - <xsl:attribute name="fileref"> - <xsl:choose> - <xsl:when test="@xlink:href != ''"> - <xsl:value-of select="@xlink:href"/> - </xsl:when> - <xsl:otherwise> - <xsl:text>embedded:</xsl:text> - <xsl:value-of select="@draw:name"/> - </xsl:otherwise> - </xsl:choose> - </xsl:attribute> - <xsl:attribute name="width"> - <xsl:value-of select="@svg:width"/> - </xsl:attribute> - <xsl:attribute name="depth"> - <xsl:value-of select="@svg:height"/> - </xsl:attribute> - </xsl:element> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - <xsl:template match="text:span"> - <xsl:choose> - <xsl:when test="./@text:style-name='GuiMenu'"> - <xsl:element name="guimenu"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="./@text:style-name='GuiSubMenu'"> - <xsl:element name="guisubmenu"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='GuiMenuItem'"> - <xsl:element name="guimenuitem"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='GuiButton'"> - <xsl:element name="guibutton"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='GuiButton'"> - <xsl:element name="guibutton"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='GuiLabel'"> - <xsl:element name="guilabel"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='Emphasis'"> - <xsl:element name="emphasis"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='FileName'"> - <xsl:element name="filename"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='Application'"> - <xsl:element name="application"> - <xsl:value-of select="."/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='Command'"> - <command> - <xsl:apply-templates/> - </command> - </xsl:when> - <xsl:when test="@text:style-name='SubScript'"> - <subscript> - <xsl:apply-templates/> - </subscript> - </xsl:when> - <xsl:when test="@text:style-name='SuperScript'"> - <superscript> - <xsl:apply-templates/> - </superscript> - </xsl:when> - <xsl:when test="@text:style-name='SystemItem'"> - <systemitem> - <xsl:apply-templates/> - </systemitem> - </xsl:when> - <xsl:when test="@text:style-name='ComputerOutput'"> - <computeroutput> - <xsl:apply-templates/> - </computeroutput> - </xsl:when> - <xsl:when test="@text:style-name='Highlight'"> - <highlight> - <xsl:apply-templates/> - </highlight> - </xsl:when> - <xsl:when test="@text:style-name='KeyCap'"> - <keycap> - <xsl:apply-templates/> - </keycap> - </xsl:when> - <xsl:when test="@text:style-name='KeySym'"> - <xsl:element name="keysym"> - <xsl:apply-templates/> - </xsl:element> - </xsl:when> - <xsl:when test="@text:style-name='KeyCombo'"> - <keycombo> - <xsl:apply-templates/> - </keycombo> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - - </xsl:template> - - - <xsl:template match="text:a"> - <xsl:choose> - <xsl:when test="contains(@xlink:href,'://')"> - <xsl:element name="ulink"> - <xsl:attribute name="url"> - <xsl:value-of select="@xlink:href"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:when> - <xsl:when test="contains(@xlink:href,'mailto:')"> - <xsl:element name="ulink"> - <xsl:attribute name="url"> - <xsl:value-of select="@xlink:href"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:when> - <xsl:when test="not(contains(@xlink:href,'#'))"> - <xsl:element name="olink"> - <xsl:attribute name="targetdocent"> - <xsl:value-of select="@xlink:href"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:when> - <xsl:otherwise> - <xsl:variable name="linkvar" select="substring-after(@xlink:href,'#')"/> - <xsl:element name="link"> - <xsl:attribute name="linkend"> - <xsl:value-of select="substring-before($linkvar,'%')"/> - </xsl:attribute> - <xsl:apply-templates/> - </xsl:element> - </xsl:otherwise> - </xsl:choose> - </xsl:template> + <xsl:template match="table:table"> + <xsl:choose> + <xsl:when test="following-sibling::text:p[@text:style-name='Table']"> + <table frame="all"> + <xsl:attribute name="id"> + <xsl:value-of select="@table:name"/> + </xsl:attribute> + <title> + <xsl:value-of select="following-sibling::text:p[@text:style-name='Table']"/> + </title> + <xsl:call-template name="generictable"/> + </table> + </xsl:when> + <xsl:otherwise> + <informaltable frame="all"> + <xsl:call-template name="generictable"/> + </informaltable> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + + <xsl:template name="generictable"> + <xsl:variable name="cells" select="count(descendant::table:table-cell)"></xsl:variable> + <xsl:variable name="rows"> + <xsl:value-of select="count(descendant::table:table-row)"/> + </xsl:variable> + <xsl:variable name="cols"> + <xsl:value-of select="$cells div $rows"/> + </xsl:variable> + <xsl:variable name="numcols"> + <xsl:choose> + <xsl:when test="child::table:table-column/@table:number-columns-repeated"> + <xsl:value-of select="number(table:table-column/@table:number-columns-repeated+1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$cols"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:element name="tgroup"> + <xsl:attribute name="cols"> + <xsl:value-of select="$numcols"/> + </xsl:attribute> + <xsl:call-template name="colspec"> + <xsl:with-param name="left" select="1"/> + </xsl:call-template> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template name="colspec"> + <xsl:param name="left"/> + <xsl:if test="number($left < ( table:table-column/@table:number-columns-repeated +2) )"> + <xsl:element name="colspec"> + <xsl:attribute name="colnum"> + <xsl:value-of select="$left"/> + </xsl:attribute> + <xsl:attribute name="colname">c<xsl:value-of select="$left"/> + </xsl:attribute> + </xsl:element> + <xsl:call-template name="colspec"> + <xsl:with-param name="left" select="$left+1"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template match="table:table-column"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="table:table-header-rows"> + <thead> + <xsl:apply-templates/> + </thead> + </xsl:template> + + <xsl:template match="table:table-header-rows/table:table-row"> + <row> + <xsl:apply-templates/> + </row> + </xsl:template> + + <xsl:template match="table:table/table:table-row"> + <xsl:if test="not(preceding-sibling::table:table-row)"> + <xsl:text disable-output-escaping="yes"><tbody></xsl:text> + </xsl:if> + <row> + <xsl:apply-templates/> + </row> + <xsl:if test="not(following-sibling::table:table-row)"> + <xsl:text disable-output-escaping="yes"></tbody></xsl:text> + </xsl:if> + </xsl:template> + + <xsl:template match="table:table-cell"> + <xsl:element name="entry"> + <xsl:if test="@table:number-columns-spanned >'1'"> + <xsl:attribute name="namest"> + <xsl:value-of select="concat('c',count(preceding-sibling::table:table-cell[not(@table:number-columns-spanned)]) +sum(preceding-sibling::table:table-cell/@table:number-columns-spanned)+1)"/> + </xsl:attribute> + <xsl:attribute name="nameend"> + <xsl:value-of select="concat('c',count(preceding-sibling::table:table-cell[not(@table:number-columns-spanned)]) +sum(preceding-sibling::table:table-cell/@table:number-columns-spanned)+ @table:number-columns-spanned)"/> + </xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="text:p"> + <xsl:choose> + <xsl:when test="@text:style-name='Table'"></xsl:when> + <xsl:otherwise> + <para> + <xsl:apply-templates/> + </para> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:key match="text:list-style" name="getListStyle" use="@style:name"/> + + <xsl:template match="text:ordered-list"> + <xsl:param name="outlineLevel" select="1"/> + + <xsl:variable name="listStyle" select="key('getListStyle', @text:style-name)/*[@text:level = $outlineLevel]"/> + + <!-- if the list is not recognizable as a list (e.g. no indent, number/bullet, etc.) the list will be ignored --> + <xsl:if test="$listStyle/style:properties/@*"> + <orderedlist> + <xsl:apply-templates> + <xsl:with-param name="itemType" select="'listitem'"/> + <xsl:with-param name="outlineLevel" select="$outlineLevel + 1"/> + </xsl:apply-templates> + </orderedlist> + </xsl:if> + </xsl:template> + + <xsl:template match="text:unordered-list"> + <xsl:param name="outlineLevel" select="1"/> + + <xsl:variable name="listStyle" select="key('getListStyle', @text:style-name)/*[@text:level = $outlineLevel]"/> + <!-- if the list is not recognizable as a list (e.g. no indent, number/bullet, etc.) the list will be ignored --> + <xsl:if test="$listStyle/style:properties/@*"> + <xsl:choose> + <xsl:when test="@text:style-name='Var List'"> + <variablelist> + <xsl:apply-templates> + <xsl:with-param name="itemType" select="'varlist'"/> + <xsl:with-param name="outlineLevel" select="$outlineLevel + 1"/> + </xsl:apply-templates> + </variablelist> + </xsl:when> + <xsl:otherwise> + <itemizedlist> + <xsl:apply-templates> + <xsl:with-param name="itemType" select="'listitem'"/> + <xsl:with-param name="outlineLevel" select="$outlineLevel + 1"/> + </xsl:apply-templates> + </itemizedlist> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:template> + + <xsl:template match="text:list-item | text:list-header"> + <xsl:param name="listType"/> + <xsl:param name="outlineLevel"/> + + <xsl:choose> + <xsl:when test="$listType='Var List'"> + <xsl:element name="varlistentry"> + <xsl:apply-templates> + <xsl:with-param name="outlineLevel" select="$outlineLevel"/> + </xsl:apply-templates> + </xsl:element> + </xsl:when> + <xsl:otherwise> + <xsl:element name="listitem"> + <xsl:apply-templates> + <xsl:with-param name="outlineLevel" select="$outlineLevel"/> + </xsl:apply-templates> + </xsl:element> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="text:p[@text:style-name='VarList Term']"> + <xsl:element name="term"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="text:p[@text:style-name='VarList Item']"> + <xsl:element name="para"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <!-- text headings should only be matched once, when creating a nested docbook section structure, but might be as well become as part of a list a title --> + <xsl:template match="text:h"> + <title> + <xsl:apply-templates/> + </title> + </xsl:template> + + <xsl:template match="dc:title"></xsl:template> + + <xsl:template match="dc:description"> + <abstract> + <para> + <xsl:apply-templates/> + </para> + </abstract> + </xsl:template> + + <xsl:template match="dc:subject"></xsl:template> + + + <xsl:template match="meta:generator"></xsl:template> + + <xsl:template match="draw:plugin"> + <xsl:element name="audioobject"> + <xsl:attribute name="fileref"> + <xsl:value-of select="@xlink:href"/> + </xsl:attribute> + <xsl:attribute name="width"></xsl:attribute> + </xsl:element> + </xsl:template> + + <xsl:template match="text:footnote"> + <footnote> + <xsl:apply-templates/> + </footnote> + </xsl:template> + + <xsl:template match="text:footnote-body"> + <xsl:apply-templates/> + </xsl:template> + + + <xsl:template match="draw:text-box"></xsl:template> + + + + <xsl:template match="draw:image"> + <xsl:choose> + <xsl:when test="parent::text:p[@text:style-name='Mediaobject']"> + <xsl:element name="imageobject"> + <xsl:element name="imagedata"> + <xsl:attribute name="fileref"> + <xsl:value-of select="@xlink:href"/> + </xsl:attribute> + </xsl:element> + <xsl:element name="caption"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:element> + </xsl:when> + <xsl:otherwise> + <xsl:element name="inlinegraphic"> + <xsl:attribute name="fileref"> + <xsl:choose> + <xsl:when test="@xlink:href != ''"> + <xsl:value-of select="@xlink:href"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>embedded:</xsl:text> + <xsl:value-of select="@draw:name"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="width"> + <xsl:value-of select="@svg:width"/> + </xsl:attribute> + <xsl:attribute name="depth"> + <xsl:value-of select="@svg:height"/> + </xsl:attribute> + </xsl:element> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + + <xsl:template match="text:span"> + <xsl:choose> + <xsl:when test="./@text:style-name='GuiMenu'"> + <xsl:element name="guimenu"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="./@text:style-name='GuiSubMenu'"> + <xsl:element name="guisubmenu"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='GuiMenuItem'"> + <xsl:element name="guimenuitem"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='GuiButton'"> + <xsl:element name="guibutton"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='GuiButton'"> + <xsl:element name="guibutton"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='GuiLabel'"> + <xsl:element name="guilabel"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='Emphasis'"> + <xsl:element name="emphasis"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='FileName'"> + <xsl:element name="filename"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='Application'"> + <xsl:element name="application"> + <xsl:value-of select="."/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='Command'"> + <command> + <xsl:apply-templates/> + </command> + </xsl:when> + <xsl:when test="@text:style-name='SubScript'"> + <subscript> + <xsl:apply-templates/> + </subscript> + </xsl:when> + <xsl:when test="@text:style-name='SuperScript'"> + <superscript> + <xsl:apply-templates/> + </superscript> + </xsl:when> + <xsl:when test="@text:style-name='SystemItem'"> + <systemitem> + <xsl:apply-templates/> + </systemitem> + </xsl:when> + <xsl:when test="@text:style-name='ComputerOutput'"> + <computeroutput> + <xsl:apply-templates/> + </computeroutput> + </xsl:when> + <xsl:when test="@text:style-name='Highlight'"> + <highlight> + <xsl:apply-templates/> + </highlight> + </xsl:when> + <xsl:when test="@text:style-name='KeyCap'"> + <keycap> + <xsl:apply-templates/> + </keycap> + </xsl:when> + <xsl:when test="@text:style-name='KeySym'"> + <xsl:element name="keysym"> + <xsl:apply-templates/> + </xsl:element> + </xsl:when> + <xsl:when test="@text:style-name='KeyCombo'"> + <keycombo> + <xsl:apply-templates/> + </keycombo> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + + </xsl:template> + + + <xsl:template match="text:a"> + <xsl:choose> + <xsl:when test="contains(@xlink:href,'://')"> + <xsl:element name="ulink"> + <xsl:attribute name="url"> + <xsl:value-of select="@xlink:href"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:when> + <xsl:when test="contains(@xlink:href,'mailto:')"> + <xsl:element name="ulink"> + <xsl:attribute name="url"> + <xsl:value-of select="@xlink:href"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:when> + <xsl:when test="not(contains(@xlink:href,'#'))"> + <xsl:element name="olink"> + <xsl:attribute name="targetdocent"> + <xsl:value-of select="@xlink:href"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="linkvar" select="substring-after(@xlink:href,'#')"/> + <xsl:element name="link"> + <xsl:attribute name="linkend"> + <xsl:value-of select="substring-before($linkvar,'%')"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:otherwise> + </xsl:choose> + </xsl:template> <!-- - Change Made By Kevin Fowlks (fowlks@msu.edu) July 2nd, 2003 - This allows users to create example code in DocBook. + Change Made By Kevin Fowlks (fowlks@msu.edu) July 2nd, 2003 + This allows users to create example code in DocBook. - Note: This type of grouping could also be implemented for - <notes>,<literallayout>, <blockquote> or any other tag that requires text to be treated as blocked. + Note: This type of grouping could also be implemented for + <notes>,<literallayout>, <blockquote> or any other tag that requires text to be treated as blocked. --> - <xsl:template match="text:p[@text:style-name='Example']"> - <xsl:if test="not(preceding-sibling::*[1][self::text:p[@text:style-name='Example']])"> - <xsl:element name="example"> - <xsl:element name="title"></xsl:element> - <xsl:element name="programlisting"> - <xsl:value-of select="."/> - <xsl:text disable-output-escaping="no">
</xsl:text> - <xsl:apply-templates mode="in-list" select="following-sibling::*[1][self::text:p[@text:style-name='Example']]"/> - </xsl:element> - </xsl:element> - </xsl:if> - </xsl:template> - - <xsl:template match="text:p[@text:style-name='Example']" mode="in-list"> - <xsl:value-of select="."/> - <xsl:text disable-output-escaping="no">
</xsl:text> - <xsl:apply-templates mode="in-list" select="following-sibling::*[1][self::text:p[@text:style-name='Example']]"/> - </xsl:template> - - <!-- ****************** --> - <!-- *** Whitespace *** --> - <!-- ****************** --> - - <xsl:template match="text:s"> - <xsl:call-template name="write-breakable-whitespace"> - <xsl:with-param name="whitespaces" select="@text:c"/> - </xsl:call-template> - </xsl:template> - - - <!--write the number of 'whitespaces' --> - <xsl:template name="write-breakable-whitespace"> - <xsl:param name="whitespaces"/> - - <!--write two space chars as the normal white space character will be stripped - and the other is able to break --> - <xsl:text> </xsl:text> - <xsl:if test="$whitespaces >= 2"> - <xsl:call-template name="write-breakable-whitespace-2"> - <xsl:with-param name="whitespaces" select="$whitespaces - 1"/> - </xsl:call-template> - </xsl:if> - </xsl:template> - - - <!--write the number of 'whitespaces' --> - <xsl:template name="write-breakable-whitespace-2"> - <xsl:param name="whitespaces"/> - <!--write two space chars as the normal white space character will be stripped - and the other is able to break --> - <xsl:text> </xsl:text> - <xsl:if test="$whitespaces >= 2"> - <xsl:call-template name="write-breakable-whitespace"> - <xsl:with-param name="whitespaces" select="$whitespaces - 1"/> - </xsl:call-template> - </xsl:if> - </xsl:template> - - <xsl:template match="text:tab-stop"> - <xsl:call-template name="write-breakable-whitespace"> - <xsl:with-param name="whitespaces" select="8"/> - </xsl:call-template> - </xsl:template> + <xsl:template match="text:p[@text:style-name='Example']"> + <xsl:if test="not(preceding-sibling::*[1][self::text:p[@text:style-name='Example']])"> + <xsl:element name="example"> + <xsl:element name="title"></xsl:element> + <xsl:element name="programlisting"> + <xsl:value-of select="."/> + <xsl:text disable-output-escaping="no">
</xsl:text> + <xsl:apply-templates mode="in-list" select="following-sibling::*[1][self::text:p[@text:style-name='Example']]"/> + </xsl:element> + </xsl:element> + </xsl:if> + </xsl:template> + + <xsl:template match="text:p[@text:style-name='Example']" mode="in-list"> + <xsl:value-of select="."/> + <xsl:text disable-output-escaping="no">
</xsl:text> + <xsl:apply-templates mode="in-list" select="following-sibling::*[1][self::text:p[@text:style-name='Example']]"/> + </xsl:template> + + <!-- ****************** --> + <!-- *** Whitespace *** --> + <!-- ****************** --> + + <xsl:template match="text:s"> + <xsl:call-template name="write-breakable-whitespace"> + <xsl:with-param name="whitespaces" select="@text:c"/> + </xsl:call-template> + </xsl:template> + + + <!--write the number of 'whitespaces' --> + <xsl:template name="write-breakable-whitespace"> + <xsl:param name="whitespaces"/> + + <!--write two space chars as the normal white space character will be stripped + and the other is able to break --> + <xsl:text> </xsl:text> + <xsl:if test="$whitespaces >= 2"> + <xsl:call-template name="write-breakable-whitespace-2"> + <xsl:with-param name="whitespaces" select="$whitespaces - 1"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + + <!--write the number of 'whitespaces' --> + <xsl:template name="write-breakable-whitespace-2"> + <xsl:param name="whitespaces"/> + <!--write two space chars as the normal white space character will be stripped + and the other is able to break --> + <xsl:text> </xsl:text> + <xsl:if test="$whitespaces >= 2"> + <xsl:call-template name="write-breakable-whitespace"> + <xsl:with-param name="whitespaces" select="$whitespaces - 1"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template match="text:tab-stop"> + <xsl:call-template name="write-breakable-whitespace"> + <xsl:with-param name="whitespaces" select="8"/> + </xsl:call-template> + </xsl:template> </xsl:stylesheet> |