You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Arnaud HERITIER (JIRA)" <ji...@codehaus.org> on 2005/06/23 16:00:53 UTC

[jira] Created: (MPPDF-40) Can't use 2 subsections with the same name

Can't use 2 subsections with the same name
------------------------------------------

         Key: MPPDF-40
         URL: http://jira.codehaus.org/browse/MPPDF-40
     Project: maven-pdf-plugin
        Type: Bug
    Versions: 2.3    
    Reporter: Arnaud HERITIER
 Assigned to: Arnaud HERITIER 
    Priority: Critical


If 2 subsections have the same name the pdf generation fails because they have the same id.

For exemple :
    <section name="Section 1">
      <subsection name="SubSection">
      </subsection>
    </section>
    <section name="Section2">
      <subsection name="SubSection">
      </subsection>
    </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPPDF-40?page=all ]

Arnaud Heritier updated MPPDF-40:
---------------------------------

    Assign To:     (was: Arnaud Heritier)

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Priority: Critical
>  Attachments: MPPDF-40.patch
>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPPDF-40?page=all ]
     
Lukas Theussl closed MPPDF-40:
------------------------------

    Resolution: Fixed

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Priority: Critical
>  Attachments: MPPDF-40.patch
>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPPDF-40?page=comments#action_44426 ] 

Lukas Theussl commented on MPPDF-40:
------------------------------------

Actually,your example above leads to an invalid HTML document, because according to the HTML 4.01 specs ( http://www.w3.org/TR/html4/struct/links.html#h-12.2.1 ), anchor names must be unique within one document.

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Assignee: Arnaud Heritier
>     Priority: Critical

>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPPDF-40?page=comments#action_44823 ] 

Wendy Smoak commented on MPPDF-40:
----------------------------------

I agree that this needs to be fixed in xdoc first.  I didn't see that anyone had yet reported it, so I opened a feature request to allow <section name="Some Long Description" href="desc"> to allow users to pick the anchor name they want.

See: http://jira.codehaus.org/browse/MPXDOC-159



> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Assignee: Arnaud Heritier
>     Priority: Critical

>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPPDF-40?page=comments#action_44986 ] 

Lukas Theussl commented on MPPDF-40:
------------------------------------

In your example, a <section name="A B"> would generate the same id as the first subsection, so this is not fool proof.

My personal opinion is that the plugin should not auto-generate id's at all (except where they are only used internally, like for the table of contents, in which case the user does not need to know anything about it). The only raison d'etre for the id generation for sub/sections is to make it referencable for the user.  If the user wants to reference a sub/section, he should provide an id himself. 

Note that in the old version of the plugin, before my fix for MPPDF-24, ids for sub/sections were generated using xslt's generate-id() function, which gave a unique id in all cases. However, they were completely useless because they were re-generated dynamically at each build time and the user couldn't know how to reference them. I conclude that if you want to ensure unique ids, you would have to auto-generate them according to some algorithm, but in that case they are useless because they can't be referenced. If you want id's that the user can reference easily, there is no way to ensure they are unique. 

I'd rather propose to remove the id generation from name tags altogether and keep the id tag as an option (that's how it *should* be in the xdoc plugin as well). Thus, we maintain backwards compatibility within the pdf plugin and avoid any build failures.  The worst thing that can happen is that a link to a section does not work in the generated pdf if the user forgets to specify an id tag.



> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Priority: Critical
>  Attachments: MPPDF-40.patch
>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPPDF-40?page=comments#action_44456 ] 

Lukas Theussl commented on MPPDF-40:
------------------------------------

Even if we would generate a unique id, it would be completely useless for the end user if he doesn't know how to reference it 
(how would you link to your two subsections above from a different source document?). We would have to document and tell the user
how we generate the ids, but then we can also tell him to use unique ids in the first place.

