Bug 709708 - Entities remain unresolved
Entities remain unresolved
Status: CLOSED NOTABUG
Product: Publican
Classification: Community
Component: publican (Show other bugs)
2.5
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jeff Fearn
Ruediger Landmann
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-01 09:01 EDT by Henning Kockerbeck
Modified: 2011-06-21 23:16 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-21 23:16:05 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 Henning Kockerbeck 2011-06-01 09:01:07 EDT
Description of problem:
When I build a document with Publican, entities like – or &YEAR; appear literally in the final output instead of being resolved.

Version-Release number of selected component (if applicable):
I'm using the package Publican 2.3-2 as it is delivered with Ubuntu 11.04, 64 Bit.

How reproducible:
Problem appears every time

Steps to Reproduce:
1. Create a new Publican document: publican create --name testdoc
2. Add an entity known to testdoc.ent, say &YEAR;, somewhere in the document, say in Chapter.xml
3. Build it: cd testdoc; publican build --formats pdf,html --langs en-US
  
Actual results:
Legal notices in the final PDF as well as HTML output say "Copyright © &YEAR; &HOLDER; This material may only..." The entity added in step 2 remains unresolved as well.

Expected results:
Enties are expected to be resolved in the final output.

Additional info:
The problem seems to appear in all output formats. I tested PDF, HTML, single HTML and TXT. There's no difference whether the entity appears directly in testdoc.xml or in an included xml file.

Thanks for any hints.
Comment 1 Jeff Fearn 2011-06-02 17:54:07 EDT
Hi Henning, it sounds like a perl module issue, can you paste the output of this command:

perl -MHTML::Tree -MXML::TreeBuilder -e 'print "HTML::Tree: $HTML::Tree::VERSION\nXML::TreeBuilder: $XML::TreeBuilder::VERSION\n"'
Comment 2 Henning Kockerbeck 2011-06-02 18:20:45 EDT
Hi Jeff,

thanks for your answer. According to the command you supplied, both perl modules are there in the following versions

HTML::Tree: 4.1
XML::TreeBuilder: 3.09
Comment 3 Jeff Fearn 2011-06-02 19:52:55 EDT
(In reply to comment #2)
> Hi Jeff,
> 
> thanks for your answer. According to the command you supplied, both perl
> modules are there in the following versions

The problem is probably HTML::Tree 4, which contains significant changes. Upgrading XML::TreeBuilder to >= 4 may solve the problem, as may down grading HTML::Tree < 4.

> HTML::Tree: 4.1
> XML::TreeBuilder: 3.09
Comment 4 Henning Kockerbeck 2011-06-02 20:25:45 EDT
Hi Jeff,

thanks for your advice. Installing the deb package libxml-treebuilder-perl_4.0-1_all.deb from the coming Ubuntu 11.10 solved the problem, "real" entities are resolved fine. I say "real" entities because the entities in the automatically added legal notices ("Copyright © &YEAR; &HOLDER; This material may only...") still remain unresolved. But that seems to be a different problem; as far as I can see these are written in the templates as &amp;YEAR; and &amp;HOLDER;, for whatever reason. So technically, these entities are resolved as well, just not as one would expect.

Am I supposed to close this bug report or is this something you as a project member do?
Comment 5 Adam Stokes 2011-06-21 13:02:42 EDT
Im running Fedora 15 using Fedora's branding and seeing the same issue with the default Preface

Specs:
perl-XML-TreeBuilder-4.0-4.fc15.noarch
perl-HTML-Tree-4.1-2.fc15.noarch
publican-2.5-2.fc15.noarch

My Entites file:
<!ENTITY PRODUCT "Documentation">
<!ENTITY BOOKID "Matahari">
<!ENTITY YEAR "2011">
<!ENTITY HOLDER "Matahari Project">

Preface output:
Legal Notice
Copyright © &YEAR; &HOLDER;. 

Any suggestions?
Comment 6 Ruediger Landmann 2011-06-21 23:16:05 EDT
(In reply to comment #5)
> Im running Fedora 15 using Fedora's branding and seeing the same issue with the
> default Preface

...

> Preface output:
> Legal Notice
> Copyright © &YEAR; &HOLDER;. 

Hi Adam -- that's actually unrelated and seems to have been caused by a hiccup in Koji at some point; there's a separate bug open for it: bug 714810

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