|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: modeling, validating and documenting an xml grammar
[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! 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








