Validating XML with DTD through a Catalog

Questions about XML that are not covered by the other forums should go here.
mphare
Posts: 71
Joined: Fri Apr 30, 2004 8:00 pm
Location: Texas

Validating XML with DTD through a Catalog

Post by mphare »

Hi,

I am using Oxygen 13.2 and am going though some DITA tutorials that use DTDs.

I believe this question is general XML, not DITA specific, but will re-post in the DITA forum if you believe it is specific to DITA.

I have setup a DTD that is accessed through an XML catalog. Oxygen is resolving though the catalog and validating my document.

My question is in regards to the <!DOCTYPE> statement, here:

Code: Select all

<!DOCTYPE faq-question
PUBLIC "urn:pubid:example.org:doctypes:dita:faq-question" ".dtd"
>
As you can see, system ID is set to ".dtd", my understanding it's value is not used. Obviously, the name is bogus, my dtd is named "faq-question.dtd". I can change the ".dtd" to anything as long as it has the ".dtd" (e.g. "bogus.dtd") and it still works. But if I change the ".dtd" to anything that does not include the ".dtd" (e.g. "bogus") then Oxygen no longer validates my document through the DTD. I get "There is no Schema or DTD associated with this document" errors.

From what I have read the system ID part of the public DTD is unused. Is this expected behavior for the DTD validation in Oxygen?

Thanks,

- Michael Hare
--------------------------

- mike

GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Validating XML with DTD through a Catalog

Post by adrian »

Hello,

Thank you for contacting us.

This issue(required ".dtd" in system ID) is a known problem regarding Oxygen's validation.
Oxygen uses the ".dtd" suffix to determine which type of validator it should use. If there is no ".dtd" suffix, it fails to determine the appropriate DTD validator and doesn't resolve the system ID through the XML catalog anymore.

This is already logged to our issue tracking tool and will be resolved in a future version of Oxygen.

Until this gets resolved, please keep the bogus ".dtd" system DTD. As you've already observed, anything that ends in ".dtd" will work.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mphare
Posts: 71
Joined: Fri Apr 30, 2004 8:00 pm
Location: Texas

Re: Validating XML with DTD through a Catalog

Post by mphare »

I appreciate the response.
I was sure I was not understanding something fundamental regarding DOCTYPEs.

No problems with the bug, leaving .dtd in the ID is a fine workaround.

Thanks for the information!

- m
--------------------------

- mike

GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Validating XML with DTD through a Catalog

Post by adrian »

Hello,

I just wanted to let you know that the systemID problem in DOCTYPE declarations (.dtd suffix required when not needed) has been resolved in the latest maintenance build of Oxygen 13.2, 2012052412:
Validation/Content Completion: Validation against DTD did not work, if the systemID from the DOCTYPE declaration in the XML file did not have the ".dtd" suffix.
You can download it from our web site:
http://www.oxygenxml.com/download.html

The list of bug-fixes can be found here:
http://www.oxygenxml.com/build_history.html#2012052412

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply