urgent multi-draft fixes from amalfi
[stet:stet.git] / selectxpath.xsl
1 <!-- Copyright (C) 2005   Software Freedom Law Center, Inc.
2 --   Author: Orion Montoya <orion@mdcclv.com>
3 --
4 -- This software gives you freedom; it is licensed to you under version
5 -- 3 of the GNU Affero General Public License, along with the
6 -- additional permission in the following paragraph.
7 --
8 -- This notice constitutes a grant of such permission as is necessary
9 -- to combine or link this software, or a modified version of it, with
10 -- Request Tracker (RT), published by Jesse Vincent and Best Practical
11 -- Solutions, LLC, or a derivative work of RT, and to copy, modify, and
12 -- distribute the resulting work.  RT is licensed under version 2 of
13 -- the GNU General Public License.
14 -- 
15 -- This software is distributed WITHOUT ANY WARRANTY, without even the
16 -- implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR
17 -- PURPOSE.  See the GNU Affero General Public License for further
18 -- details.
19 --  
20 -- You should have received a copy of the GNU Affero General Public
21 -- License, version 3, and the GNU General Public License, version 2,
22 -- along with this software.  If not, see <http://www.gnu.org/licenses/>.
23 -->
24 <?xml version="1.0" encoding="utf-8"?>
25 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
26   version="1.0">
27
28   <xsl:output method="html"/>
29
30   <xsl:template match="/gpl">
31     <html>
32       <head>
33         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
34         <title><xsl:value-of select="//head/title"/></title>
35         <script type="text/javascript" src="stet-intense-shorter.js"/>
36         <script type="text/javascript" language="javascript">
37           /* for Mozilla */
38           /*   if (document.addEventListener) {
39           document.addEventListener("DOMContentLoaded", initPage(), null);
40           } */
41           /* for Internet Explorer */
42           /*@cc_on @*/
43           /*@if (@_win32)
44           document.write("&lt;script defer src=ie_onload.js>&lt;"+"/script>");
45               /*@end @*/
46               /* for other browsers */
47               var OnLoad = 'initPage()'; 
48               window.onload = function() {eval(OnLoad)}; 
49 </script>
50
51         <link rel="stylesheet" type="text/css" href="stet-ie.css"/>
52       </head>
53       <body onkeypress="checkKeyPressed(event);" bgcolor="#FFFFFF">
54 <div id="topbar" class="topbar">
55 <span id="statustext" class="statustext">Loading comments.  Please be patient: this can take a little while.  If nothing has shown up after about 15-30 seconds (Konqueror, IE), try reloading.  In the event of continued failures, you will probably need to <a href="/comments/email.html">email your comments</a> instead.   You can <a href="http://gplv3.fsf.org/comments/rt/changeshown.html?came_from=readsay.html">search</a> and <a href="http://gplv3.fsf.org/comments/rt/readsay.html?Query=%20'CF.NoteUrl'%20LIKE%20'gplv3-draft-1'%20&amp;Order=DESC">browse</a> comments on any browser.</span><span id="querydiv" style="display:none"></span>
56           <span id="login" class="login"></span>
57 </div>
58       <div class="portlet" id="portlet-dogear">
59         <div class="portletBody">
60           <img alt="" src="http://gplv3.fsf.org/dogear.png" />
61         </div>
62       </div>
63
64    <h1 id="portal-logo">
65      <a href="http://gplv3.fsf.org" accesskey="1">GPLv3</a>
66 </h1>
67
68     <ul id="portal-globalnav">
69         <li class="plain">
70             <a href="http://gplv3.fsf.org">Home</a></li>
71         <li class="selected">
72             <a href="http://gplv3.fsf.org/comments/">Comments</a></li>
73         <li class="plain">
74             <a href="http://gplv3.fsf.org/wiki/">Wiki</a></li>
75         <li class="plain">
76             <a href="http://gplv3.fsf.org/press">Press</a></li>
77         <li id="portaltab-support" class="plain">
78             <a href="http://gplv3.fsf.org/support">Support</a></li>
79     </ul>
80
81 <ul id="portal-personaltools"><li>&#160;</li></ul>
82
83           
84
85
86         <div id="maintext">
87 <div class="selfdoc"><p>Click on highlighted phrases to see the comments that have been made about them.<br/>
88 Phrases that are subject to more comments are highlighted more intensely:
89 <tt><span style="font-size: large; font-weight: bold"><span class="a1">f</span><span class="a2">e</span><span class="a3">w</span><span class="a4">&#160;</span><span class="a5">c</span><span class="a6">o</span><span class="a7">m</span><span class="a8">m</span><span class="a9">e</span><span class="a10">n</span><span class="a11">t</span><span class="a12">s</span><span class="a13">&#160;man</span><span class="a14">y</span><span class="a15">&#160;</span><span class="a16">c</span><span class="a17">o</span><span class="a18">m</span><span class="a19">m</span><span class="a20">e</span><span class="a21">n</span><span class="a22">t</span><span class="a23">s</span><span class="a24">&#160;</span></span></tt></p>
90   <p><a href="#" onmousedown="javascript:XpathSel()">select some text and then type "c" to submit comments.</a><br/>
91 <a href="http://gplv3.fsf.org/wiki/index.php/Comment_system">more documentation</a></p>
92
93 </div>
94           <xsl:apply-templates/>
95         </div>
96
97 <!--    <div id="bottombar">
98         <a href="stet-latest.tar.gz">get the latest source code for this comment system</a>
99         </div>   -->
100       </body>
101     </html>
102   </xsl:template>
103
104
105
106   <xsl:template match="//head">
107     <div id="title"><h1><p id="title.0"><span id="title.0.0"><xsl:value-of select="title"/></span></p></h1>
108     <p id="title.1"><span id="title.1.0"><xsl:value-of select="pubdate"/></span></p>
109     <p id="status.0"><span id="status.0.0"><strong><xsl:value-of select="status"/></strong></span></p>
110     <p id="copyright.0"><span id="copyright.0.0">Copyright (C) <xsl:value-of select="copyright/year"/> 
111     
112     <xsl:text> </xsl:text>
113     <xsl:value-of select="copyright/holder"/>
114     <br/>
115     <xsl:value-of select="legalnotice/address/street"/>
116     <xsl:text> </xsl:text>
117     <xsl:value-of select="legalnotice/address/city"/>
118     <xsl:text> </xsl:text>
119     <xsl:value-of select="legalnotice/address/state"/>
120     <xsl:text> </xsl:text>
121     <xsl:value-of select="legalnotice/address/postcode"/>
122     <xsl:text> </xsl:text>
123     <xsl:value-of select="legalnotice/address/country"/>
124     <br/> <br/>
125     <xsl:value-of select="legalnotice/p"/>
126     </span></p>
127     </div>    
128
129   </xsl:template>
130   
131   <xsl:template match="//body">
132
133     <xsl:for-each select="section">
134       <div id="{@id}" name="{@id}">
135        <p class="sectTitle" id="{@id}.0"><span id="{@id}.0.0"><xsl:value-of select="title"/></span></p>
136        <p class="sectTitle sub" id="{@id}.0.0.0"><span id="{@id}.0.0.0.0"><xsl:value-of select="subtitle"/></span></p>
137         <xsl:for-each select="p">
138           <p id="{@id}" name="{@id}">
139             <xsl:for-each select="sent">
140               <span id="{@id}" name="{@id}">
141                 <xsl:apply-templates select='node()|@*' />
142                 <xsl:text>  </xsl:text>
143               </span>
144             </xsl:for-each>
145             <xsl:if test="orderedlist/listitem/p">
146               <ol type="a">
147                 <xsl:for-each select="orderedlist/listitem/p">
148                   <li>
149                     <xsl:for-each select="sent">
150                       <xsl:apply-templates select='node()|@*' />
151                       <!-- <span id="{@id}">
152                         <xsl:copy-of select="del|add"/>
153                         <xsl:value-of select="."/>                      
154                       </span> -->
155                       
156                     </xsl:for-each>
157                   </li>
158                 </xsl:for-each>
159               </ol>
160             </xsl:if>
161           </p>
162         </xsl:for-each>
163       </div>
164     </xsl:for-each>
165
166   </xsl:template>
167
168 <xsl:template match="node()|@*">
169   <xsl:copy>
170     <xsl:apply-templates select="node()|@*" />
171   </xsl:copy>
172 </xsl:template>
173
174 <xsl:template match="del|add">
175   <em class="{name(.)}" reason="{@reason}">
176     <xsl:value-of select="."/>
177   </em>
178 </xsl:template>
179
180 <xsl:template match="//sent[@id='terms.0.p2.s1']">
181   <span class="highlight"><xsl:value-of select="."/></span>
182 </xsl:template>
183
184
185 </xsl:stylesheet>
186