The only alternative that I see is to abandon the id generation from section names completely and tell the user to use a unique <a name=""/> element for every
section he wants to reference. That would be the cleanest solution, but it would break compatibility with the xdoc plugin
and I would only support it if the same change would be made in the xdoc plugin.
(thinking about it, one should actually open the very same issue for the xdoc plugin, for the reason I stated above).



> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Assignee: Arnaud Heritier
>     Priority: Critical

>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPPDF-40?page=comments#action_44449 ] 

Arnaud Heritier commented on MPPDF-40:
--------------------------------------

You're right but the end user musn't know that a subsection name generates an id which must be unique. It's the plugin's problem to generate an unique id ? WDYT ?

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Assignee: Arnaud Heritier
>     Priority: Critical

>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPPDF-40?page=comments#action_41940 ] 

Lukas Theussl commented on MPPDF-40:
------------------------------------

My personal feeling is that this is rather a fop issue - duplicate id's should be ignored and not lead to a build failure. In principle I could work around that by enumerating identical id's, however, it would be impossible to resolve the ambiguity when two identical id's are referenced. For that reason I think it would be better to just document the issue.

Note that the issue only applies to id's within the same document, and that identical <a name="id"> tags lead to the same problem.

Also note that the xdoc plugin will generate identical id's for the example above as well.

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud HERITIER
>     Assignee: Arnaud HERITIER
>     Priority: Critical

>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPPDF-40?page=all ]

Lukas Theussl updated MPPDF-40:
-------------------------------

    Attachment: MPPDF-40.patch

This should do  the job: I introduce an optional 'id' tag like I indicated in my original description for MPXDOC-158.
If this id tag is present, it will be used for referencing, if it is omitted, the 'name' tag will be used. Like that we stay compatible with xdoc (well, almost, links will behave differently, but that is an xdoc problem). We just have to document that for identical sub/section names, it is mandatory to specify unique id tags.

Note that this patch only fixes the problem of identical sub/sections, identical links in navigation.xml will still fail (but I don't think it is necessary to fix that).

I will submit an analogous patch for the xdoc plugin but the current patch can be applied independently of that.

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Assignee: Arnaud Heritier
>     Priority: Critical
>  Attachments: MPPDF-40.patch
>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Reopened: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPPDF-40?page=all ]
     
Arnaud Heritier reopened MPPDF-40:
----------------------------------


Reopen to change "fix for"

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Priority: Critical
>  Attachments: MPPDF-40.patch
>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPPDF-40?page=all ]
     
Arnaud Heritier closed MPPDF-40:
--------------------------------

     Resolution: Fixed
    Fix Version: 2.5

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Assignee: Lukas Theussl
>     Priority: Critical
>      Fix For: 2.5
>  Attachments: MPPDF-40.patch
>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPPDF-40) Can't use 2 subsections with the same name

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPPDF-40?page=comments#action_44982 ] 

Arnaud Heritier commented on MPPDF-40:
--------------------------------------

Another idea to improve ids with the default naming  is to generate them from the section/subsections tree.
For exemple :
<section name="A"> ==> Generates id="A"
  <subsection name="B"> ==> Generates id="A_B"
    <subsection name="C"> ==> Generates id="A_B_C"
    </subsection>
  </subsection>
  <subsection name="D"> ==> Generates id="A_D"
  </subsection>
</section>
I don't know if there's a maximum number of chars in an id.

> Can't use 2 subsections with the same name
> ------------------------------------------
>
>          Key: MPPDF-40
>          URL: http://jira.codehaus.org/browse/MPPDF-40
>      Project: maven-pdf-plugin
>         Type: Bug
>     Versions: 2.3
>     Reporter: Arnaud Heritier
>     Priority: Critical
>  Attachments: MPPDF-40.patch
>
>
> If 2 subsections have the same name the pdf generation fails because they have the same id.
> For exemple :
>     <section name="Section 1">
>       <subsection name="SubSection">
>       </subsection>
>     </section>
>     <section name="Section2">
>       <subsection name="SubSection">
>       </subsection>
>     </section>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org