i need an element with the characteristics
<!ELEMENT section ((comment*)|definition|(comment*))>
but that is ambiguous, i get the next message in visual studio
Multiple definition of element 'comment' causes the content model to become ambiguous. A content model must be formed such that during validation of an element information item sequence, the pa开发者_如何学运维rticle contained directly, indirectly or implicitly therein with which to attempt to validate each item in the sequence in turn can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence.
So how can i write correctly that? the correct structure is one definition surrounded by possibles comments elements.
If I understand correctly, you are trying to have zero or more comment elements followed by a definition element followed by zero or more comments.
The model you have now is ambiguous because it specifies zero or more comments OR a definition OR zero or more comments. The change you need is pretty simple (assuming I understand):
<!ELEMENT section (comment*, definition, comment*) >
Basically, the |
character means alternates and the ,
means sequence.
精彩评论