diff options
Diffstat (limited to 'xhtml2odt/xsl/styles')
| -rw-r--r-- | xhtml2odt/xsl/styles/automatic-styles.xsl | 388 | ||||
| -rw-r--r-- | xhtml2odt/xsl/styles/fonts.xsl | 62 | ||||
| -rw-r--r-- | xhtml2odt/xsl/styles/highlight.xsl | 152 | ||||
| -rw-r--r-- | xhtml2odt/xsl/styles/inline.xsl | 114 | ||||
| -rw-r--r-- | xhtml2odt/xsl/styles/main-styles.xsl | 435 | 
5 files changed, 1151 insertions, 0 deletions
| diff --git a/xhtml2odt/xsl/styles/automatic-styles.xsl b/xhtml2odt/xsl/styles/automatic-styles.xsl new file mode 100644 index 000000000..6c079be9d --- /dev/null +++ b/xhtml2odt/xsl/styles/automatic-styles.xsl @@ -0,0 +1,388 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + +    xhtml2odt - XHTML to ODT XML transformation. +    Copyright (C) 2009 Aurelien Bompard +    Inspired by the work on docbook2odt, by Roman Fordinal +    http://open.comsultia.com/docbook2odf/ + +    License: LGPL v2.1 or later <http://www.gnu.org/licenses/lgpl-2.1.html> + +    This library is free software; you can redistribute it and/or +    modify it under the terms of the GNU Lesser General Public +    License as published by the Free Software Foundation; either +    version 2.1 of the License, or (at your option) any later version. + +    This library is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +    Lesser General Public License for more details. + +    You should have received a copy of the GNU Lesser General Public +    License along with this library; if not, write to the Free Software +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +    MA  02110-1301  USA + +--> +<xsl:stylesheet +    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" +    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +    xmlns:dc="http://purl.org/dc/elements/1.1/" +    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" +    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" +    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" +    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" +    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +    xmlns:xlink="http://www.w3.org/1999/xlink" +    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" +    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" +    xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" +    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" +    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" +    xmlns:math="http://www.w3.org/1998/Math/MathML" +    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" +    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" +    xmlns:dom="http://www.w3.org/2001/xml-events" +    xmlns:xforms="http://www.w3.org/2002/xforms" +    xmlns:xsd="http://www.w3.org/2001/XMLSchema" +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +    xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" +    version="1.0"> + +<xsl:template name="autostyles"> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'big']) = 0"> +        <style:style style:name="big" style:family="text"> +            <style:text-properties fo:font-size="120%"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'left']) = 0"> +        <style:style style:name="left" style:family="paragraph" +                     style:parent-style-name="Text_20_body"> +            <style:paragraph-properties fo:text-align="left" +                                        style:justify-single-word="false"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'center']) = 0"> +        <style:style style:name="center" style:family="paragraph" +                     style:parent-style-name="Text_20_body"> +            <style:paragraph-properties fo:text-align="center" +                                        style:justify-single-word="false"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'right']) = 0"> +        <style:style style:name="right" style:family="paragraph" +                     style:parent-style-name="Text_20_body"> +            <style:paragraph-properties fo:text-align="right" +                                        style:justify-single-word="false"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'justify']) = 0"> +        <style:style style:name="justify" style:family="paragraph" +                     style:parent-style-name="Text_20_body"> +            <style:paragraph-properties fo:text-align="justify" +                                        style:justify-single-word="false"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'emphasis']) = 0"> +        <style:style style:name="emphasis" style:family="text"> +            <style:text-properties fo:font-style="italic"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'image-center']) = 0"> +    <style:style style:name="image-center" style:family="graphic" +                 style:parent-style-name="Graphics"> +        <style:graphic-properties style:wrap="none" +                                  style:horizontal-pos="center" +                                  style:horizontal-rel="paragraph"/> +    </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'image-inline']) = 0"> +        <style:style style:name="image-inline" style:family="graphic" +                     style:parent-style-name="Graphics"> +            <style:graphic-properties style:vertical-pos="middle" +                                      style:vertical-rel="text"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'image-left']) = 0"> +        <style:style style:name="image-left" style:family="graphic" +                     style:parent-style-name="Graphics"> +            <style:graphic-properties style:wrap="right" style:vertical-pos="top" +                                      style:vertical-rel="paragraph-content" +                                      style:horizontal-pos="left" +                                      style:horizontal-rel="paragraph" +                                      style:flow-with-text="true"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'image-right']) = 0"> +        <style:style style:name="image-right" style:family="graphic" +                     style:parent-style-name="Graphics"> +            <style:graphic-properties style:wrap="left" style:vertical-pos="top" +                                      style:vertical-rel="paragraph-content" +                                      style:horizontal-pos="right" +                                      style:horizontal-rel="paragraph" +                                      style:flow-with-text="true"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'list-item-bullet']) = 0"> +        <style:style style:name="list-item-bullet" style:family="paragraph" +                     style:parent-style-name="Text_20_body" +                     style:list-style-name="List_20_1"/> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'list-item-number']) = 0"> +        <style:style style:name="list-item-number" style:family="paragraph" +                     style:parent-style-name="Text_20_body" +                     style:list-style-name="Numbering_20_1"/> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'small']) = 0"> +        <style:style style:name="small" style:family="text"> +            <style:text-properties fo:font-size="80%"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'strike']) = 0"> +        <style:style style:name="strike" style:family="text"> +            <style:text-properties style:text-line-through-style="solid"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'strong']) = 0"> +        <style:style style:name="strong" style:family="text"> +            <style:text-properties fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'sub']) = 0"> +        <style:style style:name="sub" style:family="text"> +             <style:text-properties style:text-position="sub 58%"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'sup']) = 0"> +        <style:style style:name="sup" style:family="text"> +             <style:text-properties style:text-position="super 58%"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-A1']) = 0"> +        <style:style style:name="table-default.cell-A1" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.03cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.01cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-A2']) = 0"> +        <style:style style:name="table-default.cell-A2" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.03cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="none" +                                         fo:border-bottom="0.01cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-A3']) = 0"> +        <style:style style:name="table-default.cell-A3" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.03cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="none" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-A4']) = 0"> +        <style:style style:name="table-default.cell-A4" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.03cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-B1']) = 0"> +        <style:style style:name="table-default.cell-B1" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.01cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-B2']) = 0"> +        <style:style style:name="table-default.cell-B2" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="none" +                                         fo:border-bottom="0.01cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-B3']) = 0"> +        <style:style style:name="table-default.cell-B3" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="none" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-B4']) = 0"> +        <style:style style:name="table-default.cell-B4" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-C1']) = 0"> +        <style:style style:name="table-default.cell-C1" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="0.03cm solid #000000" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.01cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-C2']) = 0"> +        <style:style style:name="table-default.cell-C2" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="0.03cm solid #000000" +                                         fo:border-top="none" +                                         fo:border-bottom="0.01cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-C3']) = 0"> +        <style:style style:name="table-default.cell-C3" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="0.03cm solid #000000" +                                         fo:border-top="none" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-C4']) = 0"> +        <style:style style:name="table-default.cell-C4" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="0.03cm solid #000000" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-F-A3']) = 0"> +        <style:style style:name="table-default.cell-F-A3" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.03cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-F-B3']) = 0"> +        <style:style style:name="table-default.cell-F-B3" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-F-C3']) = 0"> +        <style:style style:name="table-default.cell-F-C3" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="0.03cm solid #000000" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-H-A1']) = 0"> +        <style:style style:name="table-default.cell-H-A1" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.03cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-H-B1']) = 0"> +        <style:style style:name="table-default.cell-H-B1" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="none" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-H-C1']) = 0"> +        <style:style style:name="table-default.cell-H-C1" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.01cm solid #000000" +                                         fo:border-right="0.03cm solid #000000" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default.cell-single']) = 0"> +        <style:style style:name="table-default.cell-single" style:family="table-cell"> +            <style:table-cell-properties fo:padding="0.05cm" +                                         fo:border-left="0.03cm solid #000000" +                                         fo:border-right="0.03cm solid #000000" +                                         fo:border-top="0.03cm solid #000000" +                                         fo:border-bottom="0.03cm solid #000000"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'table-default']) = 0"> +        <style:style style:name="table-default" style:family="table"> +            <style:table-properties style:width="100%" table:align="margins"/> +        </style:style> +    </xsl:if> + + +<!-- Specific --> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'underline']) = 0"> +        <style:style style:name="underline" style:family="text"> +            <style:text-properties style:text-underline-style="solid" +                                   style:text-underline-width="auto" +                                   style:text-underline-color="font-color"/> +        </style:style> +    </xsl:if> + +</xsl:template> + +</xsl:stylesheet> diff --git a/xhtml2odt/xsl/styles/fonts.xsl b/xhtml2odt/xsl/styles/fonts.xsl new file mode 100644 index 000000000..31bd2ea96 --- /dev/null +++ b/xhtml2odt/xsl/styles/fonts.xsl @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + +    xhtml2odt - XHTML to ODT XML transformation. +    Copyright (C) 2009 Aurelien Bompard +    Inspired by the work on docbook2odt, by Roman Fordinal +    http://open.comsultia.com/docbook2odf/ + +    License: LGPL v2.1 or later <http://www.gnu.org/licenses/lgpl-2.1.html> + +    This library is free software; you can redistribute it and/or +    modify it under the terms of the GNU Lesser General Public +    License as published by the Free Software Foundation; either +    version 2.1 of the License, or (at your option) any later version. + +    This library is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +    Lesser General Public License for more details. + +    You should have received a copy of the GNU Lesser General Public +    License along with this library; if not, write to the Free Software +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +    MA  02110-1301  USA + +--> +<xsl:stylesheet +    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" +    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +    xmlns:dc="http://purl.org/dc/elements/1.1/" +    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" +    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" +    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" +    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" +    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +    xmlns:xlink="http://www.w3.org/1999/xlink" +    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" +    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" +    xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" +    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" +    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" +    xmlns:math="http://www.w3.org/1998/Math/MathML" +    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" +    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" +    xmlns:dom="http://www.w3.org/2001/xml-events" +    xmlns:xforms="http://www.w3.org/2002/xforms" +    xmlns:xsd="http://www.w3.org/2001/XMLSchema" +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +    xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" +    version="1.0"> + +<xsl:template name="fonts"> + +    <xsl:if test="count(//office:font-face-decls/style:font-face[@style:name = 'DejaVu Sans Mono']) = 0"> +        <style:font-face style:name="DejaVu Sans Mono" +                         svg:font-family="'DejaVu Sans Mono'" +                         style:font-family-generic="modern" style:font-pitch="fixed"/> +    </xsl:if> + +</xsl:template> + +</xsl:stylesheet> diff --git a/xhtml2odt/xsl/styles/highlight.xsl b/xhtml2odt/xsl/styles/highlight.xsl new file mode 100644 index 000000000..46e4d2627 --- /dev/null +++ b/xhtml2odt/xsl/styles/highlight.xsl @@ -0,0 +1,152 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + +    xhtml2odt - XHTML to ODT XML transformation. +    Copyright (C) 2009 Aurelien Bompard +    Inspired by the work on docbook2odt, by Roman Fordinal +    http://open.comsultia.com/docbook2odf/ + +    License: LGPL v2.1 or later <http://www.gnu.org/licenses/lgpl-2.1.html> + +    This library is free software; you can redistribute it and/or +    modify it under the terms of the GNU Lesser General Public +    License as published by the Free Software Foundation; either +    version 2.1 of the License, or (at your option) any later version. + +    This library is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +    Lesser General Public License for more details. + +    You should have received a copy of the GNU Lesser General Public +    License along with this library; if not, write to the Free Software +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +    MA  02110-1301  USA + +--> +<xsl:stylesheet +    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" +    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +    xmlns:dc="http://purl.org/dc/elements/1.1/" +    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" +    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" +    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" +    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" +    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +    xmlns:xlink="http://www.w3.org/1999/xlink" +    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" +    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" +    xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" +    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" +    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" +    xmlns:math="http://www.w3.org/1998/Math/MathML" +    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" +    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" +    xmlns:dom="http://www.w3.org/2001/xml-events" +    xmlns:xforms="http://www.w3.org/2002/xforms" +    xmlns:xsd="http://www.w3.org/2001/XMLSchema" +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +    xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" +    version="1.0"> + +<xsl:template name="highlight"> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.class']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.class']) > 0"> +        <style:style style:name="syntax-highlight.class" style:family="text"> +            <style:text-properties fo:color="#445588" +                                   fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.function']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.function']) > 0"> +        <style:style style:name="syntax-highlight.function" style:family="text"> +            <style:text-properties fo:color="#990000" +                                   fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.tag']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.tag']) > 0"> +        <style:style style:name="syntax-highlight.tag" style:family="text"> +            <style:text-properties fo:color="#000080"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.attr']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.attr']) > 0"> +        <style:style style:name="syntax-highlight.attr" style:family="text"> +            <style:text-properties fo:color="#008080"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.builtin']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.builtin']) > 0"> +        <style:style style:name="syntax-highlight.builtin" style:family="text"> +            <style:text-properties fo:color="#999999"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.namespace']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.namespace']) > 0"> +        <style:style style:name="syntax-highlight.namespace" style:family="text"> +            <style:text-properties fo:color="#555555"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.exception']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.exception']) > 0"> +        <style:style style:name="syntax-highlight.exception" style:family="text"> +            <style:text-properties fo:color="#990000" +                                   fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.var']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.var']) > 0"> +        <style:style style:name="syntax-highlight.var" style:family="text"> +            <style:text-properties fo:color="#009999"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.builtin.pseudo']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.builtin.pseudo']) > 0"> +        <style:style style:name="syntax-highlight.builtin.pseudo" style:family="text"> +            <style:text-properties fo:color="#999999"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.string']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.string']) > 0"> +        <style:style style:name="syntax-highlight.string" style:family="text"> +            <style:text-properties fo:color="#bb8844"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.number']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.number']) > 0"> +        <style:style style:name="syntax-highlight.number" style:family="text"> +            <style:text-properties fo:color="#009999"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.comment']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.comment']) > 0"> +        <style:style style:name="syntax-highlight.comment" style:family="text"> +            <style:text-properties fo:color="#999988" +                                   fo:font-style="italic"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:automatic-styles/style:style[@style:name = 'syntax-highlight.error']) = 0 +                  and count(//*[@text:style-name='syntax-highlight.error']) > 0"> +        <style:style style:name="syntax-highlight.error" style:family="text"> +            <style:text-properties fo:color="#a61717" +                                   fo:background-color="#e3d2d2"/> +        </style:style> +    </xsl:if> + +</xsl:template> + +</xsl:stylesheet> diff --git a/xhtml2odt/xsl/styles/inline.xsl b/xhtml2odt/xsl/styles/inline.xsl new file mode 100644 index 000000000..c000259e1 --- /dev/null +++ b/xhtml2odt/xsl/styles/inline.xsl @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + +    xhtml2odt - XHTML to ODT XML transformation. +    Copyright (C) 2009 Aurelien Bompard +    Inspired by the work on docbook2odt, by Roman Fordinal +    http://open.comsultia.com/docbook2odf/ + +    License: LGPL v2.1 or later <http://www.gnu.org/licenses/lgpl-2.1.html> + +    This library is free software; you can redistribute it and/or +    modify it under the terms of the GNU Lesser General Public +    License as published by the Free Software Foundation; either +    version 2.1 of the License, or (at your option) any later version. + +    This library is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +    Lesser General Public License for more details. + +    You should have received a copy of the GNU Lesser General Public +    License along with this library; if not, write to the Free Software +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +    MA  02110-1301  USA + +--> +<xsl:stylesheet +    xmlns:h="http://www.w3.org/1999/xhtml" +    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" +    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +    xmlns:dc="http://purl.org/dc/elements/1.1/" +    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" +    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" +    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" +    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" +    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +    xmlns:xlink="http://www.w3.org/1999/xlink" +    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" +    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" +    xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" +    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" +    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" +    xmlns:math="http://www.w3.org/1998/Math/MathML" +    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" +    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" +    xmlns:dom="http://www.w3.org/2001/xml-events" +    xmlns:xforms="http://www.w3.org/2002/xforms" +    xmlns:xsd="http://www.w3.org/2001/XMLSchema" +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +    xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" +    version="1.0"> + +<!-- +     Create a specific automatic-style for each <span> tag with a style +     attribute. +     Parse the CSS values in the style attribute and convert them verbatim to +     ODT XML. Luckily, the propreties are very often identical in name and +     syntax. If not, they will be silently ignored by the application, so it's +     not a big deal. +--> + +<xsl:template name="inline"> + +    <xsl:for-each select="//h:span[@style]"> +        <style:style style:family="text"> +            <xsl:attribute name="style:name"> +                <xsl:value-of select="concat('inline-style.', generate-id(.))"/> +            </xsl:attribute> +            <style:text-properties> +                <xsl:call-template name="css.style.multi"> +                    <xsl:with-param name="style" select="@style"/> +                </xsl:call-template> +            </style:text-properties> +        </style:style> +    </xsl:for-each> + +</xsl:template> + +<!-- pass the content of the style attribute to this template, it will split +     the CSS properties --> +<xsl:template name="css.style.multi"> +    <xsl:param name="style"/> +    <xsl:choose> +        <xsl:when test="contains($style, ';')"> +            <xsl:call-template name="css.style.multi"> +                <xsl:with-param name="style" select="substring-before($style, ';')"/> +            </xsl:call-template> +            <xsl:call-template name="css.style.multi"> +                <xsl:with-param name="style" select="substring-after($style, ';')"/> +            </xsl:call-template> +        </xsl:when> +        <xsl:otherwise> +            <xsl:call-template name="css.style.single"> +                <xsl:with-param name="name" select="substring-before($style, ':')"/> +                <xsl:with-param name="value" select="substring-after($style, ':')"/> +            </xsl:call-template> +        </xsl:otherwise> +    </xsl:choose> +</xsl:template> + +<!-- pass the individual CSS properties to this template, it will create the +     ODT XML style attributes --> +<xsl:template name="css.style.single"> +    <xsl:param name="name"/> +    <xsl:param name="value"/> +    <xsl:if test="translate($name,' ','') != '' and +                  translate($value,' ','') != ''"> +        <xsl:attribute name="{concat('fo:',translate($name,' ',''))}"> +            <xsl:value-of select="translate($value,' ','')"/> +        </xsl:attribute> +    </xsl:if> +</xsl:template> + +</xsl:stylesheet> diff --git a/xhtml2odt/xsl/styles/main-styles.xsl b/xhtml2odt/xsl/styles/main-styles.xsl new file mode 100644 index 000000000..7ebd3c9c4 --- /dev/null +++ b/xhtml2odt/xsl/styles/main-styles.xsl @@ -0,0 +1,435 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + +    xhtml2odt - XHTML to ODT XML transformation. +    Copyright (C) 2009 Aurelien Bompard +    Inspired by the work on docbook2odt, by Roman Fordinal +    http://open.comsultia.com/docbook2odf/ + +    License: LGPL v2.1 or later <http://www.gnu.org/licenses/lgpl-2.1.html> + +    This library is free software; you can redistribute it and/or +    modify it under the terms of the GNU Lesser General Public +    License as published by the Free Software Foundation; either +    version 2.1 of the License, or (at your option) any later version. + +    This library is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +    Lesser General Public License for more details. + +    You should have received a copy of the GNU Lesser General Public +    License along with this library; if not, write to the Free Software +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +    MA  02110-1301  USA + +--> +<xsl:stylesheet +    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" +    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +    xmlns:dc="http://purl.org/dc/elements/1.1/" +    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" +    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" +    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" +    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" +    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +    xmlns:xlink="http://www.w3.org/1999/xlink" +    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" +    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" +    xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" +    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" +    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" +    xmlns:math="http://www.w3.org/1998/Math/MathML" +    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" +    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" +    xmlns:dom="http://www.w3.org/2001/xml-events" +    xmlns:xforms="http://www.w3.org/2002/xforms" +    xmlns:xsd="http://www.w3.org/2001/XMLSchema" +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +    xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" +    version="1.0"> + +<xsl:template name="mainstyles"> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Caption']) = 0"> +        <style:style style:name="Caption" style:display-name="Caption" style:class="extra" +                     style:family="paragraph" style:parent-style-name="Standard"> +            <style:paragraph-properties fo:margin-top="0.2cm" fo:margin-bottom="0.2cm" +                                        text:number-lines="false" text:line-number="0"/> +            <style:text-properties fo:font-size="95%" fo:font-style="italic"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Citation']) = 0"> +        <style:style style:name="Citation" style:display-name="Citation" style:family="text"> +            <style:text-properties fo:font-style="italic"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Footnote']) = 0"> +        <style:style style:name="Footnote" style:display-name="Footnote" +                     style:family="paragraph" style:class="extra" +                     style:parent-style-name="Standard"> +            <style:paragraph-properties fo:margin-left="0.5cm" fo:margin-right="0cm" +                   fo:text-indent="-0.5cm" style:auto-text-indent="false" +                   text:number-lines="false" text:line-number="0"/> +            <style:text-properties fo:font-size="10pt"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Heading_20_1']) = 0"> +        <style:style style:name="Heading_20_1" style:display-name="Heading 1" +                      style:family="paragraph" style:parent-style-name="Heading" +                      style:next-style-name="Text_20_body" style:class="text" +                      style:default-outline-level="1"> +            <style:text-properties fo:font-size="115%" fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Heading_20_2']) = 0"> +        <style:style style:name="Heading_20_2" style:display-name="Heading 2" +                      style:family="paragraph" style:parent-style-name="Heading" +                      style:next-style-name="Text_20_body" style:class="text" +                      style:default-outline-level="2"> +            <style:text-properties fo:font-size="110%" fo:font-weight="bold" +                                   fo:font-style="italic"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Heading_20_3']) = 0"> +        <style:style style:name="Heading_20_3" style:display-name="Heading 3" +                      style:family="paragraph" style:parent-style-name="Heading" +                      style:next-style-name="Text_20_body" style:class="text" +                      style:default-outline-level="3"> +            <style:text-properties fo:font-size="105%" fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Heading_20_4']) = 0"> +        <style:style style:name="Heading_20_4" style:display-name="Heading 4" +                      style:family="paragraph" style:parent-style-name="Heading" +                      style:next-style-name="Text_20_body" style:class="text" +                      style:default-outline-level="4"> +            <style:text-properties fo:font-size="100%" fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Heading_20_5']) = 0"> +        <style:style style:name="Heading_20_5" style:display-name="Heading 5" +                      style:family="paragraph" style:parent-style-name="Heading" +                      style:next-style-name="Text_20_body" style:class="text" +                      style:default-outline-level="5"> +            <style:text-properties fo:font-size="100%" fo:font-style="italic"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Heading_20_6']) = 0"> +        <style:style style:name="Heading_20_6" style:display-name="Heading 6" +                      style:family="paragraph" style:parent-style-name="Heading" +                      style:next-style-name="Text_20_body" style:class="text" +                      style:default-outline-level="6"> +            <style:text-properties fo:font-size="90%" fo:font-weight="bold" +                                   style:text-underline-style="solid" +                                   style:text-underline-width="auto" +                                   style:text-underline-color="font-color"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Horizontal_20_Line']) = 0"> +        <style:style style:name="Horizontal_20_Line" style:display-name="Horizontal Line" +                     style:family="paragraph" style:parent-style-name="Standard" +                     style:next-style-name="Text_20_body" style:class="html"> +            <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.5cm" +                         style:border-line-width-bottom="0.002cm 0.035cm 0.002cm" +                         fo:padding="0cm" fo:border-left="none" fo:border-right="none" +                         fo:border-top="none" fo:border-bottom="0.04cm double #808080" +                         text:number-lines="false" text:line-number="0" +                         style:join-border="false"/> +            <style:text-properties fo:font-size="6pt"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'List_20_1']) = 0"> +        <text:list-style style:name="List_20_1" style:display-name="List 1"> +            <text:list-level-style-bullet text:level="1" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="•"> +                <style:list-level-properties +                    text:space-before="0.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="2" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="◦"> +                <style:list-level-properties +                    text:space-before="1cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="3" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="▪"> +                <style:list-level-properties +                    text:space-before="1.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="4" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="•"> +                <style:list-level-properties +                    text:space-before="2cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="5" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="◦"> +                <style:list-level-properties +                    text:space-before="2.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="6" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="▪"> +                <style:list-level-properties +                    text:space-before="3cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="7" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="•"> +                <style:list-level-properties +                    text:space-before="3.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="8" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="◦"> +                <style:list-level-properties +                    text:space-before="4cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="9" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="▪"> +                <style:list-level-properties +                    text:space-before="4.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +            <text:list-level-style-bullet text:level="10" +                    text:style-name="Bullet_20_Symbols" +                    text:bullet-char="•"> +                <style:list-level-properties +                    text:space-before="5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-bullet> +        </text:list-style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Numbering_20_1']) = 0"> +        <text:list-style style:name="Numbering_20_1" style:display-name="Numbering 1"> +            <text:list-level-style-number text:level="1" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="0.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="2" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="1cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="3" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="1.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="4" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="2cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="5" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="2.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="6" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="3cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="7" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="3.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="8" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="4cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="9" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="4.5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +            <text:list-level-style-number text:level="10" +                    text:style-name="Numbering_20_Symbols" +                    style:num-suffix="." +                    style:num-format="1"> +                <style:list-level-properties +                    text:space-before="5cm" +                    text:min-label-width="0.5cm"/> +            </text:list-level-style-number> +        </text:list-style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Definition_20_Term']) = 0"> +        <style:style style:name="Definition_20_Term" +                     style:display-name="Definition Term" style:family="paragraph" +                     style:parent-style-name="Text_20_body" style:class="html"> +            <style:text-properties fo:font-weight="bold"/> +            <style:paragraph-properties fo:margin-bottom="0cm"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Definition_20_Description']) = 0"> +        <style:style style:name="Definition_20_Description" +                     style:display-name="Definition Description" style:family="paragraph" +                     style:parent-style-name="Text_20_body" style:class="html"> +            <style:paragraph-properties fo:margin-top="0cm" fo:margin-left="1cm" +                                        fo:margin-bottom="0.2cm"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Preformatted_20_Text']) = 0"> +        <style:style style:name="Preformatted_20_Text" +                     style:display-name="Preformatted Text" style:family="paragraph" +                     style:parent-style-name="Standard" style:class="html"> +            <style:paragraph-properties fo:margin-left="1cm" fo:margin-right="1cm" +                                        fo:margin-top="0cm" fo:margin-bottom="0cm"/> +            <style:text-properties style:font-name="DejaVu Sans Mono" +                                   fo:font-size="9pt"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Source_20_Code']) = 0"> +        <style:style style:name="Source_20_Code" +                     style:display-name="Source Code" style:family="paragraph" +                     style:parent-style-name="Preformatted_20_Text"> +            <style:paragraph-properties fo:padding="0.05cm" style:shadow="none" +                                        fo:border="0.002cm solid #c0c0c0"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Source_20_Code_20_Numbered']) = 0"> +        <style:style style:name="Source_20_Code_20_Numbered" +                     style:display-name="Source Code Numbered" style:family="paragraph" +                     style:list-style-name="Numbering_20_1" +                     style:parent-style-name="Source_20_Code"> +            <style:paragraph-properties text:number-lines="true" text:line-number="1"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Quotations']) = 0"> +        <style:style style:name="Quotations" style:family="paragraph" +                     style:display-name="Quotations" +                     style:parent-style-name="Standard" style:class="html"> +            <style:paragraph-properties fo:margin-left="1cm" fo:margin-right="1cm" +                                        fo:margin-top="0cm" fo:margin-bottom="0.5cm" +                                        fo:text-indent="0cm" style:auto-text-indent="false" +                                        fo:padding="0.2cm" +                                        fo:border-left="0.088cm solid #999999"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Sender']) = 0"> +        <style:style style:name="Sender" style:display-name="Sender" style:class="extra" +                     style:family="paragraph" style:parent-style-name="Standard"> +            <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.100cm" +                                        text:number-lines="false" text:line-number="0"/> +            <style:text-properties fo:font-style="italic"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Table_20_Contents']) = 0"> +        <style:style style:name="Table_20_Contents" style:display-name="Table Contents" +                     style:family="paragraph" style:parent-style-name="Standard" +                     style:class="extra"> +            <style:paragraph-properties text:number-lines="false" text:line-number="0"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Table_20_Heading']) = 0"> +        <style:style style:name="Table_20_Heading" style:display-name="Table Heading" +                     style:family="paragraph" style:parent-style-name="Table_20_Contents" +                     style:class="extra"> +            <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" +                                        text:number-lines="false" text:line-number="0"/> +            <style:text-properties fo:font-weight="bold"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Teletype']) = 0"> +        <style:style style:name="Teletype" style:display-name="Teletype" +                     style:family="text"> +            <style:text-properties style:font-name="DejaVu Sans Mono" +                                   fo:font-size="9pt"/> +        </style:style> +    </xsl:if> + +    <xsl:if test="count(//office:styles/style:style[@style:name = 'Marginalia']) = 0"> +        <style:style style:name="Marginalia" style:display-name="Marginalia" +                     style:family="graphic"> +            <style:graphic-properties svg:width="8.5cm" style:rel-width="50%" +                                      fo:min-height="0.5cm" +                                      text:anchor-type="paragraph" +                                      svg:x="0cm" svg:y="0cm" +                                      fo:margin-left="0.2cm" +                                      fo:margin-right="0cm" +                                      fo:margin-top="0.1cm" +                                      fo:margin-bottom="0.1cm" +                                      style:wrap="parallel" +                                      style:number-wrapped-paragraphs="no-limit" +                                      style:wrap-contour="false" +                                      style:vertical-pos="top" +                                      style:vertical-rel="paragraph" +                                      style:horizontal-pos="right" +                                      style:horizontal-rel="paragraph" +                                      fo:background-color="transparent" +                                      style:background-transparency="100%" +                                      fo:padding="0.15cm" +                                      fo:border="0.002cm solid #000000" +                                      style:shadow="none"> +            </style:graphic-properties> +        </style:style> +    </xsl:if> + +</xsl:template> + +</xsl:stylesheet> | 
