Page 1 of 1

Help - newbie fails to use DTDSystemID

Posted: Wed Feb 09, 2005 10:25 pm
by burto
Hi folks,

Just started using oxygen and I want to be able to edit/validate docbook fragments. I have a local DTD that defines a bunch of entities and then references the real DocBook DTD.

I have tried the following at the top of the fragment file but the validation fails:

<?xml version="1.0" encoding="utf-8"?>
<?oxygen DTDSystemID="dbxml.dtd"?>

The errors I get are that it says it can't find the declaration of the first element in the file (a varlistentry) and that a text entity has been referenced but not defined (it's defined in dbxml.dtd).

Any ideas what I am doing wrong?

Curiously, the editor knows that I am editing a DocBook document because if offers completion for new element names. Before anyone asks, there is no
default DTD specified in the oxygen preferences.

Thanks.

Posted: Thu Feb 10, 2005 1:52 pm
by george
Hi,

To associate a DTD with a file you need to use a DOCTYPE declaration. You can eventually use the the Associate schema action to insert that.
However if what you are editing is a fragment you need to comment the DOCTYPE declaration when you finished editing the file otherwise you will get errors when validating the master file. As an alternative you can use XInclude, that will allow you to specify a DOCTYPE declaration also in included files, you can find a ready to use example in [oxygen]/samples/docbook.

I guess the content completion proposals you are seing are because oXygen learns the document structure on open if there is no schma or DTD specified.

Best Regards,
George