Bug 602008 - Code highlighting support for programlistingco
Code highlighting support for programlistingco
Status: CLOSED DUPLICATE of bug 590933
Product: Publican
Classification: Community
Component: publican (Show other bugs)
1.6
All Linux
low Severity medium
: ---
: ---
Assigned To: Ruediger Landmann
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-08 21:19 EDT by BenC
Modified: 2010-11-23 23:19 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-09 06:57:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description BenC 2010-06-08 21:19:09 EDT
Description of problem:
Code highlighting within a programlistingco tag set will nor build in publican.

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


How reproducible:



Steps to Reproduce:
1. Locate a programlisting within a programlistingco tag set.
2. Move the code within the programlisting to an extras directory
3. Replace the programlisting with <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/code.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
4. Build the book
  
Actual results:

LibXSLT: error coming back from perl-dispatcher in pm file. Entity:
line
1: parser error : Opening and ending tag mismatch: span line 1 and
pre
ML"><span class="perl_Keyword">&lt;cache</span><span
class="perl_Others">  </pre>

           ^
Entity: line 1: parser error : Premature end of data in tag pre line
1
ML"><span class="perl_Keyword">&lt;cache</span><span
class="perl_Others">  </pre>

           ^
Entity: line 1: parser error : chunk is not well balanced
ML"><span class="perl_Keyword">&lt;cache</span><span
class="perl_Others">  </pre>

           ^

   at /usr/share/perl5/Publican/Builder.pm line 760 


Expected results:
The Book builds.


Additional info:
We are extracting programlistings into an extras directory and using code highlighting. Adding support for programlistings within programlisitngco tags will result in a consistent appearance.

Ben
Comment 1 Jeff Fearn 2010-06-08 21:26:43 EDT
Hey Rudi, I'm pretty sure this is a dupe of 590933, can you verify please?

Cheers, Jeff.
Comment 2 Jeff Fearn 2010-06-09 01:14:48 EDT
FWIW programlistingco already works with the highlighting code, it must be some difference in the code you are trying to highlight, can you attach or link to the offending file?
Comment 3 BenC 2010-06-09 03:06:58 EDT
It turns out that it is the code xi:included which is causing the problem. This won't build: 

<list-index 
        column="column_name"
        base="0|1|..."/>

This will build:
<list-index column="column_name" base="0|1|..."/>

There are 510 programlistings in this document (extracted using a perl script) so as I find others which break the build I will post them.
Comment 4 BenC 2010-06-09 03:23:10 EDT
It turns out that the problem relates to the code which is xi:included. For example this causes the build to fail:

<list-index 
        column="column_name"
        base="0|1|..."/>

This results in a successful build:
<list-index column="column_name" base="0|1|..."/>

This fails:
<map-key 
        column="column_name"
        formula="any SQL expression"
        type="type_name"
        node="@attribute-name"
        length="N"/>

This succeeds:
<map-key column="column_name"
        formula="any SQL expression"
        type="type_name"
        node="@attribute-name"
        length="N"/>


Ben
Comment 5 BenC 2010-06-09 03:29:28 EDT
Ignore comment number 3. 

I re-posted comment 3 as comment 4. The server was experiencing problems when I submitted comment 3.
Comment 6 Ruediger Landmann 2010-06-09 06:57:49 EDT
(In reply to comment #1)
> Hey Rudi, I'm pretty sure this is a dupe of 590933, can you verify please?

Confirmed that this appears to be the same issue as 590933, although the code feature triggering the bug is slightly different. 590933 was caused by a hard return inside an attribute in sample XML, here the hard return is between attributes. 

In any case, the fix there fixes this too; I cannot reproduce on 1.99.t90

*** This bug has been marked as a duplicate of bug 590933 ***

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