1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
<xsl:output method="html" omit-xml-declaration="yes" indent="yes"/>
6
; XDOC Documentation System for ACL2
7
; Copyright (C) 2009-2013 Centaur Technology
10
; Centaur Technology Formal Verification Group
11
; 7600-C N. Capital of Texas Highway, Suite 300, Austin, TX 78731, USA.
12
; http://www.centtech.com/
14
; License: (An MIT/X11-style license)
16
; Permission is hereby granted, free of charge, to any person obtaining a
17
; copy of this software and associated documentation files (the "Software"),
18
; to deal in the Software without restriction, including without limitation
19
; the rights to use, copy, modify, merge, publish, distribute, sublicense,
20
; and/or sell copies of the Software, and to permit persons to whom the
21
; Software is furnished to do so, subject to the following conditions:
23
; The above copyright notice and this permission notice shall be included in
24
; all copies or substantial portions of the Software.
26
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
31
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
32
; DEALINGS IN THE SOFTWARE.
34
; Original author: Jared Davis <jared@centtech.com>
36
; This is an XSLT style sheet that transforms the small XDOC markup language
37
; into HTML. This is mostly straightforward.
41
<xsl:template match="see">
42
<a href="javascript:action_go_key('{@topic}')">
43
<xsl:apply-templates/>
47
<xsl:template match="srclink">
48
<a class="srclink" title="Find-Tag in Emacs">
49
<xsl:attribute name="href">javascript:srclink('<xsl:value-of select="."/>')</xsl:attribute>
50
<xsl:apply-templates/>
54
<xsl:template match="code">
55
<pre class="code"><xsl:apply-templates/></pre>
58
<xsl:template match="box">
59
<div class="box"><xsl:apply-templates/></div>
62
<xsl:template match="p">
63
<p><xsl:apply-templates/></p>
66
<xsl:template match="blockquote">
67
<blockquote><xsl:apply-templates/></blockquote>
70
<xsl:template match="br">
71
<xsl:apply-templates/><br/>
74
<xsl:template match="a">
75
<a href="{@href}" target="_blank">
77
<xsl:value-of select="."/><img src="Icon_External_Link.png" title="External link to {@href}"/>
82
<xsl:template match="img">
84
<img src="images/{@src}"/>
88
<xsl:template match="icon">
89
<img src="images/{@src}"/>
92
<xsl:template match="b">
93
<b><xsl:apply-templates/></b>
96
<xsl:template match="i">
97
<i><xsl:apply-templates/></i>
100
<xsl:template match="color">
101
<font color="{@rgb}"><xsl:apply-templates/></font>
104
<xsl:template match="sf">
105
<span class="sf"><xsl:apply-templates/></span>
108
<xsl:template match="u">
109
<u><xsl:apply-templates/></u>
112
<xsl:template match="v">
113
<span class="v"><xsl:apply-templates/></span>
116
<xsl:template match="tt">
117
<span class="tt"><xsl:apply-templates/></span>
120
<xsl:template match="ul">
121
<ul><xsl:apply-templates/></ul>
124
<xsl:template match="ol">
125
<ol><xsl:apply-templates/></ol>
128
<xsl:template match="li">
129
<li><xsl:apply-templates/></li>
132
<xsl:template match="dl">
133
<dl><xsl:apply-templates/></dl>
136
<xsl:template match="dt">
137
<dt><xsl:apply-templates/></dt>
140
<xsl:template match="dd">
141
<dd><xsl:apply-templates/></dd>
144
<xsl:template match="h1">
145
<h1><xsl:apply-templates/></h1>
148
<xsl:template match="h2">
149
<h2><xsl:apply-templates/></h2>
152
<xsl:template match="h3">
153
<h3><xsl:apply-templates/></h3>
156
<xsl:template match="h4">
157
<h4><xsl:apply-templates/></h4>
160
<xsl:template match="h5">
161
<h5><xsl:apply-templates/></h5>
164
<xsl:template match="table">
165
<table class="xtable"><xsl:apply-templates/></table>
168
<xsl:template match="tr">
169
<tr><xsl:apply-templates/></tr>
172
<xsl:template match="th">
173
<th><xsl:apply-templates/></th>
176
<xsl:template match="td">
177
<td><xsl:apply-templates/></td>
182
<!-- Extra stuff for Symbolic Test Vectors at Centaur -->
185
<xsl:template match="stv">
186
<table class="stv" cellspacing="0" cellpadding="2"><xsl:apply-templates/></table>
189
<xsl:template match="stv_labels">
190
<tr class="stv_labels"><xsl:apply-templates/></tr>
193
<xsl:template match="stv_inputs">
194
<xsl:for-each select="stv_line">
195
<tr class="stv_input_line"><xsl:apply-templates/></tr>
199
<xsl:template match="stv_outputs">
200
<xsl:for-each select="stv_line">
201
<tr class="stv_output_line"><xsl:apply-templates/></tr>
205
<xsl:template match="stv_internals">
206
<xsl:for-each select="stv_line">
207
<tr class="stv_internal_line"><xsl:apply-templates/></tr>
211
<xsl:template match="stv_overrides">
212
<xsl:for-each select="stv_line">
213
<tr class="stv_override_line"><xsl:apply-templates/></tr>
217
<xsl:template match="stv_name">
218
<th class="stv_name"><xsl:apply-templates/></th>
221
<xsl:template match="stv_entry">
222
<td class="stv_entry"><xsl:apply-templates/></td>
225
<xsl:template match="stv_label">
226
<th class="stv_label"><xsl:apply-templates/></th>