Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 243303 | Differences between
and this patch

Collapse All | Expand All

(-)project-plan.php (-92 / +17 lines)
Lines 163-174 Link Here
163
</div>
163
</div>
164
<?php
164
<?php
165
} else {
165
} else {
166
167
168
166
/*
169
/*
167
 * Load the XML file
170
 * Load the XML file
168
 */
171
 */
169
$xml = @simplexml_load_file( $url );
172
 xml = new DomDocument();
170
if( $xml === false 
173
$xml->load($url);
171
 || !isset($xml->themes_and_priorities->theme) ) {
174
 
175
if( $xml === false) ) {
172
 	$contents = @file_get_contents( $url );
176
 	$contents = @file_get_contents( $url );
173
 	if( !$contents ) {
177
 	if( !$contents ) {
174
 		show_error_page( 'the project meta-data "projectplanurl" (' . $url . ') points to an empty file.', $projectid );
178
 		show_error_page( 'the project meta-data "projectplanurl" (' . $url . ') points to an empty file.', $projectid );
Lines 184-279 Link Here
184
188
185
// ----------------------------------------------------------------------------
189
// ----------------------------------------------------------------------------
186
// OUTPUT
190
// OUTPUT
187
?>
191
/* create the processor and import the stylesheet */
188
<div id="maincontent">
192
$xsl = new DomDocument();
189
<div id="midcolumn">
193
$xsl->load("project-plan-render.xsl");
190
194
191
<h1>Project Plan for 
195
$proc = new XsltProcessor();
192
<a href="http://www.eclipse.org/projects/project_summary.php?projectid=<?= $projectid ?>"><span
196
$xsl = $proc->importStylesheet($xsl);
193
style="font-size: 140%"><?= $projectname ?></span></a>, version <?= $xml->release->attributes()->version ?></h1>
197
$proc->setParameter(null, "projectName", $projectname);
194
<h2>Introduction</h2>
198
$proc->setParameter(nuul, "projectId", $projectid);
195
<?= $xml->introduction ?>
196
<h2>Release Deliverables</h2>
197
<?= $xml->release_deliverables ?>
198
<h2>Release Milestones</h2>
199
<p><?= $xml->release_milestones->preamble ?></p>
200
<table border="1" align="center">
201
<?php
202
foreach ($xml->release_milestones->milestone as $milestone ) {
203
	?><tr><td><b><?= $milestone->attributes()->milestone ?></b></td>
204
	 <td><?= $milestone->attributes()->date ?></td>
205
	 <td><?= $milestone ?></td></tr>
206
<?php
207
}
208
?>
209
</table>
210
<p><?= $xml->release_milestones->postamble ?></p>
211
<h2>Target Environments</h2>
212
<?= $xml->target_environments ?>
213
<h3>Internationalization</h3>
214
<?= $xml->target_environments->internationalization ?>
215
<h2>Compatibility With Previous Releases</h2>
216
<?= $xml->compatibility_with_previous_releases ?>
217
199
218
<h2>Themes and Priorities</h2>
200
/* transform and output the xml document */
219
<p><?= $xml->themes_and_priorities->preamble ?></p>
201
$echo = $proc->transformToXML($xml);
220
<?php
221
$list = array();
222
for( $i = 0; isset($xml->themes_and_priorities->theme[$i]); $i++ ) {
223
	$list[] = $xml->themes_and_priorities->theme[$i];
224
}
225
foreach( $list as $plan_theme ) {
226
	?><h3><?= $plan_theme->attributes()->name ?></h3>
227
	<?php
228
	if( $plan_theme->description != null ) {
229
		?><p style="margin-top: -6px"><?= $plan_theme->description ?></p>
230
		<?php
231
	}
232
	?>
233
	<ul><?php 
234
	?><li><b>Committed</b><ul><?php echo "\n";
235
	if( $plan_theme->committed->attributes()->bugzilla != null ) {
236
		report_bugzillas( $plan_theme->committed->attributes()->bugzilla );
237
	} else {
238
		if( trim($plan_theme->committed) ) {
239
			echo $plan_theme->committed;
240
		} else {
241
			?><ul><li><em>no items</em></li></ul><?php
242
		}
243
	}
244
	?></ul></li><li><b>Proposed</b><ul><?php echo "\n";
245
	if( $plan_theme->proposed->attributes()->bugzilla != null ) {
246
		report_bugzillas( $plan_theme->proposed->attributes()->bugzilla );
247
	} else {
248
		if( trim($plan_theme->proposed) ) {
249
			echo $plan_theme->proposed;
250
		} else {
251
			?><ul><li><em>no items</em></li></ul><?php
252
		}
253
	}
254
	?></ul></li><li><b>Deferred</b><ul><?php echo "\n";
255
	if( $plan_theme->deferred->attributes()->bugzilla != null ) {
256
		report_bugzillas( $plan_theme->deferred->attributes()->bugzilla );
257
	} else {
258
		if( trim($plan_theme->deferred) ) {
259
			echo $plan_theme->deferred;
260
		} else {
261
			?><ul><li><em>no items</em></li></ul><?php
262
		}
263
	}
264
	?></ul></li></ul><?php  echo "\n";
265
}
266
267
$idx = 0;
268
foreach( $xml->appendix as $appendix ) {
269
	$appidx = substr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", $idx, 1);
270
	?><h2>Appendix <?= $appidx ?>. <?= $appendix->attributes()->name ?></h2>
271
	<?= $xml->appendix ?>
272
	<?php
273
}
274
?>
275
<?php
276
}// if( $xml === false )
277
?>
202
?>
278
<div style="float: right; text-align: right"><a href="?projectid=<?= $projectid ?>&raw=1">view raw xml of project plan</a><br>
203
<div style="float: right; text-align: right"><a href="?projectid=<?= $projectid ?>&raw=1">view raw xml of project plan</a><br>
279
<a href="/projects/dev_process/project-status-infrastructure.php">from project meta-data key "projectplanurl"</a></div>
204
<a href="/projects/dev_process/project-status-infrastructure.php">from project meta-data key "projectplanurl"</a></div>
(-)project-plan-bugzilla.xsl (+65 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
    /*******************************************************************************
4
     * Copyright (c) 2008 Standards for Technology in Automotive Retail and others
5
     * All rights reserved. This program and the accompanying materials
6
     * are made available under the terms of the Eclipse Public License v1.0 
7
     * which accompanies this distribution, and is available at 
8
     * http://www.eclipse.org/legal/epl-v10.html
9
     *
10
     * Contributors:
11
     *    David Carver (STAR) - bug 243303 - initial API and implementation
12
     *******************************************************************************/
13
-->
14
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
16
                xmlns:bz="http://www.bugzilla.org/rdf#"
17
                xmlns:nc="http://home.netscape.com/NC-rdf#"
18
                xmlns="http://www.w3.org/1999/xhtml"
19
                exclude-result-prefixes="rdf bz nc">
20
    <!-- 
21
        This process the RDF file returned from the bugzilla query when ctype=rdf is
22
        specified.    
23
     -->
24
     
25
	<xsl:template match="bz:bugs">
26
        <xsl:choose>
27
            <xsl:when test="count(rdf:Seq/child::*) = 0">
28
                <p>
29
                    <xsl:text>No items.</xsl:text>
30
                </p>
31
            </xsl:when>
32
            <xsl:otherwise>
33
                <ul>
34
                    <xsl:apply-templates select="rdf:Seq/rdf:li/bz:bug"/>
35
                </ul>            
36
            </xsl:otherwise>
37
        </xsl:choose>
38
	</xsl:template>
39
    
40
    <xsl:template match="bz:bug">
41
        <li>
42
            <xsl:value-of select="bz:short_desc"/>
43
            <xsl:text> [</xsl:text>
44
            <a href="http://bugs.eclipse.org/{bz:id}">
45
                <xsl:value-of select="bz:id"/>
46
            </a>
47
            <xsl:text>] </xsl:text>
48
            <xsl:choose>
49
                <xsl:when test="bz:bug_status = 'RESOLVED' or bz:bug_status = 'VERIFIED' or bz:bug_status = 'CLOSED'">
50
                    <strike>
51
                        <xsl:text>(target milestone: </xsl:text>
52
                        <xsl:value-of select="bz:target_milestone"/>
53
                        <xsl:text>)</xsl:text>
54
                    </strike>    
55
                </xsl:when>
56
                <xsl:otherwise>
57
                    <xsl:text>(target milestone: </xsl:text>
58
                    <xsl:value-of select="bz:target_milestone"/>
59
                    <xsl:text>)</xsl:text>
60
                </xsl:otherwise>
61
            </xsl:choose>
62
       </li>            
63
    </xsl:template>
64
    
65
</xsl:stylesheet>
(-)project-plan-render.xsl (+288 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
    <!--
3
    /*******************************************************************************
4
     * Copyright (c) 2008 Standards for Technology in Automotive Retail and others
5
     * All rights reserved. This program and the accompanying materials
6
     * are made available under the terms of the Eclipse Public License v1.0 
7
     * which accompanies this distribution, and is available at 
8
     * http://www.eclipse.org/legal/epl-v10.html
9
     *
10
     * Contributors:
11
     *    David Carver (STAR) - bug 243303 - initial API and implementation
12
     *******************************************************************************/
13
    -->
14
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15
                xmlns:plan="http://www.eclipse.org/project/plan"
16
                xmlns:html="http://www.w3.org/1999/xhtml"
17
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
18
                xmlns:bz="http://www.bugzilla.org/rdf#"
19
                xmlns:nc="http://home.netscape.com/NC-rdf#"
20
                xmlns="http://www.w3.org/1999/xhtml"
21
    exclude-result-prefixes="html plan rdf bz nc" >
22
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
23
    <xsl:param name="projectName"> 
24
        <xsl:text>Project Name Here</xsl:text>
25
    </xsl:param>
26
    <xsl:param name="projectId" select="/plan:plan/plan:release/@projectid"/>
27
    
28
    <xsl:include href="project-plan-bugzilla.xsl"/>
29
    <xsl:include href="url-encode.xsl"/>
30
    
31
    <xsl:template match="/plan:plan">
32
        <html>
33
            <body>
34
                <xsl:apply-templates select="." mode="plan"/>
35
            </body>
36
        </html>
37
    </xsl:template>
38
    
39
    <!-- Start processing the Project Plan -->
40
    <xsl:template match="plan:plan" mode="plan">
41
        <div id="maincontent">
42
            <div id="midcolumn">
43
                <h1>
44
                    <span style="font-size: 140%">Project Plan For
45
                        <a href="http://www.eclipse.org/projects/project_summary.php?projectid={$projectId}">
46
                            <xsl:value-of select="$projectName"/> 
47
                        </a>
48
                    </span>
49
                    <xsl:text>, version </xsl:text>
50
                    <xsl:value-of select="plan:release/@version"/>
51
                </h1>
52
                <xsl:apply-templates select="plan:*"/>
53
            </div>
54
        </div>            
55
    </xsl:template>
56
    
57
    <xsl:template match="plan:introduction">
58
        <h2>Introduction</h2>
59
        <xsl:call-template name="copyNodeorCData">
60
            <xsl:with-param name="node" select="."/>
61
        </xsl:call-template>
62
    </xsl:template>
63
    
64
    <xsl:template match="plan:release_deliverables">
65
        <h2>Release Deliverables</h2>
66
        <xsl:call-template name="copyNodeorCData">
67
            <xsl:with-param name="node" select="."/>
68
        </xsl:call-template>
69
    </xsl:template>
70
    
71
    <xsl:template match="plan:release_milestones">
72
        <h2>Release Milestones</h2>
73
        <xsl:apply-templates select="plan:preamble"/>
74
        <table border="1" align="center">
75
            <xsl:apply-templates select="plan:milestone"/>
76
        </table>
77
        <xsl:apply-templates select="plan:postamble"/>
78
    </xsl:template>
79
    
80
    <xsl:template match="plan:milestone">
81
        <tr>
82
            <td>
83
                <b>
84
                    <xsl:value-of select="@milestone"/>
85
                </b>
86
            </td>
87
            <td>
88
                <xsl:value-of select="@date"/>
89
            </td>
90
            <td>
91
                <xsl:call-template name="copyNodeorCData">
92
                    <xsl:with-param name="node" select="."/>
93
                </xsl:call-template>
94
            </td>
95
        </tr>
96
    </xsl:template>
97
    
98
    <xsl:template match="plan:preamble | plan:postamble">
99
        <xsl:call-template name="copyNodeorCData">
100
            <xsl:with-param name="node" select="."/>
101
        </xsl:call-template>
102
    </xsl:template>
103
    
104
    <xsl:template match="plan:target_environments">
105
        <h2>Target Environments</h2>
106
        <xsl:call-template name="copyNodeorCData">
107
            <xsl:with-param name="node" select="."/>
108
        </xsl:call-template>
109
        <xsl:if test="plan:internationalization">
110
            <h3>Internationalization</h3>
111
            <xsl:apply-templates select="plan:internationalization"/>
112
        </xsl:if>
113
    </xsl:template>
114
    
115
    <xsl:template match="themes_and_priorities">
116
        <h2>Themese and Priorities</h2>
117
        <xsl:apply-templates/>
118
    </xsl:template>
119
    
120
    <xsl:template match="themes">
121
        <h3><xsl:value-of select="@name"/></h3>
122
        <xsl:if test="description">
123
            <xsl:apply-templates select="plan:description"/>
124
        </xsl:if>
125
        <xsl:if test="committed">
126
            <ul>
127
               <xsl:apply-templates select="plan:committed"/>
128
            </ul>
129
        </xsl:if>
130
        <xsl:if test="proposed">
131
            <ul>
132
                <xsl:apply-templates select="plan:proposed"/>
133
            </ul>
134
        </xsl:if>
135
        <xsl:if test="deferred">
136
            <ul>
137
                <xsl:apply-templates select="plan:deferred"/>
138
            </ul>
139
        </xsl:if>
140
        
141
    </xsl:template>
142
    
143
    <xsl:template match="plan:description">
144
        <xsl:call-template name="copyNodeorCData">
145
            <xsl:with-param name="node" select="."/>
146
        </xsl:call-template>
147
    </xsl:template>
148
    
149
    <xsl:template match="plan:committed">
150
        <xsl:call-template name="ThemeBugzilla">
151
            <xsl:with-param name="node" select="."/>
152
            <xsl:with-param name="section">Committed</xsl:with-param>
153
        </xsl:call-template>
154
    </xsl:template>
155
    
156
    <xsl:template match="@bugzilla">
157
        <xsl:variable name="url">https://bugs.eclipse.org/</xsl:variable>
158
        <xsl:variable name="rdf"><xsl:text>&amp;ctype=rdf&amp;columnlist=bug_id,short_desc,target_milestone,bug_status</xsl:text></xsl:variable>
159
        <xsl:variable name="actualurl">
160
            <xsl:value-of select="normalize-space(.)"/>
161
        </xsl:variable>
162
        <xsl:variable name="test">
163
            <xsl:value-of select="substring($actualurl, 1, 25)"/>
164
        </xsl:variable>
165
        
166
        <xsl:variable name="bugzillaURL">
167
            <xsl:choose>
168
                <xsl:when test="substring($actualurl, 1, 25) = 'https://bugs.eclipse.org/'">
169
                    <xsl:value-of select="$url"/>
170
                    <xsl:call-template name="url-encode">
171
                        <xsl:with-param name="str" select="substring($actualurl,26)"/>
172
                    </xsl:call-template>
173
                    <xsl:value-of select="$rdf"/>
174
                </xsl:when>
175
                <xsl:when test="substring($actualurl, 1, 24) = 'http://bugs.eclipse.org/'">
176
                    <xsl:value-of select="$url"/>
177
                    <xsl:call-template name="url-encode">
178
                        <xsl:with-param name="str" select="substring($actualurl,25)"/>
179
                    </xsl:call-template>
180
                    <xsl:value-of select="$rdf"/>
181
                </xsl:when>
182
            </xsl:choose>
183
        </xsl:variable>
184
        <xsl:choose>
185
            <xsl:when test="string-length($bugzillaURL) > 0">
186
                <xsl:comment>
187
                    <xsl:value-of select="$bugzillaURL"/>
188
                </xsl:comment>
189
                <xsl:apply-templates select="document($bugzillaURL)//bz:bugs"/>
190
            </xsl:when>
191
            <xsl:otherwise>
192
                <html:ul>
193
                    <html:li>
194
                        <html:span style="background-color: #FFCCCC; font-weight: bold; font-size: 150%;">
195
                            Error: url is not a bugs.eclipse.org url
196
                        </html:span>
197
                    </html:li>
198
                </html:ul>                
199
            </xsl:otherwise>
200
        </xsl:choose>
201
    </xsl:template>
202
    
203
    <xsl:template match="plan:proposed">
204
        <xsl:call-template name="ThemeBugzilla">
205
            <xsl:with-param name="node" select="."/>
206
            <xsl:with-param name="section">Propose</xsl:with-param>
207
        </xsl:call-template>
208
    </xsl:template>
209
    
210
    <xsl:template match="plan:deferred">
211
        <xsl:call-template name="ThemeBugzilla">
212
            <xsl:with-param name="node" select="."/>
213
            <xsl:with-param name="section">Deferred</xsl:with-param>
214
        </xsl:call-template>
215
    </xsl:template>
216
    
217
    <xsl:template match="plan:appendix">
218
        <h2>Appendix <xsl:value-of select="@name"/></h2>
219
        <xsl:call-template name="copyNodeorCData">
220
            <xsl:with-param name="node" select="."/>
221
        </xsl:call-template>
222
    </xsl:template>
223
    
224
    <xsl:template name="ThemeBugzilla">
225
        <xsl:param name="node"/>
226
        <xsl:param name="section"/>
227
228
        <li>
229
            <b><xsl:value-of select="$section"/></b>
230
            <ul>
231
                <li>
232
                    <xsl:choose>
233
                        <xsl:when test="@bugzilla">
234
                            <xsl:apply-templates select="@bugzilla"/>
235
                        </xsl:when>
236
                        <xsl:otherwise>
237
                            <xsl:call-template name="copyNodeorCData">
238
                                <xsl:with-param name="node" select="."/>
239
                            </xsl:call-template>
240
                        </xsl:otherwise>
241
                    </xsl:choose>
242
                </li>
243
            </ul>
244
        </li>
245
    </xsl:template>
246
    
247
    <!-- Called Templates these are common routines used by other templates -->
248
    
249
    <xsl:template name="copyNodeorCData">
250
        <xsl:param name="node"/>
251
        <xsl:apply-templates select="$node/html:*"/>
252
    </xsl:template>
253
    
254
    
255
    <xsl:template match=" html:a | html:b | html:big | html:body | html:br | html:caption | 
256
        html:cite | html:code | html:col | html:colgroup | html:dd | html:div | html:dl | html:dt | html:em | html:font | 
257
        html:form | html:head | html:h1 | html:h2 | html:h3 | html:h4 | html:h5 | html:h6 | html:hr | 
258
        html:i | html:img | html:link | html:li | html:ol | 
259
        html:p | html:param | html:pre | html:s | html:small | html:span | html:strong | html:style | 
260
        html:sub | html:sup | html:td | html:th | html:title | html:tr | html:tt | html:ul | html:var | html:table">
261
        <xsl:element name="{local-name()}">
262
            <xsl:copy-of select="@*"/>
263
            <xsl:apply-templates/>
264
        </xsl:element>
265
    </xsl:template>
266
267
    <!-- This routine from http://www.dpawson.co.uk/xsl/sect2/replace.html#d9550e61 -->    
268
    <xsl:template name="replaceCharsInString">
269
      <xsl:param name="stringIn"/>
270
      <xsl:param name="charsIn"/>
271
      <xsl:param name="charsOut"/>
272
      <xsl:choose>
273
        <xsl:when test="contains($stringIn,$charsIn)">
274
          <xsl:value-of select="concat(substring-before($stringIn,$charsIn),$charsOut)"/>
275
          <xsl:call-template name="replaceCharsInString">
276
            <xsl:with-param name="stringIn" select="substring-after($stringIn,$charsIn)"/>
277
            <xsl:with-param name="charsIn" select="$charsIn"/>
278
            <xsl:with-param name="charsOut" select="$charsOut"/>
279
          </xsl:call-template>
280
        </xsl:when>
281
        <xsl:otherwise>
282
          <xsl:value-of select="$stringIn"/>
283
        </xsl:otherwise>
284
      </xsl:choose>
285
    </xsl:template>
286
    
287
    
288
</xsl:stylesheet>
(-)url-encode.xsl (+69 lines)
Added Link Here
1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
4
  <xsl:output method="xml" indent="yes" encoding="iso-8859-1"/>
5
6
  <!-- ISO-8859-1 based URL-encoding demo
7
       Written by Mike J. Brown, mike@skew.org.
8
       Updated 2002-05-20.
9
10
       No license; use freely, but credit me if reproducing in print.
11
12
       Also see http://skew.org/xml/misc/URI-i18n/ for a discussion of
13
       non-ASCII characters in URIs.
14
  -->
15
16
  <!-- The string to URL-encode.
17
       Note: By "iso-string" we mean a Unicode string where all
18
       the characters happen to fall in the ASCII and ISO-8859-1
19
       ranges (32-126 and 160-255) -->
20
  <xsl:param name="iso-string" select="'&#161;Hola, C&#233;sar!'"/>
21
22
  <!-- Characters we'll support.
23
       We could add control chars 0-31 and 127-159, but we won't. -->
24
  <xsl:variable name="ascii"> !?"#$%'()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~</xsl:variable>
25
  <xsl:variable name="latin1">&#160;&#161;&#162;&#163;&#164;&#165;&#166;&#167;&#168;&#169;&#170;&#171;&#172;&#173;&#174;&#175;&#176;&#177;&#178;&#179;&#180;&#181;&#182;&#183;&#184;&#185;&#186;&#187;&#188;&#189;&#190;&#191;&#192;&#193;&#194;&#195;&#196;&#197;&#198;&#199;&#200;&#201;&#202;&#203;&#204;&#205;&#206;&#207;&#208;&#209;&#210;&#211;&#212;&#213;&#214;&#215;&#216;&#217;&#218;&#219;&#220;&#221;&#222;&#223;&#224;&#225;&#226;&#227;&#228;&#229;&#230;&#231;&#232;&#233;&#234;&#235;&#236;&#237;&#238;&#239;&#240;&#241;&#242;&#243;&#244;&#245;&#246;&#247;&#248;&#249;&#250;&#251;&#252;&#253;&#254;&#255;</xsl:variable>
26
27
  <!-- Characters that usually don't need to be escaped -->
28
  <xsl:variable name="safe">&amp;=?/!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:variable>
29
30
  <xsl:variable name="hex" >0123456789ABCDEF</xsl:variable>
31
32
  <xsl:template name="url-encode">
33
    <xsl:param name="str"/>   
34
    <xsl:if test="$str">
35
      <xsl:variable name="first-char" select="substring($str,1,1)"/>
36
      <xsl:choose>
37
        <xsl:when test="contains($safe,$first-char)">
38
          <xsl:value-of select="$first-char"/>
39
        </xsl:when>
40
        <xsl:otherwise>
41
          <xsl:variable name="codepoint">
42
            <xsl:choose>
43
              <xsl:when test="contains($ascii,$first-char)">
44
                <xsl:value-of select="string-length(substring-before($ascii,$first-char)) + 32"/>
45
              </xsl:when>
46
              <xsl:when test="contains($latin1,$first-char)">
47
                <xsl:value-of select="string-length(substring-before($latin1,$first-char)) + 160"/>
48
              </xsl:when>
49
              <xsl:otherwise>
50
                <xsl:message terminate="no">Warning: string contains a character that is out of range! Substituting "?".</xsl:message>
51
                <xsl:text>63</xsl:text>
52
              </xsl:otherwise>
53
            </xsl:choose>
54
          </xsl:variable>
55
        <xsl:variable name="hex-digit1" select="substring($hex,floor($codepoint div 16) + 1,1)"/>
56
        <xsl:variable name="hex-digit2" select="substring($hex,$codepoint mod 16 + 1,1)"/>
57
        <xsl:value-of select="concat('%',$hex-digit1,$hex-digit2)"/>
58
        </xsl:otherwise>
59
      </xsl:choose>
60
      <xsl:if test="string-length($str) &gt; 1">
61
        <xsl:call-template name="url-encode">
62
          <xsl:with-param name="str" select="substring($str,2)"/>
63
        </xsl:call-template>
64
      </xsl:if>
65
    </xsl:if>
66
  </xsl:template>
67
68
</xsl:stylesheet>
69

Return to bug 243303