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-render.xsl (-6 / +30 lines)
Lines 29-37 Link Here
29
    <xsl:include href="url-encode.xsl"/>
29
    <xsl:include href="url-encode.xsl"/>
30
    
30
    
31
    <xsl:template match="/plan:plan">
31
    <xsl:template match="/plan:plan">
32
    	<div id="rendered-plan">
32
        <html>
33
            <body>
33
                <xsl:apply-templates select="." mode="plan"/>
34
                <xsl:apply-templates select="." mode="plan"/>
34
        </div>
35
            </body>
36
        </html>
35
    </xsl:template>
37
    </xsl:template>
36
    
38
    
37
    <!-- Start processing the Project Plan -->
39
    <!-- Start processing the Project Plan -->
Lines 155-161 Link Here
155
        <xsl:variable name="url">https://bugs.eclipse.org/</xsl:variable>
157
        <xsl:variable name="url">https://bugs.eclipse.org/</xsl:variable>
156
        <xsl:variable name="rdf"><xsl:text>&amp;ctype=rdf&amp;columnlist=bug_id,short_desc,target_milestone,bug_status</xsl:text></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>
157
        <xsl:variable name="actualurl">
159
        <xsl:variable name="actualurl">
158
            <xsl:value-of select="normalize-space(.)"/>
160
            <xsl:call-template name="replaceCharsInString">
161
                <xsl:with-param name="stringIn">
162
                    <xsl:call-template name="replaceCharsInString">
163
                        <xsl:with-param name="stringIn" select="normalize-space(.)"/>
164
                        <xsl:with-param name="charsIn">%5D</xsl:with-param>
165
                        <xsl:with-param name="charsOut">]</xsl:with-param>             
166
                    </xsl:call-template>
167
                </xsl:with-param>
168
                <xsl:with-param name="charsIn">%5B</xsl:with-param>
169
                <xsl:with-param name="charsOut">[</xsl:with-param>             
170
            </xsl:call-template>
159
        </xsl:variable>
171
        </xsl:variable>
160
        <xsl:variable name="test">
172
        <xsl:variable name="test">
161
            <xsl:value-of select="substring($actualurl, 1, 25)"/>
173
            <xsl:value-of select="substring($actualurl, 1, 25)"/>
Lines 184-192 Link Here
184
                </xsl:when>
196
                </xsl:when>
185
                <xsl:when test="substring($actualurl, 1, 24) = 'http://bugs.eclipse.org/'">
197
                <xsl:when test="substring($actualurl, 1, 24) = 'http://bugs.eclipse.org/'">
186
                    <xsl:value-of select="$url"/>
198
                    <xsl:value-of select="$url"/>
187
                    <xsl:call-template name="url-encode">
199
                    <xsl:call-template name="replaceCharsInString">
188
                        <xsl:with-param name="str" select="substring($actualurl,25)"/>
200
                        <xsl:with-param name="stringIn">
189
                    </xsl:call-template>
201
                            <xsl:call-template name="replaceCharsInString">
202
                                <xsl:with-param name="stringIn">
203
                                    <xsl:call-template name="url-encode">
204
                                        <xsl:with-param name="str" select="substring($actualurl,25)"/>
205
                                    </xsl:call-template>
206
                                </xsl:with-param>
207
                                <xsl:with-param name="charsIn">%265B</xsl:with-param>
208
                                <xsl:with-param name="charsOut">[</xsl:with-param>             
209
                            </xsl:call-template>
210
                        </xsl:with-param>
211
                        <xsl:with-param name="charsIn">%265D</xsl:with-param>
212
                        <xsl:with-param name="charsOut">]</xsl:with-param>             
213
                    </xsl:call-template> 
190
                    <xsl:value-of select="$rdf"/>
214
                    <xsl:value-of select="$rdf"/>
191
                </xsl:when>
215
                </xsl:when>
192
            </xsl:choose>
216
            </xsl:choose>
(-)project-plan.php (-92 / +17 lines)
Lines 165-176 Link Here
165
</div>
165
</div>
166
<?php
166
<?php
167
} else {
167
} else {
168
169
170
168
/*
171
/*
169
 * Load the XML file
172
 * Load the XML file
170
 */
173
 */
171
$xml = @simplexml_load_file( $url );
174
 xml = new DomDocument();
172
if( $xml === false 
175
$xml->load($url);
173
 || !isset($xml->themes_and_priorities->theme) ) {
176
 
177
if( $xml === false) ) {
174
 	$contents = @file_get_contents( $url );
178
 	$contents = @file_get_contents( $url );
175
 	if( !$contents ) {
179
 	if( !$contents ) {
176
 		show_error_page( 'the project meta-data "projectplanurl" (' . $url . ') points to an empty file.', $projectid );
180
 		show_error_page( 'the project meta-data "projectplanurl" (' . $url . ') points to an empty file.', $projectid );
Lines 186-281 Link Here
186
190
187
// ----------------------------------------------------------------------------
191
// ----------------------------------------------------------------------------
188
// OUTPUT
192
// OUTPUT
189
?>
193
/* create the processor and import the stylesheet */
190
<div id="maincontent">
194
$xsl = new DomDocument();
191
<div id="midcolumn">
195
$xsl->load("project-plan-render.xsl");
192
196
193
<h1>Project Plan for 
197
$proc = new XsltProcessor();
194
<a href="http://www.eclipse.org/projects/project_summary.php?projectid=<?= $projectid ?>"><span
198
$xsl = $proc->importStylesheet($xsl);
195
style="font-size: 140%"><?= $projectname ?></span></a>, version <?= $xml->release->attributes()->version ?></h1>
199
$proc->setParameter(null, "projectName", $projectname);
196
<h2>Introduction</h2>
200
$proc->setParameter(nuul, "projectId", $projectid);
197
<?= $xml->introduction ?>
198
<h2>Release Deliverables</h2>
199
<?= $xml->release_deliverables ?>
200
<h2>Release Milestones</h2>
201
<p><?= $xml->release_milestones->preamble ?></p>
202
<table border="1" align="center">
203
<?php
204
foreach ($xml->release_milestones->milestone as $milestone ) {
205
	?><tr><td><b><?= $milestone->attributes()->milestone ?></b></td>
206
	 <td><?= $milestone->attributes()->date ?></td>
207
	 <td><?= $milestone ?></td></tr>
208
<?php
209
}
210
?>
211
</table>
212
<p><?= $xml->release_milestones->postamble ?></p>
213
<h2>Target Environments</h2>
214
<?= $xml->target_environments ?>
215
<h3>Internationalization</h3>
216
<?= $xml->target_environments->internationalization ?>
217
<h2>Compatibility With Previous Releases</h2>
218
<?= $xml->compatibility_with_previous_releases ?>
219
201
220
<h2>Themes and Priorities</h2>
202
/* transform and output the xml document */
221
<p><?= $xml->themes_and_priorities->preamble ?></p>
203
$echo = $proc->transformToXML($xml);
222
<?php
223
$list = array();
224
for( $i = 0; isset($xml->themes_and_priorities->theme[$i]); $i++ ) {
225
	$list[] = $xml->themes_and_priorities->theme[$i];
226
}
227
foreach( $list as $plan_theme ) {
228
	?><h3><?= $plan_theme->attributes()->name ?></h3>
229
	<?php
230
	if( $plan_theme->description != null ) {
231
		?><p style="margin-top: -6px"><?= $plan_theme->description ?></p>
232
		<?php
233
	}
234
	?>
235
	<ul><?php 
236
	?><li><b>Committed</b><ul><?php echo "\n";
237
	if( $plan_theme->committed->attributes()->bugzilla != null ) {
238
		report_bugzillas( $plan_theme->committed->attributes()->bugzilla );
239
	} else {
240
		if( trim($plan_theme->committed) ) {
241
			echo $plan_theme->committed;
242
		} else {
243
			?><ul><li><em>no items</em></li></ul><?php
244
		}
245
	}
246
	?></ul></li><li><b>Proposed</b><ul><?php echo "\n";
247
	if( $plan_theme->proposed->attributes()->bugzilla != null ) {
248
		report_bugzillas( $plan_theme->proposed->attributes()->bugzilla );
249
	} else {
250
		if( trim($plan_theme->proposed) ) {
251
			echo $plan_theme->proposed;
252
		} else {
253
			?><ul><li><em>no items</em></li></ul><?php
254
		}
255
	}
256
	?></ul></li><li><b>Deferred</b><ul><?php echo "\n";
257
	if( $plan_theme->deferred->attributes()->bugzilla != null ) {
258
		report_bugzillas( $plan_theme->deferred->attributes()->bugzilla );
259
	} else {
260
		if( trim($plan_theme->deferred) ) {
261
			echo $plan_theme->deferred;
262
		} else {
263
			?><ul><li><em>no items</em></li></ul><?php
264
		}
265
	}
266
	?></ul></li></ul><?php  echo "\n";
267
}
268
269
$idx = 0;
270
foreach( $xml->appendix as $appendix ) {
271
	$appidx = substr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", $idx, 1);
272
	?><h2>Appendix <?= $appidx ?>. <?= $appendix->attributes()->name ?></h2>
273
	<?= $xml->appendix ?>
274
	<?php
275
}
276
?>
277
<?php
278
}// if( $xml === false )
279
?>
204
?>
280
<div style="float: right; text-align: right"><a href="?projectid=<?= $projectid ?>&raw=1">view raw xml of project plan</a><br>
205
<div style="float: right; text-align: right"><a href="?projectid=<?= $projectid ?>&raw=1">view raw xml of project plan</a><br>
281
<a href="/projects/dev_process/project-status-infrastructure.php">from project meta-data key "projectplanurl"</a></div>
206
<a href="/projects/dev_process/project-status-infrastructure.php">from project meta-data key "projectplanurl"</a></div>
(-)project-plan.xsl (-30 / +36 lines)
Lines 1-34 Link Here
1
<?xml version="1.0" encoding="ISO-8859-1"?>
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
3
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
3
    <xsl:template match="/plan">
5
<xsl:template match="/plan">
4
        <html>
6
<html>
5
            <body>
7
<body>
6
                <div style="width: 600px">
8
<div style="width: 600px">
7
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
9
<table width="100%" border="0" cellpadding="0" cellspacing="0">
8
                        <tr style="background-image: url(http://dash.eclipse.org/dash/commits/web-app/header_bg.gif);">
10
<tr style="background-image: url(http://dash.eclipse.org/dash/commits/web-app/header_bg.gif);">
9
                            <td>
11
<td>
10
                                <a href="http://www.eclipse.org/">
12
<a href="http://www.eclipse.org/"><img src="http://dash.eclipse.org/dash/commits/web-app/header_logo.gif" width="163" height="68" border="0" alt="Eclipse Logo" class="logo" /></a>
11
                                    <img src="http://dash.eclipse.org/dash/commits/web-app/header_logo.gif" width="163" height="68" border="0" alt="Eclipse Logo" class="logo"/>
13
</td>
12
                                </a>
14
<td align="right" style="color: white; font-family: verdana,arial,helvetica; font-size: 1.25em; font-style: italic; padding-right: 10px"><b>Eclipse Project Plan </b> </td>
13
                            </td>
15
</tr>
14
                            <td align="right" style="color: white; font-family: verdana,arial,helvetica; font-size: 1.25em; font-style: italic; padding-right: 10px">
16
</table>
15
                                <b>Eclipse Project Plan </b>
17
<p style="font-family: arial,helvetica; ">
16
                            </td>
18
This Eclipse project plan for the <b><xsl:value-of select="release/@projectid"/> project</b>
17
                        </tr>
19
is an XML document whose tags have 
18
                    </table>
20
<a href="http://wiki.eclipse.org/index.php/Development_Resources/Project_Plan">defined semantics</a>.
19
                    <p style="font-family: arial,helvetica; ">
21
Please use the 
20
                        This Eclipse project plan for the
22
<a>
21
                        <b>
23
 <xsl:attribute name="href">
22
                            <xsl:value-of select="release/@projectid"/>
23
                            project
24
                        </b>
25
                        is an XML document whose tags have
26
                        <a href="http://wiki.eclipse.org/index.php/Development_Resources/Project_Plan">defined semantics</a>
27
                        . Please use the
28
                        <a>
29
                            <xsl:attribute name="href">
24
   /projects/project-plan.php?projectid=<xsl:value-of select="release/@projectid"/>
30
   /projects/project-plan.php?projectid=<xsl:value-of select="release/@projectid"/>
25
 </xsl:attribute>
31
 </xsl:attribute>
26
project plan viewer
32
                            project plan viewer
27
</a>
33
                        </a>
28
to properly interpret these semantics and fully display the plan
34
                        to properly interpret these semantics and fully display the plan and all of its cross links and queries.
29
and all of its cross links and queries.
35
                    </p>
30
</p></div>
36
                </div>
31
</body></html>
37
            </body>
32
</xsl:template>
38
        </html>
33
39
    </xsl:template>
34
</xsl:stylesheet>
40
</xsl:stylesheet>
(-)project-plan-bugzilla.xsl (-7 / +7 lines)
Lines 24-38 Link Here
24
     
24
     
25
	<xsl:template match="bz:bugs">
25
	<xsl:template match="bz:bugs">
26
        <xsl:choose>
26
        <xsl:choose>
27
            <xsl:when test="count(rdf:Seq/child::*) = 0">
27
            <xsl:when test="rdf:Seq/rdf:li/bz:bug">
28
                <p>
29
                    <xsl:text>No items.</xsl:text>
30
                </p>
31
            </xsl:when>
32
            <xsl:otherwise>
33
                <ul>
28
                <ul>
34
                    <xsl:apply-templates select="rdf:Seq/rdf:li/bz:bug"/>
29
                    <xsl:apply-templates select="rdf:Seq/rdf:li/bz:bug"/>
35
                </ul>            
30
                </ul>            
31
            </xsl:when>
32
            <xsl:otherwise>
33
                <p>
34
                    <xsl:text>No items.</xsl:text>
35
                </p>
36
            </xsl:otherwise>
36
            </xsl:otherwise>
37
        </xsl:choose>
37
        </xsl:choose>
38
	</xsl:template>
38
	</xsl:template>
Lines 62-65 Link Here
62
       </li>            
62
       </li>            
63
    </xsl:template>
63
    </xsl:template>
64
    
64
    
65
</xsl:stylesheet>
65
</xsl:stylesheet>
(-)projectplanNS.xsd (+113 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- 
3
4
5
 -->
6
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
7
	elementFormDefault="qualified" targetNamespace="http://www.eclipse.org/project/plan"
8
    xmlns="http://www.eclipse.org/project/plan">
9
	<xsd:element name="plan" type="ProjectPlanType">
10
		<xsd:annotation>
11
			<xsd:documentation>Project Plan Root Element</xsd:documentation>
12
		</xsd:annotation>
13
	</xsd:element>
14
	<xsd:complexType name="ProjectPlanType">
15
		<xsd:sequence>
16
			<xsd:element name="release" type="ReleaseType">
17
				<xsd:annotation>
18
					<xsd:documentation></xsd:documentation>
19
				</xsd:annotation>
20
			</xsd:element>
21
			<xsd:element name="introduction" type="XHTMLUserAreaType" minOccurs="1"/>
22
			<xsd:element name="release_deliverables" type="XHTMLUserAreaType" minOccurs="0"/>
23
			<xsd:element name="release_milestones" type="ReleaseMilestonesType" minOccurs="0"/>
24
			<xsd:element name="target_environments" type="TargetEnvironmentsType" minOccurs="0"/>
25
			<xsd:element name="compatibility_with_previous_releases" type="XHTMLUserAreaType" minOccurs="0"/>
26
			<xsd:element name="themes_and_priorities" type="ThemesAndPrioritiesType" minOccurs="0"/>
27
			<xsd:element name="appendix" type="AppendixType" minOccurs="0" maxOccurs="unbounded"/>
28
		</xsd:sequence>
29
        <xsd:attribute name="plan-format" type="planEnumeratedType"></xsd:attribute>
30
        <xsd:attribute name="name" type="xsd:token">
31
            <xsd:annotation>
32
                <xsd:documentation>
33
                    Project Plan Name
34
                </xsd:documentation>
35
            </xsd:annotation>
36
        </xsd:attribute>
37
	</xsd:complexType>
38
    
39
    <xsd:simpleType name="planEnumeratedType">
40
        <xsd:restriction base="xsd:token">
41
            <xsd:enumeration value="1.0"/>
42
        </xsd:restriction>
43
    </xsd:simpleType>
44
	
45
	<xsd:complexType name="ReleaseType">
46
		<xsd:attribute name="projectid" type="xsd:token"/>
47
		<xsd:attribute name="version" type="xsd:token"/>
48
	</xsd:complexType>
49
50
	<xsd:complexType name="XHTMLUserAreaType">
51
        <xsd:sequence>
52
            <xsd:any namespace="http://www.w3.org/1999/xhtml" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
53
        </xsd:sequence>
54
	</xsd:complexType>
55
	
56
	<xsd:complexType name="TargetEnvironmentsType">
57
        <xsd:sequence>
58
            <xsd:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
59
            <xsd:element name="internationalization" type="XHTMLUserAreaType" minOccurs="0" maxOccurs="unbounded"/>
60
        </xsd:sequence>
61
	</xsd:complexType>
62
	
63
	<xsd:complexType name="ReleaseMilestonesType">
64
		<xsd:sequence>
65
			<xsd:element name="preamble" type="XHTMLUserAreaType" minOccurs="0" maxOccurs="1"/>
66
			<xsd:element name="milestone" type="MilestoneUserAreaType" minOccurs="1" maxOccurs="unbounded"/>
67
			<xsd:element name="postamble" type="XHTMLUserAreaType" minOccurs="0" maxOccurs="1"/>
68
		</xsd:sequence>
69
	</xsd:complexType>
70
	
71
	<xsd:complexType name="MilestoneUserAreaType">
72
		<xsd:complexContent>
73
			<xsd:extension base="XHTMLUserAreaType">
74
				<xsd:attribute name="date" type="xsd:token"></xsd:attribute>
75
				<xsd:attribute name="milestone" type="xsd:token"/>
76
			</xsd:extension>
77
		</xsd:complexContent>
78
	</xsd:complexType>
79
	
80
	<xsd:complexType name="ThemesAndPrioritiesType">
81
		<xsd:sequence>
82
			<xsd:element name="preamble" type="XHTMLUserAreaType" minOccurs="0" maxOccurs="1"/>
83
			<xsd:element name="theme" type="ThemeType" minOccurs="1" maxOccurs="unbounded"/>
84
		</xsd:sequence>
85
	</xsd:complexType>
86
	
87
	<xsd:complexType name="ThemeType">
88
		<xsd:sequence>
89
            <xsd:element name="description" type="XHTMLUserAreaType" minOccurs="0" maxOccurs="unbounded"/>
90
			<xsd:element name="committed" type="BugzillaType" minOccurs="0" maxOccurs="1"/>
91
			<xsd:element name="proposed" type="BugzillaType" minOccurs="0" maxOccurs="1"/>
92
			<xsd:element name="deferred" type="BugzillaType" minOccurs="0" maxOccurs="1"/>
93
		</xsd:sequence>
94
        <xsd:attribute name="name" type="xsd:token" use="required"/>
95
	</xsd:complexType>
96
     
97
    <xsd:complexType name="BugzillaType">
98
        <xsd:complexContent>
99
            <xsd:extension base="XHTMLUserAreaType">
100
                <xsd:attribute name="bugzilla" type="xsd:anyURI" use="optional"/>
101
            </xsd:extension>
102
        </xsd:complexContent>
103
    </xsd:complexType>
104
    
105
	
106
	<xsd:complexType name="AppendixType">
107
		<xsd:complexContent>
108
			<xsd:extension base="XHTMLUserAreaType">
109
				<xsd:attribute name="name" type="xsd:token"/>
110
			</xsd:extension>
111
		</xsd:complexContent>
112
	</xsd:complexType>
113
</xsd:schema>

Return to bug 243303