readme.xsl (2f468b97) readme.xsl (6df8b7a9)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
20 *
21 ***********************************************************-->
22
23<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
24
25<!-- <xsl:output method="text" doctype-public="-//W3C//DTD HTML 3.2//EN" omit-xml-declaration="yes"/> -->
26
27 <!-- inputvariable declaration -->
28 <xsl:param name="os1"/>
29 <xsl:param name="gui1"/>
30 <xsl:param name="cp1"/>
31 <xsl:param name="com1"/>
32 <xsl:param name="lang1"/>
33 <xsl:param name="type"/>
34 <xsl:param name="file"/>
35 <xsl:strip-space elements="*"/>
21 ***********************************************************-->
22
23<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
24
25<!-- <xsl:output method="text" doctype-public="-//W3C//DTD HTML 3.2//EN" omit-xml-declaration="yes"/> -->
26
27 <!-- inputvariable declaration -->
28 <xsl:param name="os1"/>
29 <xsl:param name="gui1"/>
30 <xsl:param name="cp1"/>
31 <xsl:param name="com1"/>
32 <xsl:param name="lang1"/>
33 <xsl:param name="type"/>
34 <xsl:param name="file"/>
35 <xsl:strip-space elements="*"/>
36
36
37 <xsl:param name="platform">
38 <xsl:if test="$os1='LINUX'">
39 <xsl:value-of select="'LINUX'"/>
40 </xsl:if>
41 <xsl:if test="$os1='WNT'">
42 <xsl:value-of select="'WIN'"/>
43 </xsl:if>
44 <xsl:if test="$os1='SOLARIS'">
45 <xsl:if test="$cp1='SPARC'">
46 <xsl:value-of select="'SOLSPARC'"/>
47 </xsl:if>
48 <xsl:if test="$cp1='INTEL'">
49 <xsl:value-of select="'SOLX86'"/>
50 </xsl:if>
51 </xsl:if>
52 <xsl:if test="$os1='MACOSX'">
53 <xsl:value-of select="'MAC'"/>
54 </xsl:if>
55 </xsl:param>
37 <xsl:param name="platform">
38 <xsl:if test="$os1='LINUX'">
39 <xsl:value-of select="'LINUX'"/>
40 </xsl:if>
41 <xsl:if test="$os1='WNT'">
42 <xsl:value-of select="'WIN'"/>
43 </xsl:if>
44 <xsl:if test="$os1='SOLARIS'">
45 <xsl:if test="$cp1='SPARC'">
46 <xsl:value-of select="'SOLSPARC'"/>
47 </xsl:if>
48 <xsl:if test="$cp1='INTEL'">
49 <xsl:value-of select="'SOLX86'"/>
50 </xsl:if>
51 </xsl:if>
52 <xsl:if test="$os1='MACOSX'">
53 <xsl:value-of select="'MAC'"/>
54 </xsl:if>
55 </xsl:param>
56
56
57 <xsl:param name="lf">
58 <xsl:choose>
59 <xsl:when test="$platform='WIN'"><xsl:text>&#xD;&#xA;</xsl:text></xsl:when>
60 <xsl:otherwise><xsl:text>&#xA;</xsl:text></xsl:otherwise>
61 </xsl:choose>
62 </xsl:param>
57 <xsl:param name="lf">
58 <xsl:choose>
59 <xsl:when test="$platform='WIN'"><xsl:text>&#xD;&#xA;</xsl:text></xsl:when>
60 <xsl:otherwise><xsl:text>&#xA;</xsl:text></xsl:otherwise>
61 </xsl:choose>
62 </xsl:param>
63
63
64 <xsl:template match="/">
65 <xsl:choose>
66 <xsl:when test="$type='html'">
64 <xsl:template match="/">
65 <xsl:choose>
66 <xsl:when test="$type='html'">
67
67
68 <xsl:document method="html" href="{$file}" doctype-public="-//W3C//DTD HTML 3.2//EN">
69 <xsl:apply-templates mode="html"/>
70 </xsl:document>
68 <xsl:document method="html" href="{$file}" doctype-public="-//W3C//DTD HTML 3.2//EN">
69 <xsl:apply-templates mode="html"/>
70 </xsl:document>
71
71
72 </xsl:when>
73 <xsl:when test="$type='text'">
72 </xsl:when>
73 <xsl:when test="$type='text'">
74
74
75 <xsl:document method="text" href="{$file}">
76 <xsl:call-template name="textout" />
77 </xsl:document>
75 <xsl:document method="text" href="{$file}">
76 <xsl:call-template name="textout" />
77 </xsl:document>
78
78
79 </xsl:when>
80 </xsl:choose>
81 </xsl:template>
79 </xsl:when>
80 </xsl:choose>
81 </xsl:template>
82
82
83 <xsl:template match="*" mode="html">
84 <xsl:choose>
85 <xsl:when test="(contains(@class,$platform) or not(@class) or (name(.)='p'))">
86 <xsl:if test="(@xml:lang=$lang1 or not(@xml:lang))"> <!-- check for correct language -->
87 <xsl:element name="{name(.)}">
88 <xsl:if test="(name(.)='a')">
89 <xsl:attribute name="href">
90 <xsl:value-of select="@href"/>

