Creating HedgeRules
-
Reusable content
RELAX allows you to define element content model patterns using RELAX constructs for use in multiple locations. This is cleaner than the text-based parameter entity approach of XML 1.0 DTDs, and easier for applications to process. Hedge rules are much like element rules, but can't have mixed content declarations.
-
hedgeRule
<hedgeRule label="highlight">
<choice occurs="*">
<ref label="name"/>
<ref label="place"/>
</choice>
</elementRule>
-
Referencing the rule
<elementRule role="paragraph">
<mixed>
<hedgeRef label="highlight" occurs="*"/>
</mixed>
</elementRule>
-
hedgeRefs and refs
You can use a
hedgeRef
element anywhere you would use a ref
element.
Previous Page <
TOC
> Next Page