1 |
neysx 09/01/31 15:42:58 |
2 |
|
3 |
Modified: guide.xsl metadoc.xsl |
4 |
Log: |
5 |
#257080 use same list of languages for index.xml, list.xml & overview.xml |
6 |
|
7 |
Revision Changes Path |
8 |
1.240 xml/htdocs/xsl/guide.xsl |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide.xsl?rev=1.240&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide.xsl?rev=1.240&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide.xsl?r1=1.239&r2=1.240 |
13 |
|
14 |
Index: guide.xsl |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guide.xsl,v |
17 |
retrieving revision 1.239 |
18 |
retrieving revision 1.240 |
19 |
diff -u -r1.239 -r1.240 |
20 |
--- guide.xsl 31 Jan 2009 08:42:50 -0000 1.239 |
21 |
+++ guide.xsl 31 Jan 2009 15:42:58 -0000 1.240 |
22 |
@@ -21,6 +21,7 @@ |
23 |
<!-- Include external stylesheets --> |
24 |
<xsl:include href="/xsl/content.xsl" /> |
25 |
<xsl:include href="/xsl/handbook.xsl" /> |
26 |
+<xsl:include href="/xsl/util.xsl"/> |
27 |
<xsl:include href="/xsl/inserts.xsl" /> |
28 |
|
29 |
<xsl:include href="/xsl/mail.xsl" /> |
30 |
@@ -47,6 +48,12 @@ |
31 |
<!-- Where is this xsl being run? --> |
32 |
<xsl:param name="httphost">www</xsl:param> |
33 |
|
34 |
+<xsl:variable name="basename"> |
35 |
+ <xsl:call-template name="filename"> |
36 |
+ <xsl:with-param name="path" select="$link"/> |
37 |
+ </xsl:call-template> |
38 |
+</xsl:variable> |
39 |
+ |
40 |
<!-- img tag --> |
41 |
<xsl:template match="img"> |
42 |
<img src="{@src}" alt=""/> |
43 |
@@ -769,8 +776,6 @@ |
44 |
</xsl:when> |
45 |
|
46 |
<xsl:when test="title"> |
47 |
- <xsl:if test="not(position()=1 and title/text()=/mainpage/title)"> |
48 |
- |
49 |
<p class="chaphead"> |
50 |
<xsl:if test="@id"> |
51 |
<a name="{@id}"/> |
52 |
@@ -797,8 +802,6 @@ |
53 |
</span> |
54 |
<xsl:value-of select="title"/> |
55 |
</p> |
56 |
- |
57 |
- </xsl:if> |
58 |
</xsl:when> |
59 |
<xsl:otherwise> |
60 |
<xsl:if test="/guide"> |
61 |
@@ -1185,6 +1188,19 @@ |
62 |
<xsl:template match="uri"> |
63 |
<xsl:param name="paramlink"/> |
64 |
<!-- expand templates to handle things like <uri link="http://bar"><c>foo</c></uri> --> |
65 |
+<xsl:variable name="theurl"> |
66 |
+ <xsl:choose> |
67 |
+ <xsl:when test="@link and contains(@link, '__FILE_')"> |
68 |
+ <xsl:value-of select="concat(substring-before(@link,'__FILE__'),$basename,substring-after(@link,'__FILE__'))" /> |
69 |
+ </xsl:when> |
70 |
+ <xsl:when test="@link"><xsl:value-of select="@link" /></xsl:when> |
71 |
+ <xsl:when test="contains(text(), '__FILE_')"> |
72 |
+ <xsl:value-of select="concat(substring-before(text(),'__FILE__'),$basename,substring-after(text(),'__FILE__'))" /> |
73 |
+ </xsl:when> |
74 |
+ <xsl:otherwise><xsl:value-of select="text()" /></xsl:otherwise> |
75 |
+ </xsl:choose> |
76 |
+</xsl:variable> |
77 |
+ |
78 |
<xsl:choose> |
79 |
<xsl:when test="@link"> |
80 |
<xsl:choose> |
81 |
@@ -1199,10 +1215,10 @@ |
82 |
<!-- Handbook link pointing to another part/chapter, normal case --> |
83 |
<xsl:choose> |
84 |
<xsl:when test="$style != 'printable'"> |
85 |
- <a href="{$link}{@link}"><xsl:apply-templates/></a> |
86 |
+ <a href="{$link}{$theurl}"><xsl:apply-templates/></a> |
87 |
</xsl:when> |
88 |
<xsl:otherwise> |
89 |
- <a href="{$link}{@link}&style=printable"><xsl:apply-templates/></a> |
90 |
+ <a href="{$link}{$theurl}&style=printable"><xsl:apply-templates/></a> |
91 |
</xsl:otherwise> |
92 |
</xsl:choose> |
93 |
</xsl:when> |
94 |
@@ -1217,9 +1233,9 @@ |
95 |
<xsl:choose> |
96 |
<xsl:when test="contains(@link, 'chap=') and contains(@link, '#doc_')"> |
97 |
<!-- Link points inside a chapter (Case 1a)--> |
98 |
- <xsl:variable name="linkpart" select="substring-after(substring-before(@link, '&'), '=')" /> |
99 |
- <xsl:variable name="linkchap" select="substring-before(substring-after(substring-after(@link, '&'), '='), '#doc_')" /> |
100 |
- <xsl:variable name="linkanch" select="substring-after(@link, '#doc_')" /> |
101 |
+ <xsl:variable name="linkpart" select="substring-after(substring-before($theurl, '&'), '=')" /> |
102 |
+ <xsl:variable name="linkchap" select="substring-before(substring-after(substring-after($theurl, '&'), '='), '#doc_')" /> |
103 |
+ <xsl:variable name="linkanch" select="substring-after($theurl, '#doc_')" /> |
104 |
<a href="#book_part{$linkpart}_chap{$linkchap}__{$linkanch}"><xsl:apply-templates /></a> |
105 |
</xsl:when> |
106 |
<xsl:when test="contains(@link, 'chap=') and contains(@link, '#')"> |
107 |
@@ -1230,13 +1246,13 @@ |
108 |
</xsl:when> |
109 |
<xsl:when test="contains(@link, 'chap=')"> |
110 |
<!-- Link points to a chapter (Case 2)--> |
111 |
- <xsl:variable name="linkpart" select="substring-after(substring-before(@link, '&'), '=')" /> |
112 |
- <xsl:variable name="linkchap" select="substring-after(substring-after(@link, '&'), '=')" /> |
113 |
+ <xsl:variable name="linkpart" select="substring-after(substring-before($theurl, '&'), '=')" /> |
114 |
+ <xsl:variable name="linkchap" select="substring-after(substring-after($theurl, '&'), '=')" /> |
115 |
<a href="#book_part{$linkpart}_chap{$linkchap}"><xsl:apply-templates /></a> |
116 |
</xsl:when> |
117 |
<xsl:otherwise> |
118 |
<!-- Link points to a part (Case 3)--> |
119 |
- <xsl:variable name="linkpart" select="substring-after(@link, '=')" /> |
120 |
+ <xsl:variable name="linkpart" select="substring-after($theurl, '=')" /> |
121 |
<a href="#book_part{$linkpart}"><xsl:apply-templates/></a> |
122 |
</xsl:otherwise> |
123 |
</xsl:choose> |
124 |
@@ -1255,17 +1271,11 @@ |
125 |
<a href="{concat('#book_part',exslt:node-set($doc-struct)//bookpart[descendant::body[@uid=$bodyid]]/@pos,'_chap',exslt:node-set($doc-struct)//bookchap[descendant::body[@uid=$bodyid]]/@pos,'__',$locallink)}"><xsl:apply-templates /></a> |
126 |
</xsl:when> |
127 |
<xsl:otherwise> |
128 |
- <a href="{@link}"><xsl:apply-templates/></a> |
129 |
+ <a href="{$theurl}"><xsl:apply-templates/></a> |
130 |
</xsl:otherwise> |
131 |
</xsl:choose> |
132 |
</xsl:when> |
133 |
<xsl:otherwise> |
134 |
- <xsl:variable name="theurl"> |
135 |
- <xsl:choose> |
136 |
- <xsl:when test="@link"><xsl:value-of select="@link" /></xsl:when> |
137 |
- <xsl:otherwise><xsl:value-of select="text()" /></xsl:otherwise> |
138 |
- </xsl:choose> |
139 |
- </xsl:variable> |
140 |
|
141 |
<xsl:variable name="thelink"> |
142 |
<xsl:choose> |
143 |
|
144 |
|
145 |
|
146 |
1.42 xml/htdocs/xsl/metadoc.xsl |
147 |
|
148 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/metadoc.xsl?rev=1.42&view=markup |
149 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/metadoc.xsl?rev=1.42&content-type=text/plain |
150 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/metadoc.xsl?r1=1.41&r2=1.42 |
151 |
|
152 |
Index: metadoc.xsl |
153 |
=================================================================== |
154 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/metadoc.xsl,v |
155 |
retrieving revision 1.41 |
156 |
retrieving revision 1.42 |
157 |
diff -u -r1.41 -r1.42 |
158 |
--- metadoc.xsl 3 Jan 2009 18:19:14 -0000 1.41 |
159 |
+++ metadoc.xsl 31 Jan 2009 15:42:58 -0000 1.42 |
160 |
@@ -21,12 +21,12 @@ |
161 |
</xsl:if> |
162 |
</xsl:variable> |
163 |
<xsl:variable name="lang" select="exslt:node-set($metadoc)/metadoc/@lang"/> |
164 |
-<mainpage id="docs" lang="{$lang}" metadoc="yes"> |
165 |
+<mainpage lang="{$lang}" metadoc="yes"> |
166 |
<title><xsl:value-of select="title"/></title> |
167 |
<author title="Author">Gentoo Documentation Project</author> |
168 |
+ <license/> |
169 |
<version>Dynamically</version> |
170 |
<date><xsl:value-of select="func:today()"/></date> |
171 |
- <license/> |
172 |
|
173 |
<xsl:if test="intro"> |
174 |
<chapter> |
175 |
@@ -75,7 +75,7 @@ |
176 |
</chapter> |
177 |
</xsl:when> |
178 |
<xsl:otherwise> |
179 |
- <xsl:apply-templates> |
180 |
+ <xsl:apply-templates select="listing|overview"> |
181 |
<xsl:with-param name="metadoc" select="$metadoc"/> |
182 |
<xsl:with-param name="pmetadoc" select="$pmetadoc"/> |
183 |
<xsl:with-param name="lang" select="$lang"/> |
184 |
@@ -503,7 +503,7 @@ |
185 |
<xsl:variable name="version"> |
186 |
<xsl:choose> |
187 |
<xsl:when test="starts-with($v, '$Id:')"> |
188 |
- <!-- Extract version from $Id: metadoc.xsl,v 1.41 2009/01/03 18:19:14 neysx Exp $ tag --> |
189 |
+ <!-- Extract version from $Id: metadoc.xsl,v 1.42 2009/01/31 15:42:58 neysx Exp $ tag --> |
190 |
<xsl:value-of select="substring-before(substring-after($v, ',v '),' ')"/> |
191 |
</xsl:when> |
192 |
<xsl:otherwise> |
193 |
@@ -526,7 +526,7 @@ |
194 |
<xsl:variable name="parentversion"> |
195 |
<xsl:choose> |
196 |
<xsl:when test="starts-with($pv, '$Id:')"> |
197 |
- <!-- Extract version from $Id: metadoc.xsl,v 1.41 2009/01/03 18:19:14 neysx Exp $ tag --> |
198 |
+ <!-- Extract version from $Id: metadoc.xsl,v 1.42 2009/01/31 15:42:58 neysx Exp $ tag --> |
199 |
<xsl:value-of select="substring-before(substring-after($pv, ',v '),' ')"/> |
200 |
</xsl:when> |
201 |
<xsl:when test="string-length($pv)=0">?!?</xsl:when> |