Does DITA-OT default to DTD, XSD, or RNG files?

Post here questions and problems related to editing and publishing DITA content.
ann.jensen
Posts: 272
Joined: Wed Jun 17, 2015 10:19 am

Does DITA-OT default to DTD, XSD, or RNG files?

Post by ann.jensen »

Hi,
If my DITA-OT has document types defined in dtd, schema, and rng formats, which version will validation and transform use to determine if DITA files are valid according to the associated document type?
Thanks in advance,
Ann
Radu
Posts: 8408
Joined: Fri Jul 09, 2004 5:18 pm

Re: Does DITA-OT default to DTD, XSD, or RNG files?

Post by Radu »

Hi Ann,

This depends on how the DITA topics refer to the associated schema.
If they have a DOCTYPE declaration, they are validated/published with the DITA DTDs.
If they look something like:

Code: Select all

<?xml-model href="urn:oasis:names:tc:dita:rng:topic.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<topic id="topic_ml3_dhc_qvb">
....
then they are validated with the RNGs.
You can have topics with different schema type references in the same DITA project.
When you create a DITA topic by default Oxygen shows new file templates to create the topic with any of the DTD/XML Schema/RNG types but some people customize the new file templates so that they only have access to some of the templates.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ann.jensen
Posts: 272
Joined: Wed Jun 17, 2015 10:19 am

Re: Does DITA-OT default to DTD, XSD, or RNG files?

Post by ann.jensen »

Thanks Radu, that makes a lot of sense.
Best regards,
Ann
chrispitude
Posts: 717
Joined: Thu May 02, 2019 2:32 pm

Re: Does DITA-OT default to DTD, XSD, or RNG files?

Post by chrispitude »

Hi Ann,

I prefer to use RelaxNG schemas, so when I create a new DITA file in Oxygen, I enter "RNG" in the search box to show me the available RelaxNG-format schemas.

I had similar questions about DITA schemas when I was new to DITA, so I attempted to collect answers to some of my past questions here:

#4066: In DITA, what do DTD, XSD, and RNG refer to?
ann.jensen
Posts: 272
Joined: Wed Jun 17, 2015 10:19 am

Re: Does DITA-OT default to DTD, XSD, or RNG files?

Post by ann.jensen »

Thank you for sharing that information chrispitude, that helps me understand the topic better,
Regards,
Ann
Post Reply