Bug 602008 - Code highlighting support for programlistingco
Summary: Code highlighting support for programlistingco
Status: CLOSED DUPLICATE of bug 590933
Alias: None
Product: Publican
Classification: Community
Component: publican   
(Show other bugs)
Version: 1.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ruediger Landmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-09 01:19 UTC by BenC
Modified: 2010-11-24 04:19 UTC (History)
5 users (show)

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


Attachments (Terms of Use)

Description BenC 2010-06-09 01:19:09 UTC
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-09 01:26:43 UTC
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 05:14:48 UTC
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 07:06:58 UTC
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 07:23:10 UTC
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 07:29:28 UTC
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 10:57:49 UTC
(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.