Page 1 of 1

Setup to use common DTD?

Posted: Wed May 19, 2004 6:22 pm
by smaug42
OK, this might be an obvious one, but I can't find it.

I have a large set of XML docs sorted by topic etc into a whole bunch of subdirs. The common DTD is stored in a dir called "rules".. so the structure looks something like this:

cvsroot
/rules - contains DTDs
/xml - root of my xml files
/xml/data1 - dir contianing xml by topic
/xml/data2
/xml/data1/data3
etc

I have a declaration like this at the top of each XML file
<!DOCTYPE page PUBLIC "-//Redwood//DTD Page 1.1//EN" "page.dtd">

pge.dtd is stored in the rules dir, and the old editor I've been using kows this, and can validate against this without needing the relative path in the DOCTYPE. Oxygen can only validate against the DTD if I type in the relative path... ie, ../rules/page.dtd I can't do this for many reasons... external tools, files in nested dirs etc.

So, down to my question... is there any way I can keep my DOCTYPE line the same, and let Oxygen know that page.dtd is always in $PATH/rules ??

Posted: Wed May 19, 2004 7:51 pm
by george
Sure, you can set an XML catalog and resolve the DTD by its public ID. You can place the catalog in the rules directory and it should contain something like:

Code: Select all


<?xml version='1.0'?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="-//Redwood//DTD Page 1.1//EN" uri="page.dtd"/>
<!-- more entries below if you have more DTDs -->
</catalog>
See http://www.oxygenxml.com/doc/ug-oxygen/ ... alogs.html for details about adding an XML Catalog in oXygen.

Best Regards,
George

Posted: Tue May 25, 2004 2:28 pm
by smaug42
Thanks. That worked perfectly. I knew it would be something easy. Now for the real test of the editor in the live environment.... :-)