hi all,
In a big publishing project, we (finally) are
considering the transition from DTDs to XML Schema.
No big deal, because we set up de DTD/Schema
management system using RELAX NG, TRANG and oXygen.
But now I ran into a problem with catalogs,
PUBLIC ID's and XSDs.
The existing DTDs are called using a
(SGML-)catalog with PUBLIC ID's. I was trying to 1) update the catalog to
a catalo.xml (OASIS 1.1) and 2) using the PUBLIC ID mechanisme to adress
the new XSD-files.
For now I have 2 xsd-files, so 2 lines the
catalog.xml
<public publicId="-//Daidalos/XSD
BE-JUR-OFF-XML//NL" uri="be-jur-off/be-jur-off.xsd"/>
<public
publicId="-//Daidalos/XSD BE-JUR-COM-XML//NL"
uri="be-jur-com/be-jur-com.xsd"/>
The xsd-files are placed relative to the
catalog.xml.
With verbosity "on" I can see the PUBLIC IDs are
resolved correctly:
Description: Resolved public: -//Kluwer/XSD
BE-JUR-OFF-XML//NL file:/C:/Kluwer/PuMaSVN/relax/trunk/DTDs/be-jur-off/be-jur-off.xsd
Description:
Resolved public: -//Kluwer/XSD
BE-JUR-COM-XML//NL file:/C:/Kluwer/PuMaSVN/relax/trunk/DTDs/be-jur-com/be-jur-com.xsd
When I make a XML-instance which starts like
this:
<?xml version="1.0"
encoding="US-ASCII"?>
<!DOCTYPE be PUBLIC "-//Kluwer/XSD
BE-JUR-OFF-XML//NL" "be-jur-off.xsd">
<be>
..
</be>
and validate, the following errrors
appear:
SystemID:
C:\Daidalos\stage4\voorbeeldcontent\242_r06-058hr_2007-03-16_nj_mycompb_2007-12-18\242_r06-058hr_2007-03-16_administratieve-uitspraak.xml
Description:
There is no schema or DTD associated with the document. You can create an
association either with the Associate Schema action or configuring in the
Options the Preferences/Document Type Association list, or by creating a
Validation Scenario.
SystemID:
C:\Daidalos\PuMaSVN\relax\trunk\DTDs\be-jur-off\be-jur-off.xsd
Location:
8:2
Description: F [Xerxes] The markup declarations contained or pointed to
by the document type declaration must be well-formed.
But when I directly point to the xsd (Document
> XML Document > Associate Schema) I get this
<?xml version="1.0"
encoding="US-ASCII"?>
<!--<!DOCTYPE be PUBLIC "-//Kluwer/XSD
BE-JUR-OFF-XML//NL" "be-jur-off.xsd">-->
<be
xsi:noNamespaceSchemaLocation="file:/C:/Daidalos/PuMaSVN/relax/trunk/DTDs/be-jur-off/be-jur-off.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
...
</be>
This xml-instance validates just fine. Note that
I had to comment the DOCTYPE declaration.
What's the problem with my setup of catalog and
PUBLIC IDs?