1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
3 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
4 <xsl:output method=
"html" doctype-public=
"-//W3C//DTD HTML 3.2//EN" />
6 <!-- inputvariable declaration -->
7 <xsl:param name=
"os1"/>
8 <xsl:param name=
"gui1"/>
9 <xsl:param name=
"cp1" />
10 <xsl:param name=
"com1"/>
11 <xsl:param name=
"lang1"/>
12 <xsl:param name=
"type"/>
13 <xsl:param name=
"file"/>
14 <xsl:strip-space elements=
"*"/>
16 <xsl:template match=
"/Readme">
17 <!-- creates the HTML-output-->
18 <xsl:if test=
"$type='html'">
19 <!-- the outputname for htlm-files-->
21 <!-- HTML utf-8 encoding enable -->
23 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
26 <xsl:apply-templates/>
31 <!-- creates the Textoutput -->
32 <xsl:if test=
"$type='text'">
33 <!-- the outputfilename for Textfiles -->
34 <xsl:apply-templates/>
38 <xsl:template match=
"Section">
39 <xsl:apply-templates/>
43 <xsl:template match=
"Paragraph">
44 <!-- match the given parameters one of the xmlattributes? -->
45 <xsl:if test=
"@os=$os1 or @os='all'">
46 <xsl:if test=
"@cpuname=$cp1 or @cpuname='all'">
47 <xsl:if test=
"@gui=$gui1 or @gui='all'">
48 <xsl:if test=
"@com=$com1 or @com='all'">
50 <xsl:if test=
"$type='html'">
51 <xsl:element name=
"{@style}">
52 <xsl:apply-templates/>
56 <xsl:if test=
"$type='text'">
57 <xsl:if test=
"@style='h1' or @style='h2' or @style='h3' or @style='H1' or @style='H2' or @style='H3'">
59 <xsl:when test='$
os1=
"WNT"'
>
60 <xsl:text>
------------------------------------------------------------

</xsl:text>
63 <xsl:text>
------------------------------------------------------------

</xsl:text>
67 <!-- enter an carriage return line feed -->
68 <xsl:if test=
"@style='p' or @style='P'">
70 <xsl:when test='$
os1=
"WNT"'
>
71 <xsl:text>
</xsl:text>
74 <xsl:text>
</xsl:text>
78 <xsl:apply-templates/>
79 <xsl:if test=
"@style='h1' or @style='h2' or @style='h3' or @style='hr' or @style='H1' or @style='H2' or @style='H3' or @style='HR'">
81 <xsl:when test='$
os1=
"WNT"'
>
82 <xsl:text>------------------------------------------------------------

</xsl:text>
85 <xsl:text>------------------------------------------------------------

</xsl:text>
96 <xsl:template match=
"List">
97 <!-- creates the listoutput, the html-tags will be ignored if textoutput is choosen -->
99 <xsl:when test=
"@Enum='false'">
101 <xsl:apply-templates/>
104 <xsl:when test=
"@Enum='true'">
106 <xsl:apply-templates/>
112 <xsl:template match=
"List//Text">
113 <!-- create the list -->
114 <xsl:if test=
"$type='html'">
115 <xsl:if test=
"@xml:lang=$lang1">
116 <li><xsl:apply-templates/></li>
119 <xsl:if test=
"$type='text'">
120 <xsl:if test=
"@xml:lang=$lang1">
121 <xsl:text>-
</xsl:text>
122 <xsl:apply-templates/>
124 <xsl:when test='$
os1=
"WNT"'
>
125 <xsl:text>
</xsl:text>
128 <xsl:text>
</xsl:text>
135 <!-- the textoutput of normal paragraph nodes -->
136 <!-- these template will be used if an attribute xml:lang exists -->
137 <xsl:template match=
"Section/Paragraph/Text[@xml:lang]">
138 <xsl:if test=
"@xml:lang=$lang1">
139 <!-- make the output with the given template -->
140 <xsl:call-template name=
"out"/>
144 <!-- these template will be used if no attribute xml:lang exists -->
145 <xsl:template match=
"Section/Paragraph/Text[not (@xml:lang)]">
146 <xsl:call-template name=
"out"/>
149 <!-- creates the outputtemplate out -->
150 <xsl:template name=
"out">
151 <!-- creates output with an extra CR/LF -->
152 <xsl:if test=
"@Wrap='true'">
153 <xsl:if test=
"$type='html'">
154 <xsl:element name=
"br"/>
155 <xsl:call-template name=
"prelinked"/>
157 <xsl:if test=
"$type='text'">
159 <xsl:when test='$
os1=
"WNT"'
>
160 <xsl:text>
</xsl:text>
163 <xsl:text>
</xsl:text>
166 <xsl:call-template name=
"linked"/>
170 <!-- here without the extra CR/LF-->
171 <xsl:if test=
"@Wrap='false'">
172 <xsl:if test=
"$type='html'">
173 <xsl:call-template name=
"prelinked"/>
175 <xsl:if test=
"$type='text'">
176 <xsl:call-template name=
"linked"/>
181 <xsl:template name=
"prelinked">
182 <xsl:if test=
" @style='b ' or @style='B ' or @style='i ' or @style='I ' or @style='u ' or @style='U '">
183 <xsl:element name=
"{@style}">
184 <xsl:call-template name=
"linked"/>
187 <xsl:if test=
"@style='none'">
188 <xsl:call-template name=
"linked"/>
192 <xsl:template name=
"linked">
193 <xsl:if test=
"$type='html'">
194 <!--this template creates a link if the url attribute is true -->
195 <xsl:if test=
"@url='false'">
196 <xsl:apply-templates/>
198 <xsl:if test=
"@url='true'">
199 <xsl:if test=
"@path='none'">
200 <a><xsl:attribute name=
"href"> <xsl:apply-templates/></xsl:attribute><xsl:apply-templates/></a>
202 <xsl:if test=
"@path='file'">
203 <a><xsl:attribute name=
"href"><xsl:text>file://localhost/
</xsl:text><xsl:apply-templates/></xsl:attribute><xsl:apply-templates/></a>
205 <xsl:if test=
"@path='url'">
206 <a><xsl:attribute name=
"href"><xsl:text>http://
</xsl:text><xsl:apply-templates/></xsl:attribute><xsl:apply-templates/></a>
209 <!-- this code is needed for the line before an link, if not an <p> will be added-->
210 <xsl:if test=
"@url='ahead'">
211 <xsl:apply-templates/>
214 <xsl:if test=
"$type='text'">
215 <xsl:if test=
"@url='false'">
216 <xsl:apply-templates/>
218 <xsl:when test='$
os1=
"WNT"'
>
219 <xsl:text>
</xsl:text>
222 <xsl:text>
</xsl:text>
226 <xsl:if test=
"@url='true' or @url='ahead'">
227 <xsl:apply-templates/>