When documents use different constraints, conref and generalization processors may examine the @domains to verify compatibility between the document instances.
To determine compatibility between two document instances, a conref processor can check the @domains attribute to confirm that
|(topic)||(topic shortdescReq-c)||Allowed - content model of referenced topic is more constrained|
|(topic shortdescReq-c)||(topic)||Prevented - content model of referenced topic is less constrained|
|(topic hi-d)||(topic hi-d basicHighlight-c)||Allowed - domain extension list of referenced document type shell is more constrained|
|(topic hi-d basicHighlight-c)||(topic hi-d)||Prevented - domain extension list of referenced document type shell is less constrained.|
|(topic hi-d)||(topic noBasePhrase-c) (topic hi-d)||Allowed - referencing document type shell doesn't replace base element with domain extensions.|
|(topic noBasePhrase-c) (topic hi-d)||(topic hi-d)||Prevented - referencing document type shell does replace base element with domain extensions.|
|(topic task) (topic hi-d basicHighlight-c)||(topic simpleSection-c task simpleTaskSection-c)||Allowed - referencing shell has a subset of the constraints of the referenced shell on the common vocabulary modules.|
|(topic shortdescReq-c task shortdescTaskReq-c) (topic hi-d basicHighlight-c)||(topic simpleSection-c task simpleTaskSection-c)||Prevented - referencing shell has constraints on common vocabulary modules that aren't in the referenced shell.|
Similarly, to determine compatibility between a document instance and a target document type, a generalization processor can use the @domains and @class attributes for the document instance and the @domains attribute for the target document type to determine how to rename elements in the document instance. For each element instance, the generalization processor:
Iterates over the @class attribute on the element instance from specific to general, inspecting the vocabulary modules.
Looks for the first vocabulary module that is both present in the target document type and that has a subset of the constraints in the document instance.
If a module is found in the target document type, that module becomes the minimum threshhold for the generalization of contained element instances.
If a module is not found, the document instance cannot be generalized to the target document type and, instead, can only be generalized to a less constrained document type.
Note that a document instance can always be converted from a constrained document type to an unconstrained document type merely by switching the binding of the document instance to the less restricted schema (which would also have a different @domains attribute declaration). No renaming of elements is needed to remove constraints.
Return to main page.
OASIS DITA Version 1.2 -- OASIS Standard, 1 December 2010
Copyright © OASIS Open 2005, 2010. All Rights Reserved.