Affects Version/s: 1.9.1
Fix Version/s: 1.10
Number of attachments :
In the current version of the xdoc plugin, a <a name="sectionName"> element is generated for every sub/section from its corresponding
name tag. This may lead to an invalid HTML document if some sub/sections have the same name, 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. For the xdoc plugin this is not a big problem
because browsers usually ignore identical ids, but we are having troubles for the pdf plugin (see
MPPDF-40) where identical ids lead to a
I suggest to generate an id from an optional id tag as in the following example:
<section name="Section 1">
<subsection name="SubSection" id="SubSection1">
<subsection name="SubSection" id="SubSection2">
so the section title is constructed from the name tag while the id tag (which has to be unique) may be used to reference the section.
I attach a patch to achieve this, if this gets accepted I can easily adjust the pdf plugin accordingly.
The only worry is backwards compatibility: xdocs that use the old feature of referencing sections by names, will produce invalid links.
However, I haven't seen this feature documented anywhere, I don't think it is widely used and therefore, it should not be a big problem.