|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 Sane Software Manifesto helper tools |
|
4 Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) |
|
5 |
|
6 This program is free software: you can redistribute it and/or modify |
|
7 it under the terms of the GNU General Public License as published by |
|
8 the Free Software Foundation, version 3. |
|
9 |
|
10 This program is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 GNU General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU General Public License |
|
16 along with this program. If not, see <https://www.gnu.org/licenses/>. |
|
17 --> |
|
18 <xsl:stylesheet |
|
19 version="1.0" |
|
20 xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" |
|
21 xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" |
|
22 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" |
|
23 xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" |
|
24 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" |
|
25 xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" |
|
26 xmlns:m="tag:globalcode.info,2019:sane-software/manifesto" |
|
27 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
28 xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|
29 xmlns:xs="http://www.w3.org/2001/XMLSchema" |
|
30 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
31 xsi:schemaLocation="tag:globalcode.info,2019:sane-software/manifesto ssm.xsd" |
|
32 exclude-result-prefixes="fn m xs xsi"> |
|
33 |
|
34 <xsl:output |
|
35 method="xml" |
|
36 indent="yes" |
|
37 encoding="UTF-8"/> |
|
38 |
|
39 <xsl:template match="/m:manifesto"> |
|
40 <office:document office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"> |
|
41 <xsl:call-template name="styles"/> |
|
42 <office:body> |
|
43 <office:text> |
|
44 <text:p text:style-name="Title"> |
|
45 <xsl:value-of select="m:title"/> |
|
46 </text:p> |
|
47 <!-- TODO: remove hardcoded warning, use version from mercurial --> |
|
48 <text:p text:style-name="Subtitle"><DRAFT> Please note that this is a draft version. Stay tuned for v1.0.0! </DRAFT></text:p> |
|
49 <text:p text:style-name="Paragraph"> |
|
50 <xsl:value-of select="m:preamble"/> |
|
51 </text:p> |
|
52 <xsl:apply-templates select="m:chapter"/> |
|
53 </office:text> |
|
54 </office:body> |
|
55 </office:document> |
|
56 </xsl:template> |
|
57 |
|
58 |
|
59 <xsl:template match="m:chapter"> |
|
60 <text:h text:style-name="Heading_1" text:outline-level="1"> |
|
61 <xsl:value-of select="m:name"/> |
|
62 </text:h> |
|
63 <text:list text:style-name="List_1"> |
|
64 <xsl:apply-templates select="m:item"/> |
|
65 </text:list> |
|
66 </xsl:template> |
|
67 |
|
68 |
|
69 <xsl:template match="m:item"> |
|
70 <text:list-item> |
|
71 <text:p> |
|
72 <xsl:apply-templates select="m:text"/> |
|
73 </text:p> |
|
74 |
|
75 <xsl:if test="m:item"> |
|
76 <text:list text:style-name="List_1"> |
|
77 <xsl:apply-templates select="m:item"/> |
|
78 </text:list> |
|
79 </xsl:if> |
|
80 |
|
81 </text:list-item> |
|
82 </xsl:template> |
|
83 |
|
84 <xsl:template match="m:text"> |
|
85 <xsl:apply-templates/> |
|
86 <xsl:text> </xsl:text> |
|
87 </xsl:template> |
|
88 |
|
89 <xsl:template name="styles"> |
|
90 <office:font-face-decls> |
|
91 <style:font-face style:name="OpenSymbol" svg:font-family="OpenSymbol" style:font-charset="x-symbol"/> |
|
92 <style:font-face style:name="Sawasdee" svg:font-family="Sawasdee" style:font-adornments="Tučné" style:font-pitch="variable"/> |
|
93 <style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/> |
|
94 <style:font-face style:name="Lohit Devanagari" svg:font-family="'Lohit Devanagari'" style:font-family-generic="system" style:font-pitch="variable"/> |
|
95 <style:font-face style:name="Noto Sans CJK SC" svg:font-family="'Noto Sans CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/> |
|
96 </office:font-face-decls> |
|
97 |
|
98 <office:styles> |
|
99 <style:default-style style:family="paragraph"> |
|
100 <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/> |
|
101 <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Sans" fo:font-size="12pt" fo:language="cs" fo:country="CZ" style:letter-kerning="true" style:font-name-asian="Noto Sans CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/> |
|
102 </style:default-style> |
|
103 <style:style style:name="Standard" style:family="paragraph" style:class="text"> |
|
104 <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/> |
|
105 <style:text-properties style:font-size-asian="10.5pt"/> |
|
106 </style:style> |
|
107 <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Paragraph" style:class="text"> |
|
108 <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/> |
|
109 <style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="'Noto Sans CJK SC'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lohit Devanagari" style:font-family-complex="'Lohit Devanagari'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/> |
|
110 </style:style> |
|
111 <style:style style:name="Paragraph" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text"> |
|
112 <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" loext:contextual-spacing="false" fo:line-height="115%"/> |
|
113 <style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Běžné" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/> |
|
114 </style:style> |
|
115 <style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Paragraph" style:class="chapter"> |
|
116 <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/> |
|
117 <style:text-properties style:font-name="Sawasdee" fo:font-family="Sawasdee" style:font-style-name="Tučné" style:font-pitch="variable" fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/> |
|
118 </style:style> |
|
119 <style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Paragraph" style:class="chapter"> |
|
120 <style:paragraph-properties fo:margin-top="0.106cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/> |
|
121 <style:text-properties fo:font-size="10pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/> |
|
122 </style:style> |
|
123 <style:style style:name="Heading_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Paragraph" style:default-outline-level="1" style:class="text"> |
|
124 <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false"/> |
|
125 <style:text-properties style:font-name="Sawasdee" fo:font-family="Sawasdee" style:font-style-name="Tučné" style:font-pitch="variable" fo:font-size="130%" fo:font-weight="bold" style:font-size-asian="130%" style:font-weight-asian="bold" style:font-size-complex="130%" style:font-weight-complex="bold"/> |
|
126 </style:style> |
|
127 <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> |
|
128 <style:paragraph-properties text:number-lines="false" text:line-number="0"> |
|
129 <style:tab-stops> |
|
130 <style:tab-stop style:position="8.5cm" style:type="center"/> |
|
131 <style:tab-stop style:position="17cm" style:type="right"/> |
|
132 </style:tab-stops> |
|
133 </style:paragraph-properties> |
|
134 <style:text-properties fo:font-size="6pt"/> |
|
135 </style:style> |
|
136 |
|
137 <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/> |
|
138 <text:list-style style:name="List_1" style:display-name="List 1"> |
|
139 <text:list-level-style-bullet text:level="1" text:style-name="Numbering_20_Symbols" text:bullet-char="•"> |
|
140 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment"> |
|
141 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.4cm" fo:text-indent="-0.4cm" fo:margin-left="0.4cm"/> |
|
142 </style:list-level-properties> |
|
143 <style:text-properties style:font-name="OpenSymbol"/> |
|
144 </text:list-level-style-bullet> |
|
145 <text:list-level-style-bullet text:level="2" text:style-name="Numbering_20_Symbols" text:bullet-char="•"> |
|
146 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment"> |
|
147 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.801cm" fo:text-indent="-0.4cm" fo:margin-left="0.801cm"/> |
|
148 </style:list-level-properties> |
|
149 <style:text-properties style:font-name="OpenSymbol"/> |
|
150 </text:list-level-style-bullet> |
|
151 <text:list-level-style-bullet text:level="3" text:style-name="Numbering_20_Symbols" text:bullet-char="•"> |
|
152 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment"> |
|
153 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.199cm" fo:text-indent="-0.4cm" fo:margin-left="1.199cm"/> |
|
154 </style:list-level-properties> |
|
155 <style:text-properties style:font-name="OpenSymbol"/> |
|
156 </text:list-level-style-bullet> |
|
157 </text:list-style> |
|
158 |
|
159 <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/> |
|
160 <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/> |
|
161 |
|
162 </office:styles> |
|
163 |
|
164 <office:automatic-styles> |
|
165 <style:page-layout style:name="pm1"> |
|
166 <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" 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:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm"> |
|
167 <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/> |
|
168 </style:page-layout-properties> |
|
169 <style:header-style/> |
|
170 <style:footer-style> |
|
171 <style:header-footer-properties fo:min-height="0cm" fo:margin-top="0.2cm"/> |
|
172 </style:footer-style> |
|
173 </style:page-layout> |
|
174 </office:automatic-styles> |
|
175 |
|
176 <office:master-styles> |
|
177 <style:master-page style:name="Standard" style:page-layout-name="pm1"> |
|
178 <style:footer> |
|
179 <!-- TODO: move license information to XML file --> |
|
180 <text:p text:style-name="Footer">Sane Software Manifesto <https://sane-software.globalcode.info/> Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) CC-BY-ND<text:tab/> |
|
181 <text:page-number text:select-page="current">1</text:page-number> / <text:page-count>1</text:page-count> |
|
182 </text:p> |
|
183 </style:footer> |
|
184 </style:master-page> |
|
185 </office:master-styles> |
|
186 </xsl:template> |
|
187 |
|
188 </xsl:stylesheet> |