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

        Hide
        Arnaud Heritier added a comment -

        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 - 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
        Rafal Krzewski added a comment -

        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 - 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
        Jerome Lacoste added a comment -

        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 - 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
        Arnaud Heritier added a comment -

        It's certainly a problem in Jelly

        Show
        Arnaud Heritier added a comment - It's certainly a problem in Jelly
        Hide
        Jerome Lacoste added a comment -

        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 - 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
        Arnaud Heritier added a comment -

        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 - 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
        Brett Porter added a comment -

        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 - 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
        Brett Porter added a comment -

        fixed jelly, upgraded version

        Show
        Brett Porter added a comment - fixed jelly, upgraded version

          People

          • Assignee:
            Brett Porter
            Reporter:
            Andy Jefferson
          • Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: