Bug 572047 - callouts containing program listings with code comments breaks build
Summary: callouts containing program listings with code comments breaks build
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 1.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-10 06:14 UTC by Richard Wilding
Modified: 2010-11-24 04:16 UTC (History)
6 users (show)

Fixed In Version: publican-1.6.1-0.fc11
Clone Of:
Environment:
Last Closed: 2010-03-24 00:47:02 UTC
Embargoed:


Attachments (Terms of Use)
Chapter.xml containing code that exposes this bug (2.09 KB, application/xml)
2010-03-22 04:05 UTC, Ruediger Landmann
no flags Details

Description Richard Wilding 2010-03-10 06:14:00 UTC
Description of problem:
This problem applies to programlistings with language attribute and callouts.
<programlisingco> is a parent tag for applying callouts to a progamlisting. If
the <programlisting> tag includes the "language" attribute to highlight the subsequent code, the following error occurs when building the document:

LibXSLT: error coming back from perl-dispatcher in pm file. Entity: line 1: parser error : Premature end of data in tag span line 1

 at /usr/lib/perl5/vendor_perl/5.10.0/Publican/Builder.pm line 744

Example:
            <programlistingco>
                <areaspec>
                    <area id="subclass1" coords="2 55"/>
                    <area id="subclass2" coords="3 55"/>
                    <area id="subclass3" coords="4 55"/>
                    <area id="subclass4" coords="5 55"/>
                </areaspec>
                <programlisting language="Java">
                code here
                ...
               </programlisting>


Version-Release number of selected component (if applicable):
1.6

How reproducible:
Always

Additional info:
Workaround: remove language attribute from the offending <programlisting> tag.

Comment 2 Ruediger Landmann 2010-03-22 04:05:53 UTC
Created attachment 401628 [details]
Chapter.xml containing code that exposes this bug

Comment 3 Jeff Fearn 🐞 2010-03-22 04:12:07 UTC
In the attachment in Comment 2, the issue is the in line comments, not the language attribute, causing the problem. Are there any other know causes of this issue?

Comment 4 Jeff Fearn 🐞 2010-03-22 05:48:30 UTC
The exact cause of this is: a callout containing a program listing, with a code comment, with syntax highlighted enabled.

Removing the language attribute disables syntax highlighting thus breaking the chain of causality.

This is due to a limitation of the callout handling code which can't handle nested blocks, highlighting the comments in code causes a nested block to be injected in the XML DOM, breaking the callout code.

Added a regex to replace the offending nested block with an inline version.

Comment 5 Ruediger Landmann 2010-03-22 06:26:13 UTC
Verified fixed in 1.6.1

Comment 6 Fedora Update System 2010-03-24 00:13:17 UTC
publican-1.6.1-0.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/publican-1.6.1-0.fc12

Comment 7 Fedora Update System 2010-03-24 00:13:50 UTC
publican-1.6.1-0.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/publican-1.6.1-0.fc11

Comment 8 Fedora Update System 2010-03-24 00:14:20 UTC
publican-1.6.1-0.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/publican-1.6.1-0.fc13

Comment 9 Fedora Update System 2010-03-24 00:46:34 UTC
publican-1.6.1-0.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2010-03-24 23:36:09 UTC
publican-1.6.1-0.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-03-24 23:37:49 UTC
publican-1.6.1-0.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.