[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: Re: XML V. 1.58.1: The ID d0e2346 already exists in thedocument
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 / Stephan Wiesner <stephan@stephan-wiesner.de> was heard to say: | I encounter the error "The ID d0e2346 already exists in the document", | when I transform a document to PDF, using FOP. | The FO does indeed contain the dublicated ID. | | This is the line that causes the error (the document itself is valid): | | see <xref linkend="sec_AppendixManager" endterm="sec_AppendixManager"/> - From a sample that Stephan sent me off-list, I found the source of the problem. When endterm is used, the stylesheets copy the children of the element identified by endterm as the link text. That's the right semantic and it usually works fine: Given: <section id="a"> <sectioninfo> <releaseinfo id="b">Some alternate text for some reason</releaseinfo> </sectioninfo> <title>Some text</title> An xref like this: <xref linkend="a" endterm="b"/> produces "Some alternate text for some reason" as a link to the section. The problem arises when the alternate text includes nested structure that has IDs. In the simple case: <section id="a"> <sectioninfo> <releaseinfo id="b">Some <phrase id="c">alternate</phrase> text for some reason</releaseinfo> </sectioninfo> <title>Some text</title> This produces: "some alternate <phrase id="c">alternate</phrase> text for some reason" Which would be harmless in this example, but in Stephan's case, the endterm points to a table (Stephan, did you really mean to make the table the content of the cross reference!?) and since the table appears later in the document, the IDs wind up being repeated. I can't think of any good "one pass" solution to this problem (short of duplicating every template in the stylesheet in a new mode) so I've implemented a two pass solution. Unfortunately, this will only work if you have a processor that supports exsl:node-set. But many of them do. | If I change the endterm to something different than the linkend, it | works, too. I consider this a bug of the style sheet? Took me quite | some time to find, by the way. I can see why! :-) Be seeing you, norm - -- Norman Walsh <ndw@nwalsh.com> | Nearly every complex solution to a http://www.oasis-open.org/docbook/ | programming problem that I have Chair, DocBook Technical Committee | looked at carefully has turned out | to be wrong.--Brent Welch -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/> iD8DBQE+J+tVOyltUcwYWjsRAqWWAJwOZFT9f+c/e1zr4ARXOMuX5PqnwACgkZE3 wtZUZ9u1qkGieYDWTKM6LLY= =l+gS -----END PGP SIGNATURE-----
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC