I've been following this quietly, figuring/hoping you two were always on the verge of solving this and know a lot more than me. I've not a clue on the XSD question, but since you called for aggressive commenting, I’ll just say my read of this favors option d): IF @minOccurs is specified THEN @maxOccurs must be specified too. It seems the most flexible and adaptable solution, since you can set minOccurs as some specific value and maxOccurs as unbounded as needed. Or you can tightly control things and set minOccurs to zero and maxOccurs to 1. Option e) sets a couple of conditions for the default value of maxOccurs, and does nothing with minOccurs: Is that an issue in itself? (Is there currently a default on @minOccurs?) Sorry if you’ve covered this already—don’t answer if not helpful. Elisa
On Nov 29, 2016, at 11:06 PM, Syd Bauman
wrote: ALL HANDS ON DECK
Sorry for yelling, guys, but we have a ticket flagged as high priority, release-blocking, and needs discussion with less than 1 week to go before a planned release.
I think people should be commenting on this ticket pretty aggressively. It is https://github.com/TEIC/TEI/issues/1544.
Here is a quick (well, quick for me) summary:
* The documented default value of @minOccurs and @maxOccurs is '1'; that does not make sense for @maxOccurs, because then <datatype minOccurs="3"> ... has a @maxOccurs (of "1") that is less than @minOccurs.
* We don't want to leave it as is, as the code that handles @minOccurs and @maxOccurs is quite broken (in 'dev') and a little broken (in 'sybd-occurs2'). So we need to know what the fixed code should do.
* There are lots of possible solutions. The two that seem most reasonable at the moment are:
* (d) establish a rule that IF @minOccurs is specified THEN @maxOccurs must be specified, too
* (e) remove the <defaultVal> from the definition of @maxOccurs and add a <remarks> that says something like "The default value of @maxOccurs is "unbounded" if @minOccurs is 2 or greater; otherwise the default value of @maxOccurs is 1.".
* Whether we choose (d) or (e) or something else, there is work to be done.
* We could, I think, just back out to as bad as things are in 3.0.0, but (as mentioned above) that seems a real shame.
Can anyone answer Lou's question below? If no one knows off top of head, someone should research it. (I can't check right now, as for reasons I don't understand I cannot connect to the W3C website from home.)
P.S. Martin Holmes is chuckling an "I told you so" about the dangers of default values right now.
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? -- tei-council mailing list tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
PLEASE NOTE: postings to this list are publicly archived