A structural constraint module defines the constraints for a map or topic element type. A domain constraint module defines the constraints for an element or attribute domain.
Structural constraint modules have the following requirements:
@domains contribution entity name and value@domains attribute
contribution for the module; see domains attribute rules and syntax
for details on how to construct this value. <!ENTITY taskbody-constraints "(topic task strictTaskbody-c)" >
For example, the following parameter
entity defines a constrained set of attributes for the <note>
element that removes most of the values defined for @type, and also
removes @spectitle and @othertype:
<!ENTITY % note.attributes
"type (attention | caution | note ) #IMPLIED
%univ-atts;
outputclass CDATA #IMPLIED">
<topic>, in which the
<shortdesc> element is
required.<!ENTITY % topic.content
"((%title;),
(%titlealts;)?,
(%shortdesc;),
(%prolog;)?,
(%body;)?,
(%topic-info-types;)*)"
>
Domain constraint modules have the following requirements:
@domains contribution entity name and value@domains attribute contribution for the
module; see domains attribute rules and syntax for details on how to
construct this value.
For example, the following text entity provides the declaration for a constraint module that restricts the highlighting domain:
<!ENTITY HighlightingDomain-constraints "(topic hi-d basic-HighlightingDomain-c)" >
For example, the following
parameter entity restricts the highlighting domain to <b> and
<i>:
<!ENTITY % HighlightingDomain-c-ph "b | i" >
When element domains are used to extend a base element, those extensions can be used to replace the base element. This form of constraint is done inside the document-type shell.
Within a document-type shell, domain
extensions are implemented by declaring an entity for a base element. The value of
the entity can omit any base element types from which the other element types that are
listed are specialized. Omitting a base type constitutes a form of constraint; as with any
other constraint, this form of constraint must contribute a token to the
@domains attribute. That token can be defined in a module file (which does
not define any other entities or values), or the token can be placed directly into the
document-type shell definition for the included-domains entity.
<pre> base type
is removed from the entity declaration, effectively allowing only specializations of
<pre> but not <pre> itself. This omission
would require the use of a @domains contribution token within the
included-domains entity.<!ENTITY % pre
"%pr-d-pre; |
%sw-d-pre; |
%ui-d-pre;">
Return to main page.
dita-v1.3-cs01-part1-base Standards Track Work Product | Copyright © OASIS Open 2015. All Rights Reserved. | 21 August 2015 |