Skip to content

PLODD features for testing the transpiler

Martin Holmes edited this page May 22, 2024 · 6 revisions

Most of the content models below need to be expressed with various combinations of @minOccurs and @maxOccurs (e.g.: unspecified, min=0 max=1, min=0 max=3, min=0 max=unbounded, min=1 max=1, min=1 max=3, min=1 max=unbounded, min=3 max=3, min=3 max=unbounded).

  1. <elementSpec> with empty content
  2. <elementSpec> with content a <sequence> of <elementRef>s
  3. <elementSpec> with content an <alternate> of <elementRef>s
  4. <elementSpec> with content a <sequence> of <alternate>s of <elementRef>s
  5. <elementSpec> with content an <alternate> of <sequences>s of <elementRef>s
  6. <elementSpec>s with an <altIdent>, an @ns, and both
  7. (2)–(5) with <classRef>s instead of <elementRef>s
  8. (2)–(5) with <macroRef>s instead of <elementRef>s
  9. (2)–(5) with combinations of <elementRef>, <classRef>, and <macroRef>
  10. <classSpec> with (1)–(9) (* Should not be necessary because should not contain <content> *)
  11. <macroSpec> with (1)–(9) and <textNode>
  12. <elementSpec> with child <altIdent>, <gloss>, <desc> in various combinations
  13. <elementSpec> membership in a model class
  14. <elementSpec> membership in a model class that is itself is a member of a model class
  15. <elementSpec> membership in an attribute class
  16. <elementSpec> membership in an attribute class that is itself a member of an attribute class
  17. <attList> (both choice and regular) with child <attDef>s
  18. <attList> (both choice and regular) with child <attList>s (both choice and regular)
  19. <attDef> with various different <datatype>s (20–23 could be wrapped into tests for 18 & 19)
  20. <attDef> with various different <datatype>s and a <valList> (closed, semi, and open)
  21. <attDef> with <altIdent>
  22. <attDef> with @ns
  23. NOTE: We think this should only happen at the derivation stage, so not relevant here: <attDef>s that over-ride various parts (datatype, required, value list, <altIdent>) of a definition inherited from a class
  24. <valItem> with <altIdent>
  25. <constraintSpec>s both with and without <sch:rule>. (Question from MDH: are constraintSpecs unchanged from source to PLODD? — SB: Good question. At the moment, I think so (although no constraintSpec with @mode survives to a PLODD, those that survive are unchanged, I think). That said, should probably also drop those that are not scheme="schematron", and no need to keep any children other than <constraint>, right?)
  26. classRef w/o @expand
  27. classRef w/ @expand = alternation, sequence, sequenceOptional, sequenceOptionalRepeatable, sequenceRepeatable
  28. classRef to a base model class (i.e. inheriting members) w/o @expand
  29. classRef to a base model class (i.e. inheriting members) w/ @expand = alternation, sequence, sequenceOptional, sequenceOptionalRepeatable, sequenceRepeatable
  30. schemaSpec with a namespace and all its elements non-tei.