jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 1.x XDoc Plugin
  • Maven 1.x XDoc Plugin
  • MPXDOC-92

Processing of ampersand

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.8
  • Labels:
    None
  • Environment:
    Maven 1.0-rc2
  • Number of attachments :
    0

Description

This worked in Maven-1.0-rc1 and now doesn't. I have an xdoc document that has lines like
"http://sourceforge.net/project/showfiles.php?group_id=86139&package_id=95353"

That is, it includes an ampersand in the URL (&), and xdoc previously processed this by removing the & and putting & in the end-result page.

I run this in rc2 (with whichever version of the xdoc plugin) and I now don't get the ampersand processed like this ... it just leaves it all in there, and hence when I look at the resultant HTML, a browser just ignores the trailing &.... part !!!

Fine, I thought, I'll just put a URL as normal. Well if I do that, xdoc now just aborts in the processing step with

Error on line 13 of document file:/home/andy/work/JPOX/xdocs/download.xml :
The reference to entity "package_id" must end with the ';' delimiter. Nested
exception: The reference to entity "package_id" must end with the ';'
delimiter.

This is pretty basic stuff and was working. It has no known workaround (none that I know anyway). Any chance of restoring the previous (correct) xdoc behaviour ?

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Arnaud Heritier added a comment - 12/May/04 8:16 AM

I tested it and there's always a problem (perhaps due to my recent changes ??)
If I have in xdoc :
<a href="http://sourceforge.net/project/showfiles.php?group_id=86139&package_id=95353">toto</a>
I have in html :
<a href="http://sourceforge.net/project/showfiles.php?group_id=86139&amp;amp;package_id=95353" class="externalLink" title="External Link">toto</a>

Show
Arnaud Heritier added a comment - 12/May/04 8:16 AM I tested it and there's always a problem (perhaps due to my recent changes ??) If I have in xdoc : <a href="http://sourceforge.net/project/showfiles.php?group_id=86139&package_id=95353">toto</a> I have in html : <a href="http://sourceforge.net/project/showfiles.php?group_id=86139&amp;amp;package_id=95353" class="externalLink" title="External Link">toto</a>
Hide
Permalink
Rafal Krzewski added a comment - 17/May/04 6:01 AM

I'm seeing this too, in my case in viewcvs urls generated by statcvs plugin.

I think the problem (re)emerged sometime beween May 10th - 14th.

Show
Rafal Krzewski added a comment - 17/May/04 6:01 AM I'm seeing this too, in my case in viewcvs urls generated by statcvs plugin. I think the problem (re)emerged sometime beween May 10th - 14th.
Hide
Permalink
Jerome Lacoste added a comment - 04/Jun/04 6:11 PM

I would like to give a go at this issue, if someone can give some pointers as to where to look for.

I had a look at the code for the xdoc plugin, but apart from the site.jsl file, there's not much. The code in the jsl file handling the links doesn't do much neither appart something like

<x:set var="_link" select="string(@href)"/>

I tried to programmatically use the DOM to access a modified navigation.xml, introducing a link with an ampersand in it, and the result was ok. I did something like:

added in the navigation.xml

<item name="artifact" href="http://maven.apache.org/files.php?id=12345&name=foobar"/>

in the unit test

DefaultElement node = nb.getFirstNodeByName("artifact");
Document d = node.getDocument();
System.out.println("href " + node.attribute("href").getValue());

The printed value is correct (i.e. "http://maven.apache.org/files.php?id=12345&name=foobar")

Could the bug be in one dependencies?

Show
Jerome Lacoste added a comment - 04/Jun/04 6:11 PM I would like to give a go at this issue, if someone can give some pointers as to where to look for. I had a look at the code for the xdoc plugin, but apart from the site.jsl file, there's not much. The code in the jsl file handling the links doesn't do much neither appart something like <x:set var="_link" select="string(@href)"/> I tried to programmatically use the DOM to access a modified navigation.xml, introducing a link with an ampersand in it, and the result was ok. I did something like: added in the navigation.xml <item name="artifact" href="http://maven.apache.org/files.php?id=12345&name=foobar"/> in the unit test DefaultElement node = nb.getFirstNodeByName("artifact"); Document d = node.getDocument(); System.out.println("href " + node.attribute("href").getValue()); The printed value is correct (i.e. "http://maven.apache.org/files.php?id=12345&name=foobar") Could the bug be in one dependencies?
Hide
Permalink
Arnaud Heritier added a comment - 04/Jun/04 6:20 PM

It's certainly a problem in Jelly

Show
Arnaud Heritier added a comment - 04/Jun/04 6:20 PM It's certainly a problem in Jelly
Hide
Permalink
Jerome Lacoste added a comment - 04/Jun/04 6:34 PM

Ah. I tried to revert the dependencies from how they were in March, i,e, using maven-beta-10 but it didn't help.

I have to look at jelly then...

But in the xdoc project XML, the jelly dependency is from 2003. I guess it didn't change much. How could the pb be in jelly if we didn't update it in the xdoc project nor in the maven project ?

Show
Jerome Lacoste added a comment - 04/Jun/04 6:34 PM Ah. I tried to revert the dependencies from how they were in March, i,e, using maven-beta-10 but it didn't help. I have to look at jelly then... But in the xdoc project XML, the jelly dependency is from 2003. I guess it didn't change much. How could the pb be in jelly if we didn't update it in the xdoc project nor in the maven project ?
Hide
Permalink
Arnaud Heritier added a comment - 04/Jun/04 6:57 PM

You're right. I don't know where the problem can be because as you said it, the code is very easy in the xdoc plugin.

Show
Arnaud Heritier added a comment - 04/Jun/04 6:57 PM You're right. I don't know where the problem can be because as you said it, the code is very easy in the xdoc plugin.
Hide
Permalink
Brett Porter added a comment - 12/Jun/04 10:00 PM

I've fixed this by patching the xml taglib in Jelly. I have to do a couple of things before committing the final change:

  • verify the change is valid
  • get someone at jelly to commit it
  • publish a new snapshot of the XML taglib

This will happen in the next few days.

Show
Brett Porter added a comment - 12/Jun/04 10:00 PM I've fixed this by patching the xml taglib in Jelly. I have to do a couple of things before committing the final change: verify the change is valid get someone at jelly to commit it publish a new snapshot of the XML taglib This will happen in the next few days.
Hide
Permalink
Brett Porter added a comment - 12/Jun/04 11:19 PM

fixed jelly, upgraded version

Show
Brett Porter added a comment - 12/Jun/04 11:19 PM fixed jelly, upgraded version

People

  • Assignee:
    Brett Porter
    Reporter:
    Andy Jefferson
Vote (4)
Watch (4)

Dates

  • Created:
    29/Mar/04 7:56 AM
    Updated:
    12/Jun/04 11:19 PM
    Resolved:
    12/Jun/04 11:19 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.