|
7 | 7 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
8 | 8 | xmlns="http://www.w3.org/1999/xhtml"
|
9 | 9 | 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" |
12 | 12 | version="2.0">
|
13 | 13 |
|
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 |
| - |
35 | 14 | <xsl:import href="diffspec-orig.xsl"/>
|
36 |
| - |
37 |
| - <xsl:output method="xhtml"/> |
| 15 | + <xsl:import href="shared.xsl"/> |
38 | 16 |
|
39 | 17 | <xsl:param name="additional.css">
|
40 | 18 | <!-- Parameter overriding cannot use the overrode param. So I
|
|
62 | 40 | code.function { font-weight: bold; }
|
63 | 41 | code.type { font-style: italic; }
|
64 | 42 | 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> |
66 | 46 | }
|
67 | 47 | </xsl:param>
|
68 | 48 |
|
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><</xsl:text> |
88 |
| - <a href="{@href}"> |
89 |
| - <xsl:apply-templates/> |
90 |
| - </a> |
91 |
| - <xsl:text>></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 |
| - |
112 | 49 | <!--
|
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) |
116 | 51 | -->
|
117 | 52 |
|
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> |
120 | 56 | <xsl:copy-of select="@*"/>
|
121 | 57 | <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> |
130 | 59 | </xsl:template>
|
131 | 60 |
|
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> |
140 | 68 | </xsl:template>
|
141 | 69 |
|
142 | 70 | </xsl:stylesheet>
|
0 commit comments