sometimes anchor tags of full listing main handbook are duplicated. for example: http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?part=1&chap=2#doc_chap_pre7 http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?part=1&chap=3#doc_chap_pre7 Reproducible: Always Steps to Reproduce: 1. check these addresses: http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?part=1&chap=2#doc_chap_pre7 http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?part=1&chap=3#doc_chap_pre7 they are different, but with the same name: #doc_chap_pre7 Actual Results: I cannot reach both using full listing page: http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?full=1#doc_chap_pre7 Expected Results: I would like to reach both addresses, with different name attributes, such as: doc_chap2_pre7 and doc_chap3_pre7
Undoing changes, not a translation issue. It'll be fixed eventually, be patient :)
(In reply to comment #1) > Undoing changes, not a translation issue. > > It'll be fixed eventually, be patient :) > sorry. I used a wrong example from italian docs, but the problem should be in the algorithm to define automatic attribute names. thanks for your work.
Created attachment 129381 [details, diff] Add book_id#####_chap#_pre# name in "pre" template Patch that includes a book_id######_chap#_pre# name anchor in the "pre" template when the document is a book document.
Created attachment 129388 [details, diff] Call body template with chid parameter Call the body template inside the subsection with the chid parameter. The body template will then call the pre template with the same parameter, allowing for the anchors to be defined. With both patches applied, a link to #doc_chapX_preY is updated accordingly. Note though that this invalidates at least one link (to #doc_chap_pre6 in the gentoo-ppc-faq.xml) as the behavior previously was to drop chapter ids (as pre's count onward anyway). Dunno if that is wanted; if so, it is easy to update the patches to allow #doc_chap_preY links - or even both.
Comment on attachment 129381 [details, diff] Add book_id#####_chap#_pre# name in "pre" template Useless
Comment on attachment 129388 [details, diff] Call body template with chid parameter Applied and undone. Does not solve anything and messes up numbering, e.g. 2.1 2.2 ... 2.7 8 9 ... 18 6.19 in http://gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=10
(In reply to comment #0) > http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?full=1#doc_chap_pre7 > Expected Results: > I would like to reach both addresses, with different name attributes, such as: > doc_chap2_pre7 and doc_chap3_pre7 You can't at the moment. FYI "chap" in a handbook does not mean chapter, but section because <chapter> and <section> for some odd reason do not have the same meaning & format in handbooks and guides. (In reply to comment #4) > Created an attachment (id=129388) [edit] > Call body template with chid parameter Applied & undone, it does not make pre anchors unique in a full handbook and messes up numbering. chid used to be in anchors by sheer luck. When bugs in libxslt that somehow made parameters available even though they were not passed, were fixed and your code became invalid, chid disappeared in some cases. I hope the chid param will eventually disappear entirely because having to pass it along the whole chain of templates is terribly messy to say the least. Allowing <include>s would make it even worse. Hopefully, pre anchors will eventually be made unique & usable, but it would be done differently.
Easier would be to set an id attribute to the pre entity (similar to the chapter/section ones) so that the auto-generated doc_* anchors aren't used. It keeps consistency across updates (no need to look for anchors when the guide's structure changes) and makes nicer URLs.
It should be fixed. <pre> are numbered as in <guide>, i.e. #doc_chapX_preY In full=1 versions of handbooks, part/chap are part of the anchors, just like they have been for other elements for a long time, i.e. #book_partZ_chapT__chapX_preY" Allowing @id on <pre> would be trivial, I'll add it if required but the only link to a <pre> I know of is in the PPC FAQ. Note that the more ids we allow, the more likely it becomes to have duplicates and those ids have to be unique throughout a full handbook.