This section provides examples of constraint declaration modules.
<!ENTITY shortdescReq.constraint "(topic shortdescReq-c)" > <!ENTITY % topic.content "((%title;), (%titlealts;)?, (%shortdesc;), (%prolog;)?, (%body;)?, (%related-links;)?, (%topic-info-types;)*)" > <!ENTITY % topic.attributes "id ID #REQUIRED conref CDATA #IMPLIED %select-atts; %localization-atts; outputclass CDATA #IMPLIED"> ... <!ELEMENT topic %topic.content;> <!ATTLIST topic %topic.attributes;> <!ATTLIST topic %arch-atts; domains CDATA "&included-domains;" >
<!ENTITY basicHighlight-c-att "(topic hi-d basicHighlight-c)" > <!ENTITY % basicHighlight-c-ph "b | i">
<xs:group name="basicHighlight-c-ph"> <xs:choice> <xs:element ref="b"/> <xs:element ref="i"/> </xs:choice> </xs:group>
... (topic hi-d noNestedHighlight-c) (topic hi-d basicHighlight-c) ...
<!ENTITY simpleSection.constraints "(topic simpleSection-c)" > <!ENTITY % section.content "((%title), (%basic.block; | %data.elements.incl; | %foreign.unknown.incl; | %sectiondiv;)*) " >
Note that this constraint module and the shortdescReq constraint module both constrain task but because they constrain different element types they do not conflict and can be used together. Each constraint module provides its own contribution to the @domains attribute, so that when integrated the effective value of the @domains attribute will include the declarations for both constraint modules, as well as the declarations for the other modules integrated by the shell document type, e.g.:
... (topic shortdescReq-c) (topic simpleSection-c) ..
A document type shell replaces the <ph> element with extension elements from the highlighting and programming domains. Because the highlighting and programming domains cannot be generalized to a topic without the <ph> element, the removal constraint must be declared on the topic module with a separate parenthetical expression.
The @domains attribute declaration:
(topic noBasePhrase-c) (topic hi-d) (topic pr-d)
Return to main page.
DITA v1.2 CS 01
Copyright © OASIS Open 2005, 2010. All Rights Reserved.