Stylesheets
Stylesheets copied to clipboard
ODD to DTD problems #2
A DTD must contain 5 parameter entities for each model class defined, with names consisting of the model class name suffixed by each of the "methods" sequence, alternate etc. The declarations look like this
<!ENTITY % testClass "x |y |z">
<!ENTITY % testClass_sequence "x, y, z">
<!ENTITY % testClass_sequenceOptional "x?, y?, z?">
<!ENTITY % testClass_sequenceOptionalRepeatable "x*, y*, z*">
<!ENTITY % testClass_sequenceRepeatable "x+, y+, z+">
However, an ODD declaration like this
<elementSpec ident="testP3">
<content>
<classRef key="testClass" expand="alternate" except="z"/>
</content>
</elementSpec>
generates DTD like this
<!ELEMENT testP3 (((%testClass_alternate;)))>
which is wrong because there is no such parameter entity, independently of being inadequate because it ignores the @except attribute.
See further the attached test file testClass.zip