Lists Home |
Date Index |
John, thanks for your reply ;-)
The background of my question is the design of our internal (pivot) XML
Schemas. We currently have a discussion on the level of validation these XML
Schemas should have. Personally, I am convince that we have to take
advantage of the validation at the XML Schema level, not to put "business
rules", but to put "common business rules".
The rule that a measurement must be expressed with a consistent unit of
measure is, I think, a good example of such a "common business rules".
In various standard XML dialect (expressed with XDR Schema or DTD), I was
disappointed that such a validation was not present: a common uom attribute
was defined mixing the different types of unit of measure. My proposition
(length-uom, weight-uom, ... instead of uom) was though to be put such a
validation using XDR Schema or DTD.
Now, with your mail, it seems that new specification of XML Schema allows to
define different enumeration for an attribute depending on the element where
this attribute is present, is it right ??? And yes, in this is the case, I
can understand when you said "I definitely prefer that you stick to the uom
notation.". Nevertheless, are we agree that the "uom" notation is not a good
idea in the context of a validation through XDR Schema or DTD?
From: John Bobbitt [mailto:email@example.com]
Sent: Tuesday, December 11, 2001 7:27 PM
To: firstname.lastname@example.org; Patrice.Krakow@SCA.com
Subject: Re: FW: [xml-dev] Validating schema vs. non validating schema
But you can restrict each uom differently. They can be
<element name="length" type="lengthQuantityType"/>
<element name="weight" type="weightQuantityType"/>
where (for example) lengthQuantityType is
The weightQuantityType can also have a restricted set of values.
I definitely prefer that you stick to the uom notation.
J C Theriot wrote:
> ... go for it ...
> -----Original Message-----
> From: Krakow Patrice [mailto:Patrice.Krakow@SCA.com]
> Sent: Tuesday, December 11, 2001 10:41 AM
> To: email@example.com
> Subject: [xml-dev] Validating schema vs. non validating schema
> Hi All,
> What do you prefer?
> <length uom="...">
> <weight uom="...">
> where uom=m|mm|kg|g
> <length length-uom="...">
> <weight weight-uom="...">
> where length-uom=m|mm and weight-uom=kg|g
> Thanks for your comments,
> Patrice Krakow
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
John I. Bobbitt
Energy eStandards Web: http://www.energyestandards.org
Off:(713)267-5174 Web: http://www.posc.org
Fax:(713)784-9219 email: firstname.lastname@example.org
I don't know the secret of success. But I do know the secret of failure is
trying to please everyone. ---Bill Cosby