Example:
"an author node must contain in sequence first,
optionally initial, and then last, and somewhere in
between, a homepage is required."
The DSD solution is multiple descriptions and projected contents.
Multiple content descriptions in a constraint
<Content> <Sequence> <Element IDRef="first"/> <Optional><Element IDRef="initial"/></Optional> <Element IDRef="last"/> </Sequence> </Content> <Content> <Element IDRef="homepage"/> </Content> |
If the content sequence is | first.homepage.initial.last.homepage |
then the first content description consumes | first..........initial.last......... |
and the second consumes | ......homepage...................... |
so the sequence is rejected (because the second homepage is not consumed). |
This allows concise specification of mixed ordered and unordered content.