Restriction of DITA domain

This should cover W3C XML Schema, Relax NG and DTD related problems.
Pascale
Posts: 40
Joined: Wed Jan 29, 2014 4:30 pm

Restriction of DITA domain

Post by Pascale »

Hi,
DITA 1.2 specification says in section 2.1.4.4 "For example, a constraint on the Programming Domain could reduce the list of included extension elements to <codeph> and <codeblock>."

This is exactly what I want, but I do not understand how to do it!

Do I need to include the Programming Domain in my shell DTD, and then add a restriction module?
I understand how to restrict, for example, the pr-d-ph entity, but how do I undeclare the elements that I do not want to include in my DTD, such as synph or apiname ?

Thanks in advance for your help,
Pascale
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Restriction of DITA domain

Post by Radu »

Hi Pascale,

Possibly Eliot Kimber's tutorial about creating a constraint module should help:

http://www.xiruss.org/tutorials/dita-sp ... odule.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Pascale
Posts: 40
Joined: Wed Jan 29, 2014 4:30 pm

Re: Restriction of DITA domain

Post by Pascale »

Hi Radu,

thanks for reminding me the link, I agree that Eliot Kimber website and book is an invaluable resource for DITA specialization.
However I am looking for more: what I want to do is to remove elements from an existing DITA Domain, and I could not find any info about that.

The solution I implemented was to include in my shell DTD a copy of the original DITA domain where I have removed all entities related to the elements I do not want to have in my DTD. I have kept other entities, including the domain declaration attribute, as is.

I am not sure that this way of doing it is valid regarding the rules of DITA architecture and DTD specialization, but both Oxygen and the DITA OT accept my DTD, so that's OK for now.

Kind regards,
Pascale
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Restriction of DITA domain

Post by Radu »

Hi Pascale,

That looks like the proper way to do things.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply