| 1 | <?xml version="1.0" encoding="utf-8"?> |
|---|
| 2 | <!-- |
|---|
| 3 | |
|---|
| 4 | xhtml2odt - XHTML to ODT XML transformation. |
|---|
| 5 | Copyright (C) 2009 Aurelien Bompard |
|---|
| 6 | Inspired by the work on docbook2odt, by Roman Fordinal |
|---|
| 7 | http://open.comsultia.com/docbook2odf/ |
|---|
| 8 | |
|---|
| 9 | License: LGPL v2.1 or later <http://www.gnu.org/licenses/lgpl-2.1.html> |
|---|
| 10 | |
|---|
| 11 | This library is free software; you can redistribute it and/or |
|---|
| 12 | modify it under the terms of the GNU Lesser General Public |
|---|
| 13 | License as published by the Free Software Foundation; either |
|---|
| 14 | version 2.1 of the License, or (at your option) any later version. |
|---|
| 15 | |
|---|
| 16 | This library is distributed in the hope that it will be useful, |
|---|
| 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 19 | Lesser General Public License for more details. |
|---|
| 20 | |
|---|
| 21 | You should have received a copy of the GNU Lesser General Public |
|---|
| 22 | License along with this library; if not, write to the Free Software |
|---|
| 23 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|---|
| 24 | MA 02110-1301 USA |
|---|
| 25 | |
|---|
| 26 | --> |
|---|
| 27 | <xsl:stylesheet |
|---|
| 28 | xmlns:h="http://www.w3.org/1999/xhtml" |
|---|
| 29 | xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" |
|---|
| 30 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 31 | xmlns:dc="http://purl.org/dc/elements/1.1/" |
|---|
| 32 | xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" |
|---|
| 33 | xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" |
|---|
| 34 | xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" |
|---|
| 35 | xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" |
|---|
| 36 | xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" |
|---|
| 37 | xmlns:xlink="http://www.w3.org/1999/xlink" |
|---|
| 38 | xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" |
|---|
| 39 | xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" |
|---|
| 40 | xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" |
|---|
| 41 | xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" |
|---|
| 42 | xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" |
|---|
| 43 | xmlns:math="http://www.w3.org/1998/Math/MathML" |
|---|
| 44 | xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" |
|---|
| 45 | xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" |
|---|
| 46 | xmlns:dom="http://www.w3.org/2001/xml-events" |
|---|
| 47 | xmlns:xforms="http://www.w3.org/2002/xforms" |
|---|
| 48 | xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|---|
| 49 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|---|
| 50 | xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" |
|---|
| 51 | version="1.0"> |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | <!-- Text --> |
|---|
| 56 | <xsl:template match="h:div[@class='standard']"> |
|---|
| 57 | <text:p text:style-name="Text_20_body"> |
|---|
| 58 | <xsl:apply-templates mode="inparagraph"/> |
|---|
| 59 | </text:p> |
|---|
| 60 | </xsl:template> |
|---|
| 61 | |
|---|
| 62 | <xsl:template match="h:div[@class='date']"> |
|---|
| 63 | <text:p text:style-name="Subtitle"> |
|---|
| 64 | <xsl:apply-templates mode="inparagraph"/> |
|---|
| 65 | </text:p> |
|---|
| 66 | </xsl:template> |
|---|
| 67 | |
|---|
| 68 | <!-- Title and Subtitle --> |
|---|
| 69 | <xsl:template match="h:div[@class='subject']"> |
|---|
| 70 | <text:p text:style-name="Title"> |
|---|
| 71 | <xsl:apply-templates mode="inparagraph"/> |
|---|
| 72 | </text:p> |
|---|
| 73 | </xsl:template> |
|---|
| 74 | <xsl:template match="h:h1[@class='title']"> |
|---|
| 75 | <text:p text:style-name="Title"> |
|---|
| 76 | <xsl:apply-templates mode="inparagraph"/> |
|---|
| 77 | </text:p> |
|---|
| 78 | </xsl:template> |
|---|
| 79 | <xsl:template match="h:h1[@class='subtitle']"> |
|---|
| 80 | <text:p text:style-name="Subtitle"> |
|---|
| 81 | <xsl:apply-templates mode="inparagraph"/> |
|---|
| 82 | </text:p> |
|---|
| 83 | </xsl:template> |
|---|
| 84 | |
|---|
| 85 | <!-- Footnotes --> |
|---|
| 86 | <xsl:template match="h:div[@class='foot']" mode="inparagraph"> |
|---|
| 87 | <text:note text:note-class="footnote"> |
|---|
| 88 | <xsl:apply-templates mode="inparagraph"/> |
|---|
| 89 | </text:note> |
|---|
| 90 | </xsl:template> |
|---|
| 91 | <xsl:template match="h:span[@class='foot_label']" mode="inparagraph"/> |
|---|
| 92 | <xsl:template match="h:span[@class='foot_label']"/> |
|---|
| 93 | <xsl:template match="h:div[@class='foot_inner']" mode="inparagraph"> |
|---|
| 94 | <text:note-body> |
|---|
| 95 | <text:p text:style-name="Footnote"> |
|---|
| 96 | <xsl:apply-templates mode="inparagraph"/> |
|---|
| 97 | </text:p> |
|---|
| 98 | </text:note-body> |
|---|
| 99 | </xsl:template> |
|---|
| 100 | |
|---|
| 101 | </xsl:stylesheet> |
|---|