1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
3 |
Feeping Creaturism |
4 |
|
5 |
Douglas Thrift |
6 |
|
7 |
$Id$ |
8 |
--> |
9 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
10 |
xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml"> |
11 |
<xsl:output encoding="UTF-8" omit-xml-declaration="yes" |
12 |
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" |
13 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" |
14 |
media-type="text/html" /> |
15 |
<xsl:param name="include"/> |
16 |
<xsl:param name="relative">..</xsl:param> |
17 |
<xsl:variable name="letter" select="/xhtml:html/xhtml:head/xhtml:link[@rel='up']/@title" |
18 |
/> |
19 |
<xsl:template match="xhtml:html"> |
20 |
<xsl:choose> |
21 |
<xsl:when test="boolean($include)"> |
22 |
<xsl:apply-templates select="xhtml:body"/> |
23 |
</xsl:when> |
24 |
<xsl:otherwise> |
25 |
<xsl:call-template name="page"/> |
26 |
</xsl:otherwise> |
27 |
</xsl:choose> |
28 |
</xsl:template> |
29 |
<xsl:template name="page"> |
30 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
31 |
<head> |
32 |
<title>Douglas Thrift's Computers Website | Jargon: |
33 |
<xsl:value-of select="xhtml:head/xhtml:title"/></title> |
34 |
<link rel="stylesheet" href="../../stylesheets/regular.css" |
35 |
type="text/css"/> |
36 |
<link rel="Icon" href="../../favicon.ico" type="image/ico"/> |
37 |
<script src="../../nav/functions.js" type="text/javascript" |
38 |
></script> |
39 |
</head> |
40 |
<body> |
41 |
<div> |
42 |
<p class="center"><a |
43 |
href="http://computers.douglasthrift.net/"><img |
44 |
src="../../masthead.png" |
45 |
alt="Douglas Thrift's Computers Website" |
46 |
title="Douglas Thrift's Computers Website" |
47 |
/></a></p> |
48 |
<p class="center nav"><a |
49 |
href="http://www.douglasthrift.net/" |
50 |
onmouseout="deselect(1)" onmouseover="select(1)" |
51 |
class="nav">Home</a> | <a |
52 |
href="http://www.douglasthrift.net/blog/" |
53 |
onmouseout="deselect(2)" onmouseover="select(2)" |
54 |
class="nav">Blog</a> | <a |
55 |
href="http://computers.douglasthrift.net/" |
56 |
class="nav select">Computers</a> | <a |
57 |
href="http://movies.douglasthrift.net/" |
58 |
onmouseout="deselect(4)" onmouseover="select(4)" |
59 |
class="nav">Movies</a> | <a |
60 |
href="http://music.douglasthrift.net/" |
61 |
onmouseout="deselect(5)" onmouseover="select(5)" |
62 |
class="nav">Music</a> | <a |
63 |
href="http://tvshows.douglasthrift.net/" |
64 |
onmouseout="deselect(6)" onmouseover="select(6)" |
65 |
class="nav">TV Shows</a> | <a |
66 |
href="http://www.douglasthrift.net/sitemap.xml" |
67 |
onmouseout="deselect(7)" onmouseover="select(7)" |
68 |
class="nav">Sitemap</a> | <a |
69 |
href="http://www.douglasthrift.net/contact.php" |
70 |
onmouseout="deselect(8)" onmouseover="select(8)" |
71 |
class="nav">Contact</a> | <a |
72 |
href="http://www.douglasthrift.net/linking.xml" |
73 |
onmouseout="deselect(9)" onmouseover="select(9)" |
74 |
class="nav">Linking</a> | <a |
75 |
href="http://www.douglasthrift.net/search.cgi" |
76 |
onmouseout="deselect(10)" onmouseover="select(10)" |
77 |
class="nav">Search</a></p> |
78 |
</div> |
79 |
<div class="hr"> |
80 |
<h1 id="title" class="center">Jargon: <xsl:value-of |
81 |
select="xhtml:head/xhtml:title"/></h1> |
82 |
</div> |
83 |
<div class="hr"> |
84 |
<xsl:apply-templates select="xhtml:body"/> |
85 |
</div> |
86 |
<div class="hr"> |
87 |
<p class="center">Copyright © 2002-2004, <a |
88 |
href="http://www.douglasthrift.net/contact.php" |
89 |
>Douglas Thrift</a>. All Rights Reserved.</p> |
90 |
<p class="center"><a |
91 |
href="http://validator.w3.org/check/referer"><img |
92 |
src="../../w3c_images/vxh10.png" |
93 |
alt="Valid XHTML 1.0!" title="Valid XHTML 1.0!" |
94 |
/></a> <a |
95 |
href="http://jigsaw.w3.org/css-validator/check/referer" |
96 |
><img src="../../w3c_images/vcss.png" |
97 |
alt="Valid CSS!" title="Valid CSS!"/></a></p> |
98 |
</div> |
99 |
</body> |
100 |
</html> |
101 |
</xsl:template> |
102 |
<xsl:template match="xhtml:body"> |
103 |
<p><strong><xsl:value-of select="../xhtml:head/xhtml:title"/>: </strong> |
104 |
<xsl:apply-templates select="xhtml:dt/dt"/></p> |
105 |
<xsl:apply-templates select="xhtml:dd/*"/> |
106 |
</xsl:template> |
107 |
<xsl:template match="xhtml:dt/dt"> |
108 |
<xsl:for-each select="xhtml:span"> |
109 |
<xsl:value-of select="."/> |
110 |
<xsl:if test="position()<count(../xhtml:span)">, </xsl:if> |
111 |
</xsl:for-each> |
112 |
</xsl:template> |
113 |
<xsl:template match="xhtml:p"><p><xsl:apply-templates/></p></xsl:template> |
114 |
<xsl:template match="xhtml:i"><i><xsl:apply-templates/></i></xsl:template> |
115 |
<xsl:template match="xhtml:a"> |
116 |
<xsl:choose> |
117 |
<xsl:when test="$relative!='..' and starts-with(@href,'..')"><a |
118 |
href="{$relative}{substring(@href,3)}" |
119 |
><xsl:apply-templates/></a> |
120 |
</xsl:when> |
121 |
<xsl:when |
122 |
test="not(starts-with(@href,'..') or contains(@href,'http://'))" |
123 |
><a href="{$relative}/{$letter}/{@href}"><xsl:apply-templates |
124 |
/></a> |
125 |
</xsl:when> |
126 |
<xsl:otherwise><a href="{@href}"><xsl:apply-templates/></a> |
127 |
</xsl:otherwise> |
128 |
</xsl:choose> |
129 |
</xsl:template> |
130 |
<xsl:template match="xhtml:tt"><tt><xsl:apply-templates/></tt> |
131 |
</xsl:template> |
132 |
<xsl:template match="xhtml:em"><em><xsl:apply-templates/></em> |
133 |
</xsl:template> |
134 |
<xsl:template match="xhtml:span"><span><xsl:apply-templates/></span> |
135 |
</xsl:template> |
136 |
</xsl:stylesheet> |