Help - newbie fails to use DTDSystemID

Having trouble installing Oxygen? Got a bug to report? Post it all here.
burto
Posts: 20
Joined: Wed Feb 09, 2005 10:15 pm

Help - newbie fails to use DTDSystemID

Post 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.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply