Best Practice advice and schema implementation

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top