Consider model.physDescPart_sequenceOptional. In TEI_All, this has the declaration
objectDesc?,
handDesc?,
typeDesc?,
scriptDesc?,
musicNotation?,
decoDesc?,
additions?,
bindingDesc?,
sealDesc?,
accMat?
i.e., the members of the class are listed in a specific order, which is that of their declaration in P5.
Now see what happens when you delete some of them from your ODD (whether by not prouiding an <elementRef> for them, by using @exclude, or by using @include)
The declaration for that same pattern in your generated schema now reorders them alphabetically, like this:
model.physDescPart_sequenceOptional =
accMat?,
additions?,
bindingDesc?,
decoDesc?,
handDesc?,
objectDesc?,
typeDesc?
so a document which is ualid against TEI-ALL will not be ualid against your generated schema.
This cannot be right, but I am not sure what should be done to fix it.
hmm. can you try again? I have removed the
<xsl:sort>
from oddbyexample which may have been screwing this up.I dont think this is anything to do with oddbyexample: certainly, changing the order of declarations in the ODD file generated by it has no effect on the problem. Unsurprisingly, since they are now <elementRef>s rather than <elementSpec>s
Last edit: Lou Burnard 2014-10-31
FWIW, the Guidelines explicitly state "The ‘sequence’ in which members of a class appear in a content model when one of the sequence options is used is that in which the elements are declared." (end of http://www.tei-c.org/release/doc/tei-p5-doc/en/html/TD.html#TDCLA)
It's all fairly unsustainable, isn't it, the idea of order of declaration. We should have seen this coming.
I don't know what to do to fix it either.
Further examination shows that this is not as bad as I thought: the problem occurs ONLY if your ODD uses just <elementRef>s to specify which elements are required. If you have a moduleRef in there, you are safe. See attached testfiles.
However, since oddbyexample generates its results as elementRefs the problem has not gone away...
Assigning to Lou the progress, reporting back to Council if fix is not straightforward.