Bug 243303 - Project Plan XML should have Namespaces
Summary: Project Plan XML should have Namespaces
Status: CLOSED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Project Management & Portal (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Carver CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 243344 (view as bug list)
Depends on: 215301
Blocks: 238434 241822 245273
  Show dependency tree
 
Reported: 2008-08-06 09:51 EDT by David Carver CLA
Modified: 2008-09-17 14:59 EDT (History)
4 users (show)

See Also:


Attachments
Non-namespace corrected version of the Schemas (4.10 KB, application/octet-stream)
2008-08-06 11:13 EDT, David Carver CLA
no flags Details
Namespace specific version of the project plan. (4.16 KB, application/octet-stream)
2008-08-06 15:53 EDT, David Carver CLA
no flags Details
Renders a project plan with namespaces and xhmtl content in the Project Plan format (7.85 KB, application/xml)
2008-08-07 22:03 EDT, David Carver CLA
no flags Details
Renders a project plan with namespaces and xhtml content (11.12 KB, application/octet-stream)
2008-08-10 21:36 EDT, David Carver CLA
no flags Details
Processes Bugzilla Search Results returned as RDF (2.60 KB, application/octet-stream)
2008-08-10 21:37 EDT, David Carver CLA
no flags Details
Takes a string and encodes it for use in uri (3.41 KB, application/octet-stream)
2008-08-10 21:43 EDT, David Carver CLA
no flags Details
Patch file for project-plan.php to use xsl stylesheet for transformation. (22.65 KB, patch)
2008-08-11 18:29 EDT, David Carver CLA
no flags Details | Diff
Fixed version of the dash project plan that renders with the xslt stylesheets (10.42 KB, application/xml)
2008-08-20 16:09 EDT, David Carver CLA
no flags Details
Updated Version of Project Plan Render XSL (11.99 KB, application/xml)
2008-08-21 13:50 EDT, David Carver CLA
no flags Details
Fixes issues with url-encoding (3.41 KB, application/xml)
2008-08-21 13:52 EDT, David Carver CLA
no flags Details
Updated to make most elements optional. (4.45 KB, application/octet-stream)
2008-08-21 14:49 EDT, David Carver CLA
no flags Details
Updated patch for Project Plan. (17.22 KB, patch)
2008-08-21 18:06 EDT, David Carver CLA
no flags Details | Diff
Shellscript for converting non-namespace plan into namespaced version (1.95 KB, application/octet-stream)
2008-09-06 16:33 EDT, Martin Oberhuber CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2008-08-06 09:51:35 EDT
The project plan file will be much easier to integrate with tooling and data binding frameworks if it's elements are defined in a namespace.   This will require only a slight change to the xml file itself, so that it includes a default namespace.

xmlns="http://www.eclipse.org/project/plan"

This namespace doesn't have to resolvable, and a urn could be used instead:

xmlns="urn:org:eclipse:project:plan:1"

I would also suggest instead of using HTML that XHTML be the format for the included description text.  Again, this leverages the advantages of namespace support for various tooling to read and write the XML, and provides a way to validate that the contents are valid according to the schema.

The project plan root element would look like the following:

<plan xmlns="http://www.eclipse.org/project/plan" xmlns:html="http://www.w3.org/1999/xhtml">

</plan>
Comment 1 Martin Oberhuber CLA 2008-08-06 10:38:43 EDT
If these are the only changes required to the actual XML, I'm very much in favor of it. Being able to validate HTML contents with tags like <p><br><b><a> seems much preferable over a single <[!CDATA[ chunk which the XML editor cannot help me with.
Comment 2 Martin Oberhuber CLA 2008-08-06 10:39:49 EDT
Also, am I right that it would be even better if the namespace URL is resolveable to an actual schema?
Comment 3 Ed Merks CLA 2008-08-06 10:49:02 EDT
Making it directly resolvable allows one to avoid things like XML catalog registration.  It can also result in undesirable hits to the web site if many users are loading it "accidentally".  I think the XML Schema for schema namespace used to be directly resolvable to a schema but now resolves to a page from which the schema is accessible. I.e., 

http://www.w3.org/2001/XMLSchema

verses

http://www.w3.org/2001/XMLSchema.xsd 
Comment 4 David Carver CLA 2008-08-06 11:13:57 EDT
Created attachment 109320 [details]
Non-namespace corrected version of the Schemas

This is a corrected version of the schema to fix a Target_release issue that has CDATA issues.

I'll work on a namespace aware version.  Martin this should correct your validation issue.
Comment 5 Martin Oberhuber CLA 2008-08-06 11:39:42 EDT
Yes, with the new attachment my plan validates just fine.

I updated the Wiki on http://wiki.eclipse.org/Development_Resources/Project_Plan to point to the new XSD (and also fixed a typo where the WIki had referenced <![[CDATA[ which should be <![CDATA[).

In order to navigate bugs, I'm also making this one depend on bug 215301 which was used to create the original plan specification.
Comment 6 David Carver CLA 2008-08-06 15:53:00 EDT
Created attachment 109347 [details]
Namespace specific version of the project plan.

This schema implements a namespace specific version of the project plan.  It also, limits the HTML content to XHTML versions, and the content has to be in the http://www.w3.org/1999/xhtml namespace.

<plan xmlns="http://www.eclipse.org/project/plan" xmlns:html="http://www.w3.org/1999/xhtml">

</plan>

If you add the plan namespace to the Web Tools XML Catalog you can avoid having to use xsi:schemaLocation attribute to specify where the xsd file for each of the namespaces are.

The XSD for the XHTML namespace can be found here:

http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd

Again, this should be in the XML Catalog assigned to the appropriate XHTML namespace specified above.
Comment 7 Bjorn Freeman-Benson CLA 2008-08-07 11:35:37 EDT
Dave, the code is in CVS at:
/cvsroot/org.eclipse/www/projects/project-plan.php

I think the best approach is for you to attach a patch to this bug that I can apply and commit. Thanks.
Comment 8 David Carver CLA 2008-08-07 13:56:48 EDT
(In reply to comment #7)
> Dave, the code is in CVS at:
> /cvsroot/org.eclipse/www/projects/project-plan.php
> 
> I think the best approach is for you to attach a patch to this bug that I can
> apply and commit. Thanks.
> 

I've got the code checked out, I need to know a couple of things before I begin any modifications.   Which version of PHP are you guys running on the server?  PHP 4 or PHP 5?

Comment 9 David Carver CLA 2008-08-07 14:40:49 EDT
If you are running PHP 5, I can simplify the project-plan.php render, so that it runs a xsl transformation on the document and then echos that content out as a string so that the web browser will render the information.   This way you can seperate the processing from the display of the xml.   Transformation will happen on the server side, and since these are fairly small xml files and the stylesheet is fairly simple, it shouldn't be any different than the exist process.

I'll work on creating a stylesheet that renders the same information as the Output section of the project-plan.php file, and provide a patch later that can be reviewed.

There are PHP 4 options, but I hope you are running PHP 5 as it will make it much easier.

Comment 10 Bjorn Freeman-Benson CLA 2008-08-07 14:53:46 EDT
(In reply to comment #8)
5.1.8
Comment 11 David Carver CLA 2008-08-07 22:03:04 EDT
Created attachment 109487 [details]
Renders a project plan with namespaces and xhmtl content in the Project Plan format

The stylesheet that is attached does almost everything that the current PHP script does, but with an XSL Stylesheet.   I have to work on parsing the bugzilla xml when a query is run, but that can be done.

Anyways, there are some advantages with the XSL for the person authoring the xml plan.  The main one being is that they can preview what it will look like in their browser before submitting it for final publication at eclipse.   The XSL Stylesheet processing instruction needs to be included in the xml, and the href points to the XSL Stylesheet to render the plan.

The same stylesheet can be used unchanged by the php script using PHP 5 XSLTransformation class.   I'll provide a patch file once I have the XSL working the same as the php script.

I'm providing the script here for comments.
Comment 12 David Carver CLA 2008-08-10 17:48:09 EDT
I've got most of this working except for the Bugzilla query returning the RDF formatted file.  When I do an xslt document() function, which takes in a string, it doesn't appear to be getting back the XML file.   However, when I take the same bugzilla query and run it through the browser it returns the XML file.

Bjorn, what is the difference between the bugzilla at port 8443 that I see in the php script?

Comment 13 David Carver CLA 2008-08-10 21:34:29 EDT
I found the problem it had to do with access as http: instead of https.  Once that was fixed, it worked correctly.

I'll attach the three xsl files (I broke them into modules for easier maintenance).  One thing to note, it uses the document() XSLT function to retrieve the RDF formatted version of the bugzilla query.  Some XSLT engines within web browsers may not allow this to go to a site outside of the current host for security reasons.   I've tested this pretty extensively with Xalan 2.7.1 and it appears to be working.   The PHP libxslt should not have a problem with this either, as it fully supports the document() xslt function without restrictions.

Other browser support may vary, and it is recommended that these stylesheets run on the server instead of the browser.

The main stylseheet is project-plan-render.xsl, and it imports encode-url.xsl and project-plan-bugzilla.xsl to handle the RDF and url encoding.

I'm going to wait until somebody gives this a try with the new format before patching the PHP project plan file so that it renders this page.
Comment 14 David Carver CLA 2008-08-10 21:36:15 EDT
Created attachment 109614 [details]
Renders a project plan with namespaces and xhtml content

Main stylesheet that starts the project plan rendering process.  Outputs the same content as the existing php script.
Comment 15 David Carver CLA 2008-08-10 21:37:37 EDT
Created attachment 109615 [details]
Processes Bugzilla Search Results returned as RDF

Processes the contents of the RDF search results, and generates the list of bugs.  This is used by the project-plan-render.xsl.
Comment 16 David Carver CLA 2008-08-10 21:43:21 EDT
Created attachment 109616 [details]
Takes a string and encodes it for use in uri

This script is modified from Mike J. Brown's template, availabe at:

http://skew.org/xml/

XSLT 1.0 does not have function to encode a string so that it is URI friendly.  This template takes a string as input and outputs an encoded URI friendly string.  License information is documented within the file.

This is required by project-plan-render.xsl to get a correctly encoded uri for processing.  We can't rely on the search string being encoded correctly.
Comment 17 Martin Oberhuber CLA 2008-08-11 04:08:56 EDT
Can I try this out locally, or does this require a staging webserver?
Comment 18 Martin Oberhuber CLA 2008-08-11 08:09:55 EDT
Comment on attachment 109616 [details]
Takes a string and encodes it for use in uri

I changed the MIME type of the 3 recent attachments to application/octet-stream in order to preserve the original attachment name for "save as" operation in Firefox.

I'm ready to test this (could commit all XML's to the www.eclipse.org/dsdp/tm/development area in order to do server side testing), but at the moment I don't understand how the parameters "projectId" and "projectName" get passed into the XSL for rendering.

See also my recent contribution on bug 238434 comment 5 for rendering arbitrary specified plans instead of just "the one" specified by the Portal.
Comment 19 David Carver CLA 2008-08-11 09:34:31 EDT
(In reply to comment #17)
> Can I try this out locally, or does this require a staging webserver?
> 
Yes you can test it locally.  Just have your XML point to the project-plan-render.xsl stylesheet.  Make sure you have all three stylesheets stored locally.


(In reply to comment #18)
> (From update of attachment 109616 [details])
> I changed the MIME type of the 3 recent attachments to application/octet-stream
> in order to preserve the original attachment name for "save as" operation in
> Firefox.
> 
> I'm ready to test this (could commit all XML's to the
> www.eclipse.org/dsdp/tm/development area in order to do server side testing),
> but at the moment I don't understand how the parameters "projectId" and
> "projectName" get passed into the XSL for rendering.

If you are using the Web Browser to execute the stylesheets you can't pass the paramaters.   However, if you download and install the XSL Tools incubator project, you can get the ability to setup Launch configurations for your transformation.  You can then add the parameter names and values to pass into the stylesheet.

Ideally, I think the plan should contain either an element or an attribute that contains the name of the project plan.   This way that information can be retrieved from the XML and it pretty much eliminates the need for the parameters at all.

The XSL Tools incubating component can be downloaded from the Web Tools 3.0 update site (it isn't included in the Ganymede release).  I recommend telling the launch configurations not to use the default JRE processor, but to use Xalan 2.7.1 which is included with XSL Tools.  Sun has defaulted transformations to XSLTC which has problems if files can't be found.



> 
> See also my recent contribution on bug 238434 comment 5 for rendering arbitrary
> specified plans instead of just "the one" specified by the Portal.
> 

Comment 20 David Carver CLA 2008-08-11 18:29:19 EDT
Created attachment 109719 [details]
Patch file for project-plan.php to use xsl stylesheet for transformation.

Here is a patch to the website project that should allow for the use of the xsl transformation.  It uses the XML DOM and XSL Processor classes from PHP 5 that are namespace aware (unlike SimpleXML).  The project-plan-render.xsl may need a tweak to remove the html and body elements that are currently there since it still embedds the content in the rest of the php generated page.

I haven't tested this yet, so it will need some debugging on the eclipse side.  Bjorn I'll re-assign this back to you for further investigation.
Comment 21 David Carver CLA 2008-08-11 18:31:46 EDT
Apparently I can't re-assign it to Bjorn.  Bjorn you'll need to review the patch and test it out to make sure it works as advertised.

Comment 22 Bjorn Freeman-Benson CLA 2008-08-19 14:35:24 EDT
Dave, I applied the patch by creating a new file:
http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash
It produces some odd results: I don't think that's what you meant for it to do. Debug and attach a new patch?
Comment 23 David Carver CLA 2008-08-19 15:11:39 EDT
This patch and XSLT currently only work with the namespaced XML file.   If we need to make it work with a the non-namespaced version, then we'll need a slightly modified version of the XSLT.
Comment 24 Bjorn Freeman-Benson CLA 2008-08-20 12:10:56 EDT
Dave, I admit my XML ignorance here, but what do I need to do to turn my original technology.dash project plan.xml file into a namespaced file? I thought I did, but the rendering still isn't working:
* Here is the rendering: http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash
* Here is my XML file: http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash&raw=1
Comment 25 David Carver CLA 2008-08-20 12:53:48 EDT
While you have the default namespace defined, and the namespace for xhtml defined, you aren't using the xhmtl namespace in your xml.

Currently the XML isn't valid against the schema provided here.   What you need to do is make sure that you are using the xhtml namespace.

<plan xmlns="http://www.eclipse.org/project/plan" xmlns:html="http://www.w3.org/1999/xhtml">
  <release projectid="technology.dash" version="1.0"/>
    <introduction>
    <html:p>The Dash project currently does not produce an Eclipse plug-in and thus does not have
    a traditional release cycle. Dash currently produces tools for committers that are deployed
    on various eclipse.org servers. These deployments are done incrementally, often daily, whenever
    new functionality is needed. We roll these deployments up into monthly milestones for
    reporting.</html:p>
    <html:p>The Dash project is divided into two parts: Dash and Dash-prime. Dash is the open source
    project and Dash-prime is the closed, internal-to-the-Foundation, code base. Even though
    the Dash-prime code base is closed, the planning, discussions, and bug activities are open.
    Thus this project plan covers both Dash and Dash-prime.
    </html:p>
  </introduction>

I'd definitely recommend if you haven't installing the WTP's Web Standard Tools, as you can generate a sample XML document from the Schema attached here, and also validate your XML instances.   If you have a valid instance, you the transformation should work.    The XSLT stylesheet works off of the plan instance and relies on the elements being in the correct namespace.   With out prefixing the XHTML elements the stylesheet assumes they are part of the Plan namespace and won't process them correctly.
Comment 26 Bjorn Freeman-Benson CLA 2008-08-20 15:35:10 EDT
Your patch didn't include the plan.xsd file, so I've added to /projects now - hope that was the correct thing to do.

Anyway, I add the <html:p> namespace and now I'm getting something, but it's still not showing the milestone descriptions (text) nor the lists of bugs under each Theme.
???
Comment 27 David Carver CLA 2008-08-20 15:49:08 EDT
(In reply to comment #26)
> Your patch didn't include the plan.xsd file, so I've added to /projects now -
> hope that was the correct thing to do.
> 
> Anyway, I add the <html:p> namespace and now I'm getting something, but it's
> still not showing the milestone descriptions (text) nor the lists of bugs under
> each Theme.
> ???
> 

I'll take a look at the html, and the stylesheets.  I'll attach any corrections here.

Comment 28 David Carver CLA 2008-08-20 16:09:05 EDT
A couple of things, when I added the project plan namespace and hte projectplanNS.xsd to the XML Catalog and used the WTP XML Editor to review and validate the file.

1. milestone content needs to have xhtml content.  Currently your file just has text.  It needs to be surrounded with a <html:p> </html:p> element.

2. There is no postamble...is a preamble and postamble going to be required, or are these optionals?

3. On your milestone, you have a bugzilla attribute that doesn't have any content.  If there is no content, just don't include the bugzilla attribute.  A valid URL is expected if you have the bugzilla attribute.

4. internationalization content needs to have a html:p element and the content included in there.

The XSD is also expecting compatiblity_with_previous_release and an appendix element.  If these aren't required let me know and I can modify the schema so that it doesn't require these to be included.

All of these errors can be caught using the XML Catalog and the WTP tools.  I'll attach a corrected version of your plan.xml file that should get you the milestone information.  Since there is no bugzilla attributes for the themes, it doesn't display anything there, so we may need to tweak the XSLT a bit.
Comment 29 David Carver CLA 2008-08-20 16:09:57 EDT
Created attachment 110492 [details]
Fixed version of the dash project plan that renders with the xslt stylesheets
Comment 30 David Carver CLA 2008-08-20 16:18:20 EDT
One of the things you might want to do before sending the XML off to the XSLT is to make sure that the XML is valid according the the XSD.   This is possible with PH5 5 (http://devzone.zend.com/node/view/id/1713#Heading4).

In particular you need the following bit of code:

$dom->schemaValidate('projectplanNS.xsd');

This will return a true if it validtes, false if there are errors.  Errors are dumped to the php log as warnings.   This will ensure that you have a valid xml file before trying to process it.



Comment 31 Bjorn Freeman-Benson CLA 2008-08-21 12:14:58 EDT
(In reply to comment #30)
> In particular you need the following bit of code:

Patch? I don't see the $dom in your code.

(In reply to comment #28)
> 2. There is no postamble...is a preamble and postamble going to be required, or
> are these optionals? ...
> The XSD is also expecting compatiblity_with_previous_release and an appendix
> element.  If these aren't required let me know and I can modify the schema so
> that it doesn't require these to be included.

Pretty much everything is optional - the project teams complain about too many constraints if we make things required. But I don't think it's a problem to require that project leads (like me) use empty tags for the parts they don't want to include.

> All of these errors can be caught using the XML Catalog and the WTP tools.  I'll
> attach a corrected version of your plan.xml file that should get you the
> milestone information.  Since there is no bugzilla attributes for the themes, it
> doesn't display anything there, so we may need to tweak the XSLT a bit.

If there's no information about a theme, then it's no problem not displaying anything about that theme. However...

Thanks for your help getting the technology.dash plan.xml correct vis a vis namespaces.  However, the new XSLT displayer still isn't displaying the same things that the older php based on is. Compare:
PHP: http://www.eclipse.org/projects/project-plan.php?projectid=technology.dash
XSLT: http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash

Note:
1. The header "Themes and Priorities" is missing from the XSLT version.
2. More importantly, all the bugzilla information under Themes and Priorities > Clean the Graffiti > Committed is missing. Since one of the two goals of this standard project plan format was to use bugzilla to track all the plan items, I think it's pretty important to show all those plan items in the plan.
3. The ... > Proposed > "no items" and ... > Deferred > "no items" are missing.

This will be great when we finally get all the bugs worked out - thanks for your help.
Comment 32 David Carver CLA 2008-08-21 12:27:04 EDT
(In reply to comment #31)
> (In reply to comment #30)
> > In particular you need the following bit of code:
> 
> Patch? I don't see the $dom in your code.

I didn't provide one, as I'm leaving up to you to decide whether you want to validate every XML instance before sending it into the transformation.  It was a suggestion, not a requirement.

> 
> (In reply to comment #28)
> > 2. There is no postamble...is a preamble and postamble going to be required, or
> > are these optionals? ...
> > The XSD is also expecting compatiblity_with_previous_release and an appendix
> > element.  If these aren't required let me know and I can modify the schema so
> > that it doesn't require these to be included.
> 
> Pretty much everything is optional - the project teams complain about too many
> constraints if we make things required. But I don't think it's a problem to
> require that project leads (like me) use empty tags for the parts they don't
> want to include.

From a XML pureists point of view, it's better to just make the items optional.  I would suggest at least making one of the items required in each component, just so that there is some content there.  If a component isn't required that is is fine, but at least one item should be required within each component.


> 
> > All of these errors can be caught using the XML Catalog and the WTP tools.  I'll
> > attach a corrected version of your plan.xml file that should get you the
> > milestone information.  Since there is no bugzilla attributes for the themes, it
> > doesn't display anything there, so we may need to tweak the XSLT a bit.
> 
> If there's no information about a theme, then it's no problem not displaying
> anything about that theme. However...
> 
> Thanks for your help getting the technology.dash plan.xml correct vis a vis
> namespaces.  However, the new XSLT displayer still isn't displaying the same
> things that the older php based on is. Compare:
> PHP: http://www.eclipse.org/projects/project-plan.php?projectid=technology.dash
> XSLT:
> http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash
> 
> Note:
> 1. The header "Themes and Priorities" is missing from the XSLT version.
> 2. More importantly, all the bugzilla information under Themes and Priorities >
> Clean the Graffiti > Committed is missing. Since one of the two goals of this
> standard project plan format was to use bugzilla to track all the plan items, I
> think it's pretty important to show all those plan items in the plan.
> 3. The ... > Proposed > "no items" and ... > Deferred > "no items" are missing.
> 
> This will be great when we finally get all the bugs worked out - thanks for
> your help.

I'll take a look and do some more tweaks to the projectplanNS.xsd and the XSLT to clean up the remaining issues.  Probably won't get to this until later tonight.

Comment 33 David Carver CLA 2008-08-21 13:50:51 EDT
Created attachment 110603 [details]
Updated Version of Project Plan Render XSL

Fixes issue with milestone queries, and themes and priorities.   It needs the new update url-encode.xsl file as well, which is also attached.

I'll check out the latest code later and create a new patch.  I need to update the XSD to make some stuff optional.
Comment 34 David Carver CLA 2008-08-21 13:52:18 EDT
Created attachment 110605 [details]
Fixes issues with url-encoding

This fixes an issue with some url-encoding, where items that shouldn't be encoded are being encoded.  This is required to go along with the project-plan-render.xsl file. Attachement 110603.
Comment 35 David Carver CLA 2008-08-21 14:49:31 EDT
Created attachment 110610 [details]
Updated to make most elements optional.

Updates the XML Schema to allow most elements to be optional.
Comment 36 David Carver CLA 2008-08-21 14:55:12 EDT
Bjorn. the attachments I uploaded should take care of most of the remaining issues.  There still maybe a few left, but I think we have the vast majority taken care of.

The XSD now allows most of the elements to be optional.   The only one that is currently required is the introduction element.  Also, the XSD also allows an optiona attribute on the plan element, called name.  This can be use to fill in the project plan name.  If the name and the plan id are in the xml, this eliminates the need to pass these to the XSL during transformation.

Comment 37 Bjorn Freeman-Benson CLA 2008-08-21 16:15:44 EDT
(In reply to comment #36)
> the attachments 

It sure would be easier for me if you attached patches because Eclipse makes patches really, really easy to apply, thanks.

Also note that I've modified one of the XSL files so if you could incorporate those when you make a patch, that would save me from having to re-incorporate them each time.

Anyway, it sure looks like it all works now. Want to give it a once over to make sure that it is working the way you expect (http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash) and then update the wiki documentation (http://wiki.eclipse.org/Development_Resources/Project_Plan)? After you get the documentation updated, I'll switch it live.
Comment 38 David Carver CLA 2008-08-21 17:38:32 EDT
(In reply to comment #37)
> (In reply to comment #36)
> > the attachments 
> 
> It sure would be easier for me if you attached patches because Eclipse makes
> patches really, really easy to apply, thanks.
> 
> Also note that I've modified one of the XSL files so if you could incorporate
> those when you make a patch, that would save me from having to re-incorporate
> them each time.
> 
> Anyway, it sure looks like it all works now. Want to give it a once over to
> make sure that it is working the way you expect
> (http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash)
> and then update the wiki documentation
> (http://wiki.eclipse.org/Development_Resources/Project_Plan)? After you get the
> documentation updated, I'll switch it live.
> 

I'll have to synch up and get the latest code down, and provide a patch.  The url encoding is incorrectly escaping the [] which is causing issues from a query point of view with bugzilla.  It isn't decoding the url correctly so the values aren't getting interpretted right for the query.

I'll provide a patch in a few.
Comment 39 David Carver CLA 2008-08-21 18:06:17 EDT
Created attachment 110630 [details]
Updated patch for Project Plan.

This patch corrects one last url-encoding issue, where %5B and %5D do not need to be URL encoded, bugzilla can't handle the encoding and gets confused on executing queries if they are encoded.
Comment 40 Bjorn Freeman-Benson CLA 2008-08-22 15:36:36 EDT
Patch applied, you can see the result here:
http://www.eclipse.org/projects/project-plan2.php?projectid=technology.dash

Note:
1. We're working in project-plan2.php not project-plan.php; we'll switch to the live project-plan.php when we're done - this is so that the real project-plan.php continues working while we/you build us this new better system.
2. I renamed projectplanNS.xsd as plan.xsd because it made more sense to me. Let me know if I shouldn't have done that.

re: comment #37 - after you update the documentation, I'll switch to "2" to "live" and we can close this bug.
Comment 41 David Carver CLA 2008-08-22 18:36:43 EDT
(In reply to comment #40)
> re: comment #37 - after you update the documentation, I'll switch to "2" to
> "live" and we can close this bug.

I've updated the wiki content.  Take a look and if it is okay, then we are good to go.  Just in case you want to learn more about XSLT and all it's goodness, you can get a good tutorial at:

http://www.xfront.com/
 

Comment 42 Bjorn Freeman-Benson CLA 2008-08-25 15:07:49 EDT
I have switched project-plan.php to the namespace version. Thanks Dave.
Comment 43 Martin Oberhuber CLA 2008-08-25 17:30:39 EDT
Uh-oh... mine should be good according to the Wiki, and validates OK in WTP's XML Editor, but still renders an empty page only:

http://www.eclipse.org/projects/project-plan.php?projectid=dsdp.tm

It had rendered OK through the PHP, and what I did to migrate was replace the Plan's header, replace all CDATA with <html:p> and change <hr><br> into <hr/><br/> until WTP's XML Editor was pleased. 

I'm unsure when I need to prefix a tag with <html:ul> and when I do <b xmlns="http://www.w3.org/1999/xhtml">. Do I need to prefix each and every tag or just "enclosing" ones?

Any ideas what's going wrong?
Comment 44 David Carver CLA 2008-08-25 17:58:18 EDT
Martin any html element will need the prefix unless you change the default namespace to be the xhtml namespace.   If you do that you'll need to prefix your plan elements with a prefix.

Let's take a look at your first couple of elements:

<plan plan-format="1.0" xmlns="http://www.eclipse.org/project/plan" xmlns:html="http://www.w3.org/1999/xhtml"
      name="Target Management">
   <release projectid="dsdp.tm" version="3.1"/>
    <introduction><html:p>
<html:hr/>
<font background="yellow" foreground="red" size="+2"><center><b>Preliminary</b></center></font><br/>
The TM 3.1 project plan is still in preliminary state and not yet agreed upon by all parties.
<html:hr/>
The Target Management Project provides data models, frameworks and tools 
for working with remote computer systems.
The main deliverable is the Remote System Explorer (RSE), a feature-rich 
integrated perspective and toolkit for seamlessly working on
remote systems. Besides that, we deliver flexible, re-usable 
components for Networking and Target Management that run stand-alone
or integrated with RSE.
<p>
In terms of interfaces to other Eclipse projects, we provide an
Eclipse Filesystem (EFS) provider to allow remote resources be
mapped into an Eclipse Workspace, and a CDT Remote Launch integration.
</p>

The above should be markedup as follows:

<plan plan-format="1.0" xmlns="http://www.eclipse.org/project/plan" xmlns:html="http://www.w3.org/1999/xhtml"
      name="Target Management">
   <release projectid="dsdp.tm" version="3.1"/>
    <introduction><html:hr/>
<html:font background="yellow" foreground="red" size="+2"><html:center><html:b>Preliminary</html:b></html:center></html:font><html:br/>
The TM 3.1 project plan is still in preliminary state and not yet agreed upon by all parties.
<html:hr/>
<html:p>
The Target Management Project provides data models, frameworks and tools 
for working with remote computer systems.
The main deliverable is the Remote System Explorer (RSE), a feature-rich 
integrated perspective and toolkit for seamlessly working on
remote systems. Besides that, we deliver flexible, re-usable 
components for Networking and Target Management that run stand-alone
or integrated with RSE.
<html:/p>
<html:p>
In terms of interfaces to other Eclipse projects, we provide an
Eclipse Filesystem (EFS) provider to allow remote resources be
mapped into an Eclipse Workspace, and a CDT Remote Launch integration.
</html:p>

The current XSD doesn't process the XHTML for validation, as it has the processContents set to skip for the XHTML namespace, you can turn on XHTML content validation by editing the xsd and replace processContents="skip" with processContents="lax" or processContents="strict".

If you'ld rather prefix the plan elements instead of the html elements, then set the namespaces up in your xml document as follows:

xmlns:p="http://www.eclipse.org/project/plan"
xmlns="http://www.w3.org/1999/xhtml"

Also, to make sure that your HTML is actually wellformed XHTML content you might want to run it through a Tidy program such as:

http://valet.htmlhelp.com/tidy/

If necessary I can upload a version of the project plan xsd that will enforce strict validation of the XHTML areas.
Comment 45 Martin Oberhuber CLA 2008-08-30 16:26:18 EDT
*** Bug 243344 has been marked as a duplicate of this bug. ***
Comment 46 Martin Oberhuber CLA 2008-09-06 16:33:59 EDT
Created attachment 111907 [details]
Shellscript for converting non-namespace plan into namespaced version

Since a project in DSDP had an existing valid non-namespaced version of the project plan XML, which fails to render now, I thought about how to convert the old plan(s) into the new format.

Attached shellscript is my first effort at doing so. Usage:
   planconv.sh myplan.xml
It creates a backup in myplan.xml.1234.bak, and operates as follows:

(1) Replace <plan.*> by new <plan xmlns="..."> markup
(2) Replace <![CDATA[ by <html:div xmlns="http://www.w3.org/1999/xhtml">
(3) Replace ]]>       by </html:div>
(4) Add missing <html:div> markup where the non-namespace'd version did not
    require an explicit HTML markup (preamble, description, milestone)
(5) Get rid of duplicate <html:div> if any

I ran the shellscript on the DSDP-RTSC project plan, and it produced valid XML according to the WTP editor. If not perfect, it should be a help for projects to convert any existing non-namespaced plans they should have.

Note that it might still be necessary to convert HTML stuff which is not valid XHTML into XHTML. The WTP editor will help with that, as per the instructions in

http://wiki.eclipse.org/Development_Resources/Project_Plan#Tools_for_Editing_your_Plan

Improvements to the script are always welcome, of course.
Comment 47 Karl Matthias CLA 2008-09-17 14:59:24 EDT
Released or closed for STAGING_264 (yesterday).  Please see final comments for actual resolution status.  This message does not imply that any action was taken that was not already stated.