Skip to content

Commit 2947928

Browse files
fgeorgesZearin
fgeorges
authored and
Zearin
committed
Improved the EXPathSpec stylesheets.
git-svn-id: http://expath.googlecode.com/svn/trunk@441 75cb22f2-d957-b17f-eb96-bc7fca3e7dc7
1 parent db9fac9 commit 2947928

File tree

6 files changed

+290
-220
lines changed

6 files changed

+290
-220
lines changed

Diff for: process/xmlspec/base.css

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
Copyright 1997-2003 W3C (MIT, ERCIM, Keio). All Rights Reserved.
3+
The following software licensing rules apply:
4+
http://www.w3.org/Consortium/Legal/copyright-software */
5+
6+
/* $Id: base.css,v 1.25 2006/04/18 08:42:53 bbos Exp $ */
7+
8+
body {
9+
padding: 2em 1em 2em 70px;
10+
margin: 0;
11+
font-family: sans-serif;
12+
color: black;
13+
background: white;
14+
background-position: top left;
15+
background-attachment: fixed;
16+
background-repeat: no-repeat;
17+
}
18+
:link { color: #00C; background: transparent }
19+
:visited { color: #609; background: transparent }
20+
a:active { color: #C00; background: transparent }
21+
22+
a:link img, a:visited img { border-style: none } /* no border on img links */
23+
24+
a img { color: white; } /* trick to hide the border in Netscape 4 */
25+
@media all { /* hide the next rule from Netscape 4 */
26+
a img { color: inherit; } /* undo the color change above */
27+
}
28+
29+
th, td { /* ns 4 */
30+
font-family: sans-serif;
31+
}
32+
33+
h1, h2, h3, h4, h5, h6 { text-align: left }
34+
/* background should be transparent, but WebTV has a bug */
35+
h1, h2, h3 { color: #005A9C; background: white }
36+
h1 { font: 170% sans-serif }
37+
h2 { font: 140% sans-serif }
38+
h3 { font: 120% sans-serif }
39+
h4 { font: bold 100% sans-serif }
40+
h5 { font: italic 100% sans-serif }
41+
h6 { font: small-caps 100% sans-serif }
42+
43+
.hide { display: none }
44+
45+
div.head { margin-bottom: 1em }
46+
div.head h1 { margin-top: 2em; clear: both }
47+
div.head table { margin-left: 2em; margin-top: 2em }
48+
49+
p.copyright { font-size: small }
50+
p.copyright small { font-size: small }
51+
52+
@media screen { /* hide from IE3 */
53+
a[href]:hover { background: #ffa }
54+
}
55+
56+
pre { margin-left: 2em }
57+
/*
58+
p {
59+
margin-top: 0.6em;
60+
margin-bottom: 0.6em;
61+
}
62+
*/
63+
dt, dd { margin-top: 0; margin-bottom: 0 } /* opera 3.50 */
64+
dt { font-weight: bold }
65+
66+
pre, code { font-family: monospace } /* navigator 4 requires this */
67+
68+
ul.toc, ol.toc {
69+
list-style: disc; /* Mac NS has problem with 'none' */
70+
list-style: none;
71+
}
72+
73+
@media aural {
74+
h1, h2, h3 { stress: 20; richness: 90 }
75+
.hide { speak: none }
76+
p.copyright { volume: x-soft; speech-rate: x-fast }
77+
dt { pause-before: 20% }
78+
pre { speak-punctuation: code }
79+
}
80+

Diff for: process/xmlspec/diffspec-orig.xsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
- Initial version
3131
--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3232

33-
<xsl:import href="xmlspec.xsl"/>
33+
<xsl:import href="xmlspec-orig.xsl"/>
3434

3535
<xsl:param name="show.diff.markup" select="1"/>
3636

Diff for: process/xmlspec/diffspec.xsl

+18-90
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,12 @@
77
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
88
xmlns="http://www.w3.org/1999/xhtml"
99
xmlns:h="http://www.w3.org/1999/xhtml"
10-
xmlns:fg="http://www.fgeorges.org/xmlspec"
11-
exclude-result-prefixes="fg h"
10+
xmlns:spec="http://expath.org/ns/xmlspec"
11+
exclude-result-prefixes="#all"
1212
version="2.0">
1313

14-
<!--
15-
TODO: Add support for Google Analytics. To do so, must add the following scripts in the webpage:
16-
17-
<xsl:if test="exists($analytics-id)">
18-
<script type="text/javascript">
19-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
20-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
21-
</script>
22-
<script type="text/javascript">
23-
try {
24-
var pageTracker = _gat._getTracker("<xsl:value-of select="$analytics-id"/>");
25-
pageTracker._trackPageview();
26-
} catch(err) {}
27-
</script>
28-
</xsl:if>
29-
30-
providing we have the following parameter:
31-
32-
<xsl:param name="analytics-id" as="xs:string?" select="'UA-5463082-2'"/>
33-
-->
34-
3514
<xsl:import href="diffspec-orig.xsl"/>
36-
37-
<xsl:output method="xhtml"/>
15+
<xsl:import href="shared.xsl"/>
3816

3917
<xsl:param name="additional.css">
4018
<!-- Parameter overriding cannot use the overrode param. So I
@@ -62,81 +40,31 @@
6240
code.function { font-weight: bold; }
6341
code.type { font-style: italic; }
6442
body {
65-
background-image: url(http://www.expath.org/images/logo-candidate.png);
43+
<xsl:text>background-image: url(</xsl:text>
44+
<xsl:value-of select="( $logo-offline[$offline], $logo )[1]"/>
45+
<xsl:text>);</xsl:text>
6646
}
6747
</xsl:param>
6848

69-
<xsl:template match="/">
70-
<xsl:variable name="res" as="item()*">
71-
<xsl:next-match/>
72-
</xsl:variable>
73-
<xsl:apply-templates select="$res" mode="postproc"/>
74-
</xsl:template>
75-
76-
<!-- Ignore status. -->
77-
<xsl:template match="status"/>
78-
79-
<!-- Original stylesheet ignores subtitle (a bug IMHO.) -->
80-
<xsl:template match="subtitle">
81-
<xsl:apply-templates/>
82-
</xsl:template>
83-
84-
<!-- Put < and > outside of the link. -->
85-
<xsl:template match="email">
86-
<xsl:text> </xsl:text>
87-
<xsl:text>&lt;</xsl:text>
88-
<a href="{@href}">
89-
<xsl:apply-templates/>
90-
</a>
91-
<xsl:text>&gt;</xsl:text>
92-
</xsl:template>
93-
94-
<!-- Make each link in prevlocs appears on its own line -->
95-
<xsl:template match="prevlocs/loc">
96-
<xsl:apply-imports/>
97-
<br/>
98-
</xsl:template>
99-
100-
<xsl:template match="fg:function">
101-
<code class="function">
102-
<xsl:apply-templates/>
103-
</code>
104-
</xsl:template>
105-
106-
<xsl:template match="fg:type">
107-
<code class="type">
108-
<xsl:apply-templates/>
109-
</code>
110-
</xsl:template>
111-
11249
<!--
113-
Mode: postproc
114-
Post-process the original output, based on the Modified Identity
115-
design pattern.
50+
Mode: postproc (extend it, defined in shared.xsl)
11651
-->
11752

118-
<xsl:template match="node()" mode="postproc">
119-
<xsl:copy>
53+
<!-- replace div by span for locations in the header block -->
54+
<xsl:template match="h:div[@class eq 'head']/h:dl/h:dd/h:div[@class = ('diff-add', 'diff-del', 'diff-chg')][h:a]" mode="postproc">
55+
<span>
12056
<xsl:copy-of select="@*"/>
12157
<xsl:apply-templates select="node()" mode="postproc"/>
122-
</xsl:copy>
123-
</xsl:template>
124-
125-
<!-- What the fuck is that helpful for? -->
126-
<xsl:template match="h:head/h:link" mode="postproc"/>
127-
128-
<xsl:template match="h:head/h:title" mode="postproc">
129-
<xsl:copy-of select=".|../h:link"/>
58+
</span>
13059
</xsl:template>
13160

132-
<xsl:template match="h:div[@class eq 'head']" mode="postproc">
133-
<p>
134-
<a href="http://www.expath.org/">
135-
<img src="http://www.expath.org/images/expath-icon.png"
136-
alt="EXPath" height="32" width="32"/>
137-
</a>
138-
</p>
139-
<xsl:next-match/>
61+
<!-- replace div by span for both links in: "This document is also available
62+
in these non-normative formats: |XML| and |Revision markup|." -->
63+
<xsl:template match="h:div[@class eq 'head']/h:p/h:div[@class = ('diff-add', 'diff-del', 'diff-chg')][h:a]" mode="postproc">
64+
<span>
65+
<xsl:copy-of select="@*"/>
66+
<xsl:apply-templates select="node()" mode="postproc"/>
67+
</span>
14068
</xsl:template>
14169

14270
</xsl:stylesheet>

0 commit comments

Comments
 (0)