Bug 541187 - Zero's are being stripped out of code examples included as xi:includes on doc stage
Summary: Zero's are being stripped out of code examples included as xi:includes on doc...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 2.0
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Michael Hideo
QA Contact: Joshua Wulf
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-25 06:55 UTC by Jared MORGAN
Modified: 2015-08-10 01:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-25 08:19:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Jared MORGAN 2009-11-25 06:55:01 UTC
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 07:35:15 UTC
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 07:51:43 UTC
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 08:19:27 UTC
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 21:55:23 UTC
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 22:33:11 UTC
(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.


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