M
mat
I would like to create a schema for a document where I would have
complex elements of the sort
<entry type='initial'>
<reason>...</reason>
<t>...</t>
</entry>
<entry type='other'>
<t>...</t>
</entry>
i.e. entry elements with attribute type='other' must not contain a
<reason> element.
two questions: is it good practice to have different models of the
<entry> element contigent on the type attribute? Is it better to use
<initEntry> and <otherEntry> elements?
If the latter is advised then the only problem I forsee is that I
would have to put the elements in an <entries> container, which I
would then further like to have an attribute type='complete' or
'pratial' contigent on whether an <initEntry> element was present.
If the former is OK, can the contigency be encoded in a schema? From
what I've read co-occurence and structure is a problem in many schema
languages.
Many thanks
complex elements of the sort
<entry type='initial'>
<reason>...</reason>
<t>...</t>
</entry>
<entry type='other'>
<t>...</t>
</entry>
i.e. entry elements with attribute type='other' must not contain a
<reason> element.
two questions: is it good practice to have different models of the
<entry> element contigent on the type attribute? Is it better to use
<initEntry> and <otherEntry> elements?
If the latter is advised then the only problem I forsee is that I
would have to put the elements in an <entries> container, which I
would then further like to have an attribute type='complete' or
'pratial' contigent on whether an <initEntry> element was present.
If the former is OK, can the contigency be encoded in a schema? From
what I've read co-occurence and structure is a problem in many schema
languages.
Many thanks