Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 245273 - XML Project Plan doesn't render properly
Summary: XML Project Plan doesn't render properly
Status: CLOSED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Project Management & Portal (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Bjorn Freeman-Benson CLA
QA Contact:
URL: http://www.eclipse.org/projects/proje...
Whiteboard:
Keywords:
Depends on: 243303
Blocks:
  Show dependency tree
 
Reported: 2008-08-26 12:21 EDT by Martin Oberhuber CLA
Modified: 2008-09-17 14:59 EDT (History)
6 users (show)

See Also:


Attachments
Fixes issues with comments and libXSLT as well as Deferred items (2.11 KB, patch)
2008-08-29 11:15 EDT, David Carver CLA
no flags Details | Diff
Fixes Proposed and No items bugs. (1.79 KB, patch)
2008-08-30 21:34 EDT, David Carver CLA
no flags Details | Diff
Removes XML Declaration, fixes Proposed, and No Items (1.88 KB, text/plain)
2008-08-30 21:42 EDT, David Carver CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-08-26 12:21:34 EDT
I have tried to adapt my XML project plan to the namespace'd version as per bug 243303, but it just renders an empty page:

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

My plan validates correctly according to the plan xsd as well as the strict xhtml xsd. 

My plan does look a bit different than the Dash example from the Wiki, since I chose to use a "p:" namespace for all plan elements, and the default namespace for all xhtml. Because I had way more html than plan tags, this seemed less work to get right.

I think that this should not matter, and in fact the plan renders correctly in a local firefox, using a local clone of the project-plan-render.xsl. I've been in contact with Dave Carver through AIM and we don't know how to proceed from here. No xml markup bugs, and good local rendering, but still fails on the server?

Could you check some server logs, or what else could I do to debug and fix this?
Comment 1 Bjorn Freeman-Benson CLA 2008-08-26 12:50:28 EDT
Dave, this one is for you...
Comment 2 David Carver CLA 2008-08-26 13:32:32 EDT
(In reply to comment #0)
> I have tried to adapt my XML project plan to the namespace'd version as per bug
> 243303, but it just renders an empty page:
> 
> http://www.eclipse.org/projects/project-plan.php?projectid=dsdp.tm
> 

When I click on that link and view the RAW xml:

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

It doesn't look like that is a valid file.    Bjorn is the XML file being cached.

Martin double check that the XML that renders correctly locally is the same as the XML that is being served by the above page.
Comment 3 David Carver CLA 2008-08-26 13:37:26 EDT
(In reply to comment #0)
> I have tried to adapt my XML project plan to the namespace'd version as per bug
> 243303, but it just renders an empty page:
> 
> http://www.eclipse.org/projects/project-plan.php?projectid=dsdp.tm
> 
> 

The XML that is produced by the RAW method isn't valid.   So the version you have locally and the version that is on the web site aren't in synch.   Once you get the version that is working locally synchronized with what the web site has, you should be good to go.



Comment 4 Martin Oberhuber CLA 2008-08-26 13:39:10 EDT
They are identical, and do render correctly locally. Try Shift+Refresh if you are using Firefox to sync your client cache.
Comment 5 David Carver CLA 2008-08-26 13:55:17 EDT
(In reply to comment #4)
> They are identical, and do render correctly locally. Try Shift+Refresh if you
> are using Firefox to sync your client cache.
> 

Okay, that seemed to work, refreshing the XML does bring up a valid and correct XML.   Bjorn, I've verified that this isn't an XSL stylesheet problem, so we need to check the server logs to see if PHP is tossing anything out into the log files.  I'll review the source generated by the transformation on the server to see if I can see anything out of the ordinary there.

Comment 6 Bjorn Freeman-Benson CLA 2008-08-29 03:30:34 EDT
The logs aren't really useful because there are five front end machines and no good way to get to the logs/aggregate the logs. However, I added an error checking routine to the page and you can now see big red error boxes of all the errors.
Comment 7 Richard Gronback CLA 2008-08-29 06:41:04 EDT
There seems to be an XSL issue reported when trying to render the GMF plan: http://www.eclipse.org/projects/project-plan.php?projectid=modeling.gmf
Comment 8 Richard Gronback CLA 2008-08-29 07:05:44 EDT
Then again, it seems that using a target milestone of '---' in the bugzilla query strings isn't such a good idea.  The XSL comment errors I was seeing appear to be caused by this.
Comment 9 David Carver CLA 2008-08-29 10:28:37 EDT
(In reply to comment #8)
> Then again, it seems that using a target milestone of '---' in the bugzilla
> query strings isn't such a good idea.  The XSL comment errors I was seeing
> appear to be caused by this.
> 

Yeah, for some reason the --- is getting converted to - - -.   I haven't been able to figure out exactly why it is happening when it is going through the url-encode process to clean up the url string.   I also noticed one other stylseheet error in the deferred items, they are getting an extra bullet point added.   I'll see if I can fix that section up.
Comment 10 David Carver CLA 2008-08-29 10:30:10 EDT
(In reply to comment #6)
> The logs aren't really useful because there are five front end machines and no
> good way to get to the logs/aggregate the logs. However, I added an error
> checking routine to the page and you can now see big red error boxes of all the
> errors.
> 

Those errors help.  I can address the comment issue, with an update.   I'll try and get something later today as well as fix the one other issue with the Deferred items.

Comment 11 David Carver CLA 2008-08-29 11:15:58 EDT
Created attachment 111307 [details]
Fixes issues with comments and libXSLT as well as Deferred items

This patch fixes an issue with LibXSLT's handling of xsl:comments and the allowed text it handles.  I have removed the xsl:comment statement as it was primarly there for debugging purposes.   Also fixed an issue with the deferred items rendering an extra ul / li combination when it was unnecessary.
Comment 12 Bjorn Freeman-Benson CLA 2008-08-29 12:46:43 EDT
Patch applied.
Comment 13 David Carver CLA 2008-08-29 14:26:10 EDT
(In reply to comment #4)
> They are identical, and do render correctly locally. Try Shift+Refresh if you
> are using Firefox to sync your client cache.
> 

Martin, it looks like the libXSLT is having some problems with the encoding in your bugzilla queries.    If you can try to get it so that there isn't as much be escaped I think that will help solve some of the issues.   Basically try and get the queries down to the minimum possible.

Comment 14 Martin Oberhuber CLA 2008-08-30 15:54:05 EDT
Those pink error markers are awsome! They helped me find the issue immediately.

My bugzilla query was using a regex: 
  * unencoded          field-0-0-0=\[(tcf|wince)
  * my XML:            field-0-0-0=%5C%5B%28tcf%7Cwince%29
  * what bugzilla saw: field-0-0-0=%265C[%2628tcf%267Cwince%2629

Apparently, the %5B was translated back into [ but for the other encoded characters, the % char was encoded into %26. Lookslike the ampersand is the only char I need to encode into & while all the rest can go in verbatim, correct?

Putting the Regex into the XML unencoded fixed this issue.
Comment 15 Martin Oberhuber CLA 2008-08-30 16:24:23 EDT
The only issues which I see now are these:

(1) My <a name="foo"></a> tags render as boldface and look likey they are
    clickable. Probably an issue in the style sheet? <a name> Anchors should 
    have a class other than <a href> references.
    Ideally I wouldn't need any <a name> anchors myself anyways when bug 241822
    is resolved.

(2) Looking at the source of my plan I see that there is a <meta author> tag
    listing Bjorn as the Author. That's not correct IMHO since the document
    is the XML so either no author or the XML's author should be listed.

(3) Proposed theme items' heading reads "Propose" but should be "Proposed"

(4) When there are no items in a bugzilla query, the "No items" text renders
    with newline before and after (because inside a <p>No items</p> tag).
    These should be inside a <div>No items</div> tag instead to look similar
    as the queries which do produce items.

http://www.eclipse.org/projects/project-plan.php?projectid=dsdp.tm
Comment 16 David Carver CLA 2008-08-30 21:24:12 EDT
(In reply to comment #15)
> The only issues which I see now are these:

> 
> (3) Proposed theme items' heading reads "Propose" but should be "Proposed"

Yeah, this is a typo in the Stylesheet.  I'll get it corrected.

> 
> (4) When there are no items in a bugzilla query, the "No items" text renders
>     with newline before and after (because inside a <p>No items</p> tag).
>     These should be inside a <div>No items</div> tag instead to look similar
>     as the queries which do produce items.
> 
> http://www.eclipse.org/projects/project-plan.php?projectid=dsdp.tm

I'll make the <div> corrections as well.
 

Comment 17 David Carver CLA 2008-08-30 21:34:00 EDT
Created attachment 111351 [details]
Fixes Proposed and No items bugs.

This adds fixes for the Proposed and No Items bugs that were mentioned in Comment #15.
Comment 18 David Carver CLA 2008-08-30 21:42:14 EDT
Created attachment 111352 [details]
Removes XML Declaration, fixes Proposed, and No Items

This fixes in addition to the No Items, and Proposed, the XML declaration was being outputed into the middle of the HTML document.  This is technically incorrect, so added the omit-xml-declaration attribute to the xsl:output element of the stylesheet.   This should keep the xsl file from outputting the <?xml ?> declaration in the middle of the file.
Comment 19 Bjorn Freeman-Benson CLA 2008-09-04 11:30:41 EDT
Dave, this seems like something the XSLT could do.
Comment 20 Bjorn Freeman-Benson CLA 2008-09-04 11:31:22 EDT
(Argh, comment on wrong bug)
Comment 21 Bjorn Freeman-Benson CLA 2008-09-04 11:36:28 EDT
Patch applied, I think we're going to mark this bug as fixed.
Comment 22 Karl Matthias CLA 2008-09-17 14:59:10 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.