Hello Wolfgang,
Your short article example happened to hit a long-standing problem with
DocBook 4 that DocBook 5 fixes.
Originally the article element in DocBook required a title element. As
DocBook evolved, the articleinfo container was added to hold metadata, then
it was decided that title could also reside in articleinfo. For backwards
compatibility, title was also left as a child of article, but made optional
so that one could put their title in articleinfo instead. The committee
wanted to enforce putting the title in one place or the other, but that was
so difficult to do with DTD syntax that it didn't happen. So in Docbook 4,
one could have zero, one, or two titles and the document would be valid.
DocBook 5 is defined using RelaxNG syntax. The RelaxNG syntax made it easier
to support the original intention to require a single title, in either
location. So DocBook 5 fixes this long standing problem with DocBook 4, and
is one of the few instances where DocBook 5 is not backwards compatible with
DocBook 4. A more sophisticated conversion script would flag that with a
warning that it be fixed in the output.
Bob Stayton
Sagehill Enterprises
[email protected]
----- Original Message -----
From: "wolfgang haefelinger" <[email protected]>
To: <[email protected]>
Sent: Monday, December 21, 2009 4:58 AM
Subject: [docbook] upgrade 4.5 => 5.0 failed (on rather basic example)
Hello,
I'm upgrading a 4.5 Docbook document to 5.0 using db-upgrade.xsl and
I'm getting an error on a rather simple document. Here it comes ..
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE article
PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<article lang=3D"">
<sect1>
<title>Hello, ..</title>
<para>world</para>
</sect1>
</article>
This document is valid according to a) Emacs/nxml and b) MSV.
Then I upgraded this document with db4-upgrade.xsl (Release: $Id:
db4-upgrade.xsl 7660 2008-02-06 13:48:36Z nwalsh $) and I get:
<!-- Converted by db4-upgrade version 1.0 -->
<article xmlns=3D"http://docbook.org/ns/docbook" version=3D"5.0"
xml:lang="">
<section><info><title>Hello, ..</title></info>
<para>world</para>
</section>
</article>
which is !!! NOT !!! valid ( inserting a article/title element makes it
valid).
Is this bug known?
Is there a bug tracker?
Patches accepted?
Regards.
Wolfgang H=E4felinger
häfelinger IT - Applied Software Architecture
http://www.haefelinger.it
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]