Page 1 of 1

DocBook4.2 validation

Posted: Mon Apr 07, 2008 4:39 pm
by mholman
How can I configure oxygen to validate xml using docbook4.2?
I tried changing the Schema URI to ${frameworks}/4.2/dtd/docbookx.dtd via the Options/Preferences/Document Type Association/DocBook 4 entry. This did not work.

My dtd has the following
<!ENTITY % calstblx PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN" "soextblx.dtd" >
which causes the following validation error when validating my xml:
SystemID: C:\Program Files\Oxygen XML Editor 9\frameworks\docbook\4.4\dtd\soextblx.dtd
Location: 316:1
Description: A '(' character or an element type is required in the declaration of element type "entry".

Re: DocBook4.2 validation

Posted: Mon Apr 07, 2008 5:01 pm
by sorin_ristache
Hello,

Do not modify the DocBook 4 document type from Options -> Preferences -> Document Type Association. Just use the URL of the DocBook 4.2 DTD in your XML document:

Code: Select all

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<article>
...
</article>
The XML catalog of oXygen maps the URL to the local version of the DocBook 4.2 DTD.


Regards,
Sorin

Re: DocBook4.2 validation

Posted: Mon Apr 07, 2008 8:33 pm
by mholman
Thanks for the response.

I found that I could just change the eternal reference so that the XML processor will not try and generate an alternate URI.

This
<!ENTITY % calstblx PUBLIC ""
"http://www.docbook.org/xml/4.2/soextblx.dtd" >

instead of this
<!ENTITY % calstblx PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN" "soextblx.dtd" >

Re: DocBook4.2 validation

Posted: Tue Apr 08, 2008 12:32 pm
by sorin_ristache
It is not an alternate URI, it is the full path of the DTD obtained by the XML parser by resolving a relative reference to a DTD used in the XML document (in your case "soextblx.dtd") to a full path by appending the relative path to the directory of the XML document. You should use a standard reference for a DocBook DTD, that is http://www.oasis-open.org/docbook/xml/4.2/docbook.dtd, http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd, etc. so that it is resolved to the local version using an XML catalog.


Regards,
Sorin