[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: modeling, validating and documenting an xml grammar


zip zodes
[Jonathan Borden]

> Joe English wrote:
>
> > And I'm somewhat suspicious of the above examples, too.
> > I have a friend with eight grandparents.  Some people have
> > six or more digits per hand.  Polysomy is not at all infrequent.
>
> Right. Sometimes we want our models to capture every instance of foo...
> other times we want to flag instances for special attention.
Chromosomes=46
> would be a fine cardinality for "humans with normal chromsome number" etc.
>

I think it is hardly ever needed (or justified) to put these kind of
contraints into the schema itself.  How many times has a designer put a
constraint of NOT NULL on a database column, only to find it filled with
values like "-999", because in a practical world, you have to enter the
record even if the data is not in ideal shape?  We had 7-digit phone
numbers, now we have 10-digit.  Most of us in the US do not know our
extended zip zodes, so  they better not be mandatory.

Just because a student is not supposed to be taking more than 7 classes does
not seem to me to be a good reason for forcing the XML file describing one's
actual class schedule to contain a max of seven (or eight) <class> elements.

Now if the xml document were going to eventually cause a pre-formatted form
to be printed, you would need to restrict the number of records, I suppose,
to avoid overflowing the form.  But I am sure that these kind of cases fall
way outside any 80-20 breakdown or even - I would bet - a 90-10 split.

Even in a case like that, somewhere you or software would have to decide
what to do in case there were more records than the form could hold.  That
cannot be done with the information in the schema anyway.  So why bother
putting the constraint into the schema in the first case?  It doesn't really
solve the problem it is there to handle.

Cheers,

Tom P



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.