[oXygen-user] Bug Report: Oxygen thinks DocBook <reference> is DITA <reference>

Barton Wright bwright at streambase.com
Mon Jul 30 09:16:37 CDT 2012


Hello to Oxygen Support, with thanks for such an excellent product.

There is a small bug in a reproducible corner case, where Oxygen gets confused by a DocBook 4 <reference> element used at the top level of a file, and tries to validate the file in the DITA context. I’m attaching a zip file containing example files. This was tested with Oxygen 14, but I’ve seen this behavior in previous releases.

Steps to reproduce:


1.    Create a new DocBook 4 file from the article template in Oxygen.

2.    In the new file, replace “DOCTYPE article” with “DOCTYPE reference”, and change both instances of 4.5 to 4.4 (to match the standard we still use).

3.    In the new file, replace the entire <article> contents with the contents of the <reference> example from the DocBook Definitive Guide at http://docbook.org/tdg/en/html/reference.html.

4.    Add a <referenceinfo> element above the <title> element, containing one <corpauthor> element that contains any string.

5.    A file as described above is in the attached zip file as def-guide-reference-example-1.xml.

6.    This file validates as a DocBook file in Oxygen, as expected, as well as in XXE (XMLMind XML Editor) and with xmllint.

But wait, there’s more:


7.    Now create two more new DocBook 4.4 files as described above. Change to “DOCTYPE refentry” and replace the <article> contents with the two <refentry> elements from the first example.

8.    Two files as described here are in the zip file as awk.xml and gnu-as.xml.

9.    Now replace the <refentry> elements in the main file with XInclude references to the two <refentry> files. A file as described here is in the zip file as def-guide-reference-example-2.xml.

10.  This second example validates fine in XXE and with xmllint, both of which can resolve XIncludes in DocBook 4 files.

11.  As expected, this file fails to validate in Oxygen because Oxygen cannot natively resolve XIncludes in DocBook 4 files. (We are used to this fact of life, and wish it were otherwise.) But that’s not the problem. Notice the validation failure messages, which begin as follows:
[cid:image001.png at 01CD6E3C.66BF2B30]

12.  Even if you edit this second example to add Oxygen’s xinclude.mod support, the file is still considered to be in the DITA context.

13.  Further, copy a valid <refentry> element back into the file so that it has one <refentry> local to the file and two XIncluded <refentry> pages, and validation still fails with the message shown above.

14.  Comment out the XIncludes, and Oxygen validation returns to the DocBook context.

Conclusion: there is something about the combination of a <reference> top-level element and an <xi:include> element that makes Oxygen ignore the DOCTYPE declaration and instead treat the file as a DITA file.

Note again that XXE and xmllint* have no problem with this combination.

We grudgingly accept the fact that Oxygen does not support XIncludes in DocBook 4 files unless the xinclude.mod kludge is used. But Oxygen should never consider an otherwise valid DocBook-declared file as a DITA file, despite the use of the <reference> element in both standards.

*Our xmllint validation command is:
   xmllint --xinclude --catalogs --timing --noout --noent –postvalid filename.xml
You can ignore a message that SGML_CATALOG_FILES is not set, or just set that to =/etc/xml/catalog. (Tested on Cygwin 1.7 and Linux Mint 11.)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20120730/9ce6185c/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6621 bytes
Desc: image001.png
Url : http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20120730/9ce6185c/attachment-0001.png 


More information about the oXygen-user mailing list