Page 1 of 1

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

Posted: Thu Nov 24, 2022 8:23 pm
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

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

Posted: Fri Nov 25, 2022 9:14 am
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

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

Posted: Fri Nov 25, 2022 12:34 pm
by ann.jensen
Thanks Radu, that makes a lot of sense.
Best regards,
Ann

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

Posted: Sun Nov 27, 2022 6:20 pm
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?

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

Posted: Mon Nov 28, 2022 1:29 pm
by ann.jensen
Thank you for sharing that information chrispitude, that helps me understand the topic better,
Regards,
Ann