~vcs-imports/xena/trunk

« back to all changes in this revision

Viewing changes to ext/src/xalan-j_2_7_1/samples/AppletXMLtoHTML/s1ToHTML.xsl

  • Committer: matthewoliver
  • Date: 2009-12-10 03:18:07 UTC
  • Revision ID: vcs-imports@canonical.com-20091210031807-l086qguzdlljtkl9
Merged Xena Testing into Xena Stable for the Xena 5 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
 
 
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  "License");
 
9
   * you may not use this file except in compliance with the License.
 
10
   * You may obtain a copy of the License at
 
11
   *
 
12
   *     http://www.apache.org/licenses/LICENSE-2.0
 
13
   *
 
14
   * Unless required by applicable law or agreed to in writing, software
 
15
   * distributed under the License is distributed on an "AS IS" BASIS,
 
16
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
17
   * See the License for the specific language governing permissions and
 
18
   * limitations under the License.
 
19
  -->
 
20
 
 
21
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
22
  <xsl:output method="html" indent="yes"/>
 
23
    
 
24
  <xsl:template match="/">
 
25
    <xsl:apply-templates/>
 
26
  </xsl:template>
 
27
 
 
28
  <xsl:template match="s1">
 
29
    <html>
 
30
      <head><title><xsl:value-of select="@title"/></title></head>
 
31
      <body  bgcolor="#ffffff" text="#000000">
 
32
        <xsl:apply-templates select="s2"/>
 
33
      </body>
 
34
    </html>
 
35
  </xsl:template>
 
36
 
 
37
  <xsl:template match="s2">
 
38
    <table width="100%" border="0" cellspacing="0" cellpadding="4">
 
39
      <tr>
 
40
        <td bgcolor="#006699">
 
41
          <font color="#ffffff" size="+1">
 
42
            <b><xsl:value-of select="@title"/></b>
 
43
          </font>
 
44
        </td>
 
45
      </tr>
 
46
    </table>
 
47
    <xsl:apply-templates/>
 
48
    <br/>
 
49
  </xsl:template>
 
50
 
 
51
  <xsl:template match="p">
 
52
    <p><xsl:apply-templates/></p>
 
53
  </xsl:template>
 
54
 
 
55
  <xsl:template match="note">
 
56
    <table border="0" width="100%">
 
57
      <tr>
 
58
        <td width="20">&#160;</td>
 
59
        <td bgcolor="#88aacc">
 
60
          <font size="-1"><i>NOTE: <xsl:apply-templates/></i></font>
 
61
        </td>
 
62
        <td width="20">&#160;</td>
 
63
      </tr>
 
64
    </table>
 
65
  </xsl:template>
 
66
  
 
67
  <xsl:template match="ul">
 
68
    <ul><xsl:apply-templates/></ul>
 
69
  </xsl:template>
 
70
 
 
71
  <xsl:template match="ol">
 
72
    <ol><xsl:apply-templates/></ol>
 
73
  </xsl:template>
 
74
  
 
75
  <xsl:template match="gloss">
 
76
    <dl><xsl:apply-templates/></dl>
 
77
  </xsl:template>
 
78
   <!-- <term> contains a single-word, multi-word or symbolic 
 
79
       designation which is regarded as a technical term. --> 
 
80
  <xsl:template match="term">
 
81
    <dfn><xsl:apply-templates/></dfn>
 
82
  </xsl:template>
 
83
 
 
84
  <xsl:template match="label" priority="1">
 
85
    <dt><xsl:apply-templates/></dt>
 
86
  </xsl:template>
 
87
 
 
88
  <xsl:template match="item" priority="2">
 
89
    <dd>
 
90
      <xsl:apply-templates/>
 
91
    </dd>
 
92
  </xsl:template>
 
93
 
 
94
  <xsl:template match="table">
 
95
    <p align="center"><table border="0"><xsl:apply-templates/></table></p>
 
96
  </xsl:template>
 
97
 
 
98
  <xsl:template match="source">
 
99
    <table border="0" width="100%">
 
100
      <tr>
 
101
        <td width="20">&#160;</td>
 
102
        <td bgcolor="#88aacc"><pre><xsl:apply-templates/></pre></td>
 
103
        <td width="20">&#160;</td>
 
104
      </tr>
 
105
    </table>
 
106
  </xsl:template>
 
107
 
 
108
  <xsl:template match="li">
 
109
    <li><xsl:apply-templates/></li>
 
110
  </xsl:template>
 
111
 
 
112
  <xsl:template match="tr">
 
113
    <tr><xsl:apply-templates/></tr>
 
114
  </xsl:template>
 
115
 
 
116
  <xsl:template match="th">
 
117
    <td bgcolor="#006699" align="center">
 
118
      <font color="#ffffff"><b><xsl:apply-templates/></b></font>
 
119
    </td>
 
120
  </xsl:template>
 
121
 
 
122
  <xsl:template match="td">
 
123
    <td bgcolor="#88aacc"><xsl:apply-templates/>&#160;</td>
 
124
  </xsl:template>
 
125
 
 
126
  <xsl:template match="tn">
 
127
    <td>&#160;</td>
 
128
  </xsl:template>
 
129
 
 
130
  <xsl:template match="em">
 
131
    <b><xsl:apply-templates/></b>
 
132
  </xsl:template>
 
133
 
 
134
  <xsl:template match="ref">
 
135
    <i><xsl:apply-templates/></i>
 
136
  </xsl:template>
 
137
 
 
138
  <xsl:template match="code">
 
139
    <code><xsl:apply-templates/></code>
 
140
  </xsl:template>
 
141
 
 
142
  <xsl:template match="br">
 
143
    <br/>
 
144
  </xsl:template>
 
145
 
 
146
 
 
147
  <xsl:template match="jump">
 
148
    <a href="{@href}" target="_top"><xsl:apply-templates/></a>
 
149
  </xsl:template>  
 
150
 
 
151
  <xsl:template match="anchor">
 
152
    <a name="{@id}"> </a>
 
153
  </xsl:template>
 
154
 
 
155
  <xsl:template match="img">
 
156
    <img src="{@src}" align="right" border="0" vspace="4" hspace="4"/>
 
157
  </xsl:template>
 
158
  
 
159
</xsl:stylesheet>
 
 
b'\\ No newline at end of file'