This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 697367

Summary: Include DocBook 5-compatible Common Content
Product: [Community] Publican Reporter: Ruediger Landmann <r.landmann>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: Ruediger Landmann <rlandman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.5CC: dmacpher, mmcallis, publican-list, sgordon
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-30 23:11:37 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 820023, 839113    

Description Ruediger Landmann 2011-04-17 23:34:18 EDT
Publican's Common Content files are not compatible with DocBook 5 documents. Specifically:

* the id= attribute is now xml:id
* <ulink url=""> is now  <link xlink:href="">
Comment 1 Jeff Fearn 2011-04-18 01:07:54 EDT
The problem is bigger than ID's, we will actually need to have a completely separate "brand" for docbook 5 common content.

As a start for this I've added a new brand config option, base_brand, to allow multiple base brands.

We still need to ahve a separate common content, as well as separate XSL.

We will need a decent sized book to test this on.
Comment 2 Jeff Fearn 2011-04-18 18:40:41 EDT
Consider abandoning DocBook 4 support in Publican 3, and modifying old2new to do DocBook 4 -> DocBook 5 conversions.
Comment 3 Jeff Fearn 2012-03-12 00:32:58 EDT
Added datadir/Common_Content/common-db5 with DB5 converted content.
Added bin/db4-2-db5 and datadir/xsl/db4-upgrade.xsl to do conversion.

For DB4 books being converted the brand needs to be changed from common to common-db5.

Brands for DB5 should set base_brand to common-db5.

Needs lots of testing.
Comment 4 Jared MORGAN 2012-05-08 00:34:44 EDT
(In reply to comment #3)
> Added datadir/Common_Content/common-db5 with DB5 converted content.
> Added bin/db4-2-db5 and datadir/xsl/db4-upgrade.xsl to do conversion.
> 
> For DB4 books being converted the brand needs to be changed from common to
> common-db5.
> 
> Brands for DB5 should set base_brand to common-db5.
> 
> Needs lots of testing.

Can you give us somewhere to start with testing this please Jeff (doing this for me and others, depending on who picks this ticket up).

Where are the new, shiny, Docbook 5 brands? Is it the publican-experimental brand we need?

[noob question] Tips for compiling a brand (same as building publican?) for Docbook 5 outuput.

Items to test:

* the id= attribute is now xml:id
* <ulink url=""> is now  <link xlink:href="">
* the conversion script, and what it has missed (if anything).
Comment 5 Jeff Fearn 2012-05-08 03:33:22 EDT
There is a bug in deploying the DB5 common brand, which should be enough for testing. The installer is broken and I need to fix it.
Comment 6 Dan Macpherson 2012-06-16 01:04:43 EDT
Documentation possibly needed for old2new DB4 -> DB5 conversion.
Comment 7 Jeff Fearn 2012-06-23 03:06:49 EDT
Fixed common-db5 brand not being installed.

To convert a publican book's XML to DB5, cd in to the book directory and run `db4-2-db5`.

Then edit the publican.cfg:

brand: common-db5
dtdver: 5.0

Then do a test build:

$ publican build --langs en-US --formats test

It will probably complain because the Book_Info will duplicate content, just remove the xi:include to it.

It will probably complain about other things, but this is a tech preview :)

Force it build the HTML:

$ publican build --langs en-US --formats html --novalid 

The build will be slow if you don't have the DocBook 5 packages installed. i don't want to make them mandatory yet so they won't be automatically installed.

Note I tested this with dtdver: 5.1b2, seemed to work OK as well.

To ssh://git.fedorahosted.org/git/publican.git
   762f306..a26921c  master -> master
Comment 8 Ruediger Landmann 2012-06-29 01:30:10 EDT
I also had to exclude the Revision_History.xml file to avoid:

RelaxNG Validation failed: 
Revision_History.xml:8: Relax-NG validity error : Did not expect element simpara there                                                                   
Revision_History.xml:8: Relax-NG validity error : Expecting element example, got simpara                                                                 
Revision_History.xml:8: Relax-NG validity error : Expecting element bridgehead, got simpara                                                              
Revision_History.xml:9: Relax-NG validity error : Element simpara has extra content: revhistory                                                          
Revision_History.xml:8: Relax-NG validity error : Expecting element annotation, got simpara 

After that, worked as expected for 5.0

For 5.1b2, the build failed at:

FATAL ERROR: parser:60 in http://docbook.org/xml/5.1b2/rng/docbook.rng on line 2: Content error in the external subset
 at /usr/bin/publican line 879

Jeff, do you want to look at that Revision_History issue? or is that something to worry about later on?
Comment 9 Ruediger Landmann 2012-06-29 01:36:43 EDT
Heh; and 5.1b7 fails in a new and different way:

FATAL ERROR: parser:60 in http://docbook.org/xml/5.1b7/rng/docbook.rng on line 1: Content error in the external subset
Comment 10 Andrew Ross 2012-07-17 22:22:01 EDT
(In reply to comment #9)
> Heh; and 5.1b7 fails in a new and different way:
> 
> FATAL ERROR: parser:60 in http://docbook.org/xml/5.1b7/rng/docbook.rng on
> line 1: Content error in the external subset

Rudi does this mean we should move the bug back to ASSIGNED?
Comment 11 Jeff Fearn 2012-07-17 22:26:28 EDT
This is a tech preview, I don't care if needs tweaking by the user to get it working.
Comment 12 Stephen Gordon 2013-09-18 22:15:27 EDT
(In reply to Ruediger Landmann from comment #9)

> FATAL ERROR: parser:60 in http://docbook.org/xml/5.1b7/rng/docbook.rng on
> line 1: Content error in the external subset

To any other lucky winners who come across this bug via the googles I was encountering this error on the 5.0 schema (as opposed to 5.1b7 in the example above) but found that switching the dtdver to 5.1 proper seemed to resolve the issue (this was on Publican 3.1.2). No other file or library changes were required, YMMV.