Re: [xml-dev] modeling, validating and documenting an xml grammar

From
Bob Foster <>
To
Rich Salz <>, "Thomas B. Passin" <>
Date
2003-06-19T03:05:48Z
ID
<214e01c3360f$af60ec80$1401a8c0@snobird>
Thread
Re: [xml-dev] modeling, validating and documenting an xml grammar
From: "Rich Salz" <>
> I am in awe of the hubris of folks who can make such generalizations.
>
> "Trust me, if you try to strictly define your data, then your software
> will suck."
>
> Wow.
>
> Perhaps folks really mean "this is the final straw, making XSD so
> complex that as validation-implementors we cannot stand for it."
> But that is not what they've been saying.

"You don't need to do that," isn't winning you over? ;-}

Going back over the RELAX NG archives, the recorded discussion of
minOccurs/maxOccurs was focused on requirements, not implementation. The
committee apparently couldn't make a strong case for the feature, and "if in
doubt, leave it out" carried the day. Here is a constructive paraphrase:

1) ? * and + meet most needs.

2) When {m,n} is used for other than {0,1}, {1,1}, {0,*} and {1,*}, most
often the numbers are low (as witness most of the examples in this thread)
and the pattern can be easily written out in terms of ? * and +. E.g.,
x{2,3} = x,x,x?.

3) If the need for a large, finite bound arises, it can be satisfied by
adding a Schematron assertion to a RELAX NG schema.

Bob Foster