Menu

#697 sequence of declaration info is lost when making an ODD

AMBER
open
None
5(default)
2014-11-19
2014-10-31
Lou Burnard
No

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.

1 Attachments

Discussion

  • Sebastian Rahtz

    Sebastian Rahtz - 2014-10-31

    hmm. can you try again? I have removed the <xsl:sort> from oddbyexample which may have been screwing this up.

     
  • Lou Burnard

    Lou Burnard - 2014-10-31

    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
  • Lou Burnard

    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)

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2014-10-31

    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.

     
  • Lou Burnard

    Lou Burnard - 2014-11-03

    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...

     
  • Lou Burnard

    Lou Burnard - 2014-11-03
     
  • James Cummings

    James Cummings - 2014-11-19
    • assigned_to: Lou Burnard
     
  • James Cummings

    James Cummings - 2014-11-19

    Assigning to Lou the progress, reporting back to Council if fix is not straightforward.