--- 9 unchanged lines hidden (view full) ---

100 <xsl:value-of select="@id"/>
101 </xsl:attribute>
102 </xsl:if>
103 <xsl:apply-templates mode="html"/>
104 </xsl:element>
105 </xsl:if>
106 </xsl:when>
107 <xsl:otherwise>
83 <xsl:template match="*" mode="html">
84 <xsl:choose>
85 <xsl:when test="(contains(@class,$platform) or not(@class) or (name(.)='p'))">
86 <xsl:if test="(@xml:lang=$lang1 or not(@xml:lang))"> <!-- check for correct language -->
87 <xsl:element name="{name(.)}">
88 <xsl:if test="(name(.)='a')">
89 <xsl:attribute name="href">
90 <xsl:value-of select="@href"/>

--- 9 unchanged lines hidden (view full) ---

100 <xsl:value-of select="@id"/>
101 </xsl:attribute>
102 </xsl:if>
103 <xsl:apply-templates mode="html"/>
104 </xsl:element>
105 </xsl:if>
106 </xsl:when>
107 <xsl:otherwise>
108
108
109 </xsl:otherwise>
110 </xsl:choose>
111 </xsl:template>
109 </xsl:otherwise>
110 </xsl:choose>
111 </xsl:template>
112
112
113 <xsl:template name="textout">
114 <xsl:apply-templates />
115 </xsl:template>
113 <xsl:template name="textout">
114 <xsl:apply-templates />
115 </xsl:template>
116
116
117 <xsl:template match="*">
118 <xsl:if test="(@xml:lang=$lang1 or not(@xml:lang))"> <!-- check for correct language -->
119 <xsl:choose>
120 <xsl:when test="name(.)='html'">
121 <xsl:apply-templates/>
122 </xsl:when>
123 <xsl:when test="name(.)='body'">
124 <xsl:apply-templates/>
125 </xsl:when>
126 <xsl:when test="name(.)='hr'">
127 <xsl:text>
117 <xsl:template match="*">
118 <xsl:if test="(@xml:lang=$lang1 or not(@xml:lang))"> <!-- check for correct language -->
119 <xsl:choose>
120 <xsl:when test="name(.)='html'">
121 <xsl:apply-templates/>
122 </xsl:when>
123 <xsl:when test="name(.)='body'">
124 <xsl:apply-templates/>
125 </xsl:when>
126 <xsl:when test="name(.)='hr'">
127 <xsl:text>
128
128
129----------------------------------------------------------------------------------------------------------
130
131</xsl:text>
132 </xsl:when>
133 <xsl:when test="name(.)='div'">
134 <xsl:if test="(contains(@class,$platform) or not(@class))">
135 <xsl:apply-templates/>
136 </xsl:if>

--- 19 unchanged lines hidden (view full) ---

156 <xsl:if test="(not(name(..)='li') and (count(a) = 0))">
157 <xsl:value-of select="$lf"/>
158 <xsl:value-of select="$lf"/>
159 </xsl:if>
160 <xsl:apply-templates/>
161 </xsl:when>
162 <xsl:when test="name(.)='h1'">
163 <xsl:value-of select="$lf"/>
129----------------------------------------------------------------------------------------------------------
130
131</xsl:text>
132 </xsl:when>
133 <xsl:when test="name(.)='div'">
134 <xsl:if test="(contains(@class,$platform) or not(@class))">
135 <xsl:apply-templates/>
136 </xsl:if>

--- 19 unchanged lines hidden (view full) ---

156 <xsl:if test="(not(name(..)='li') and (count(a) = 0))">
157 <xsl:value-of select="$lf"/>
158 <xsl:value-of select="$lf"/>
159 </xsl:if>
160 <xsl:apply-templates/>
161 </xsl:when>
162 <xsl:when test="name(.)='h1'">
163 <xsl:value-of select="$lf"/>
164 <xsl:text>==================================================================</xsl:text>
164 <xsl:text>===================================================================</xsl:text>
165 <xsl:value-of select="$lf"/>
166 <xsl:apply-templates/>
167 <xsl:value-of select="$lf"/>
165 <xsl:value-of select="$lf"/>
166 <xsl:apply-templates/>
167 <xsl:value-of select="$lf"/>
168 <xsl:text>==================================================================</xsl:text>
168 <xsl:text>===================================================================</xsl:text>
169 <xsl:value-of select="$lf"/>
170 </xsl:when>
171 <xsl:when test="name(.)='h2'">
172 <xsl:value-of select="$lf"/>
173 <xsl:value-of select="$lf"/>
174 <xsl:text>----------------------------------------------------------------------</xsl:text>
175 <xsl:value-of select="$lf"/>
176 <xsl:apply-templates/>

--- 15 unchanged lines hidden ---
169 <xsl:value-of select="$lf"/>
170 </xsl:when>
171 <xsl:when test="name(.)='h2'">
172 <xsl:value-of select="$lf"/>
173 <xsl:value-of select="$lf"/>
174 <xsl:text>----------------------------------------------------------------------</xsl:text>
175 <xsl:value-of select="$lf"/>
176 <xsl:apply-templates/>

--- 15 unchanged lines hidden ---