In further experimentation, Syd and I have uncovered a rather nasty bug in the way @minOccurs and @maxOccurs interact. See https://github.com/TEIC/TEI/issues/1544 How does this work in XSD I wonder? On 29/11/16 14:51, Syd Bauman wrote:
Discussion of <abx> content ---------- -- ----- ------- The ODD defines <abx> as follows. | <elementSpec ident="abx"> | <desc>A block with at least 2 titles</desc> | <content> | <elementRef key="title" minOccurs="2"/> | </content> | </elementSpec> It seems that from the comment you believe this should generate ( title, title+ ) or ( title, title, title* ) That is, you (quite reasonably) presume that if @minOccurs is > 1, @maxOccurs should default to "unbounded".
But the Guidelines seem pretty clear to me: the default of @maxOccurs is '1', period. Thus the specification above has a bit of a contradiction (min of 2, max of 1), which I decided to resolve in favor of the specified @minOccurs rather than the defaulted @maxOccurs. Thus I produce ( title, title )
I do not know off the top of my head what XSD does in this case, or what pre-PureODD would have done with a <datatype minOccurs="2">.
You sent this directly to me (not the Council list), so I replied directly to you. But I think the @maxOccurs default issue needs to be brought to the group.
Here's my little test file, a script to run it, and the outputs I get, all zipped up for your pleasure in one (I hope) self-explanatory zip.
The main reason I was getting different results from you, I think. is because I am an eejut when it comes to handling branches. You and me both, bub.