我想验证以下 XML。分支机构可以没有或有多个经理和/或会计师。他们的顺序是随机的。我尝试过的如下:
<!ELEMENT branch (office, manager*, accountant*)>
但是我遇到了错误,我知道上面的声明是严格的。我怎样才能避免经理和会计的顺序。
XML:
<branch name = "south">
<office>
<addr>St. 32, Downtown</addr>
</office>
<manager>
<username>
knitemorgan
</username>
</manager>
<accountant>
<username>
johnsmith
</username>
</accountant>
<manager>
<username>
jenifer
</username>
</manager>
<accountant>
<username>
fclark
</username>
</accountant>
<branch>
<branch name = "north">
<office>
<addr>St. 328, Downtown</addr>
</office>
<accountant>
<username>
rogerbentley
</username>
</accountant>
<manager>
<username>
wendymaria
</username>
</manager>
<branch>