Bug 541187

Summary: Zero's are being stripped out of code examples included as xi:includes on doc stage
Product: [Community] Publican Reporter: Jared MORGAN <jmorgan>
Component: publicanAssignee: Michael Hideo <mhideo>
Status: CLOSED NOTABUG QA Contact: Joshua Wulf <jwulf>
Severity: medium Docs Contact:
Priority: high    
Version: 2.0CC: jfearn, jmorgan, lcarlon, mmcallis, mmurray, nb, publican-list, r.landmann
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-25 03:19:27 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jared MORGAN 2009-11-25 01:55:01 EST
Description of problem:

When you push docs to documentation-stage, zeros present in xi:included XML code samples are stripped out.

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

v1.1 Unaffected
v1.2 Affected

How reproducible:

100% on v1.2

Steps to Reproduce:
1. Create a <programlisting> with language="XML" specified as an attribute.
2. In the <programlisting>, xi:include the XML code sample with parse="text" specified as an attribute of the xi:include.  (see additional info for an example)
3. Ensure the code sample has zeros present.
3. Publish to any output format and note the lack of zeros present.
  
Actual results:

The zeros in the XML sample file will be stripped out.

Expected results:

The zeroes should be treated as plain text and left alone.

Additional info:

Through initial troubleshooting locally, it appears that language="XML" attribute is the cause of the problem.  Darrin tested includes that use language="Java" and the zeroes remain.

Include as follows:

<programlisting language="XML" role="XML"><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="extras/pom.xml_sample" parse="text"/></programlisting>
Comment 1 Jared MORGAN 2009-11-25 02:35:15 EST
You can check out the JBoss_Documentation_Guide to test this out without creating the include :)

svn co https://svn.devel.redhat.com/repos/ecs/JBoss_Documentation_Guide/
Comment 2 Jeff Fearn 2009-11-25 02:51:43 EST
This doesn't happen on RHEL if you bypass the syntax highlighting, and it doesn't happen on fedora rawhide at all.

Will take some digging to determine where the issue is, maybe the Kate highlighting engine or XML::LibXML.

Workaround is to avoid setting the language attribute ... or avoid 0's!
Comment 3 Jeff Fearn 2009-11-25 03:19:27 EST
Was a bug in perl-Syntax-Highlight-Engine-Kate, have pushed 0.04-5.el5 from Fedora in to docs repo, will appear in docs repo in the near future.

We don't have a rhel component for that package, so I'm going to close it with notabug since it's not part of this package.
Comment 4 Jared MORGAN 2009-11-25 16:55:23 EST
So how would this affect the Documentation-Stage and the fact that it is running RHEL?

Once the perl module is available in the docs repo, will the Docs-Stage also be able to use the updated module?  Who would update the Docs-Stage?
Comment 5 Jeff Fearn 2009-11-25 17:33:11 EST
(In reply to comment #4)
> So how would this affect the Documentation-Stage and the fact that it is
> running RHEL?

It doesn't affect the docs-stage, it affects books you build locally and in the docs brew root.

> Once the perl module is available in the docs repo, will the Docs-Stage also be
> able to use the updated module?  Who would update the Docs-Stage?  

The updated package is available in the docs brew root a "short time' after the package has been tagged. Then you need to re-brew the affected books to get them updated.

I mentioned the docs repo because that is where rhel users will get the updated package for local builds of html/pdf etc.