Bug 580751
| Summary: | Fails to build when a section in an appendix links to a term with and index entry | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Publican | Reporter: | Josh <joshkayse> | ||||
| Component: | publican | Assignee: | Jeff Fearn 🐞 <jfearn> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 1.6 | CC: | jfearn, mmcallis, publican-list, rlandman | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | publican-1.6.3-0.fc12 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-05-17 18:56:41 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
If you xref to an element without an XRefLabel it uses the content of that element as it's content, in this case that includes the indexterm, which has already been given a default ID. Extra fun is added since we don't support XRefLabel in publican because of translation issues [1]. I'm guessing we will need to override the xref code so it doesn't copy indexterms when creating the text, not sure how long this will take. You could probably work around it by moving the indexterm on to the listitem until we get a proper fix. [1] http://jfearn.fedorapeople.org/en-US/Publican/1.5/html/Users_Guide/appe-Users_Guide-Disallowed_elements_and_attributes.html#sect-Users_Guide-Disallowed_elements_and_attributes-Disallowed_attributes Here is another work around <variablelist> <varlistentry> <term> <indexterm id="test"><primary>term</primary><secondary>secondary</secondary></indexterm> term </term> <listitem><para>para</para></listitem> </varlistentry> </variablelist> <para>A link <xref linkend="test"/></para> And you all wonder why I'm crazy. (In reply to comment #2) > Here is another work around > > <variablelist> > <varlistentry> > <term> > <indexterm > id="test"><primary>term</primary><secondary>secondary</secondary></indexterm> > term > </term> > <listitem><para>para</para></listitem> > </varlistentry> > </variablelist> > <para>A link <xref linkend="test"/></para> > > And you all wonder why I'm crazy. confirmed, that works for us. great job. PS: making my own brand, I'm surprised you're as sane as you are... I believe this is a bug in the upstream FO XSL. Had to add ID to <xsl:template match="varlistentry/term"> Had to override: <xsl:template match="varlistentry/term" mode="xref-to"> <xsl:template match="indexterm" mode="xref-to"> <xsl:template match="primary|secondary|tertiary" mode="xref-to"> Verified that the code sample in the original report builds fine in PDF in 1.6.2.t169 publican-1.6.3-0.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc13 publican-1.6.3-0.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc12 publican-1.6.3-0.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update publican'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc12 publican-1.6.3-0.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update publican'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc13 publican-1.6.3-0.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. publican-1.6.3-0.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 405426 [details] The test.fo with the duplicate IDs. Description of problem: If you have a variable list with a term as an entry and the term has an index entry the FOP fails to complete with error: org.apache.fop.fo.ValidationException: file:/path/to/book/test/tmp/en-US/xml/test.fo:119:304: Property id "id562930" previously used; id values must be unique in document. Version-Release number of selected component (if applicable): publican-1.6.2-0.fc12.noarch How reproducible: Always Steps to Reproduce: 1. publican create --type=book --name=test 2. add <variablelist> <varlistentry> <term id="test"> <indexterm><primary>primary</primary><secondary>secondary</secondary></indexterm> term </term> <listitem><para>para</para></listitem> </varlistentry> </variablelist> <para>A link <xref linkend="test"/></para> to Chapter.xml 3. publican build --langs=en-US --format=pdf Actual results: org.apache.fop.fo.ValidationException: file:/path/to/book/test/tmp/en-US/xml/test.fo:105:278: Property id "id508178" previously used; id values must be unique in document. at org.apache.fop.fo.FObj.checkId(FObj.java:176) at org.apache.fop.fo.FObj.startOfNode(FObj.java:156) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:295) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:208) at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:281) at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.comment(ToXMLSAXHandler.java:406) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.comment(AbstractSAXParser.java:670) at com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler.comment(XIncludeHandler.java:817) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:454) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:810) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:740) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:110) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:641) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:712) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:196) Finished pdf Expected results: Successfully built pdf with a link to that term. Additional info: I have not tested whether it is specific to terms or affects other entries. Removing either the xref or the indexterm allows the document to be built. I've attached the produced test.fo