Given:
<!ELEMENT diagnostic-tracks (hookup*, (%step;)*, ((diagnostic-track-automated, diagnostic-track-manual) | diagnostic-track-automated | diagnostic-track-manual), evaluate*, disconnect*)>
and
<!ELEMENT diagnostic-track-automated (((%step;) | diagnostic_group)*, diagnostic_group, evaluate*)>
<!ENTITY % step "((%figtab;) | step1 | step1-alt)">
<!ENTITY % figtab "figure | figure-alt | table | table-alt | lubetab">
I am getting non-deterministic content model errors that diagnostic-track-automated and diagnostic_group could simultaneously match two or more tokens.
I changed to:
<!ELEMENT diagnostic-tracks (hookup*, (%step;)*, diagnostic-track-automated?, diagnostic-track-manual?, evaluate*, disconnect*)>
and
<!ELEMENT diagnostic-track-automated (((%step;) | diagnostic_group+)*, evaluate*)>
which eliminated the error messages, but I don't think my changes, especially for diagnostic-track-automated, are correct.
I appreciate any suggestions for improvement.
I think what you came up with for
diagnostic-tracksappears to be what you were trying to accomplish with the original non-deterministic model:However I think the fix for
diagnostic-track-automatedis not what you originally intended.What you propose now is:
What I think you meant was:
Which would be:
Here's a full/testable example...
DTD (so.dtd)
XML