|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: modeling, validating and documenting an xml grammar
From: "Rich Salz" <rsalz@d...>
> 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 [expletive deleted]."
>
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








