OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Validating schema vs. non validating schema

[ Lists Home | Date Index | Thread 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?



-----Original Message-----
From: John Bobbitt [mailto:bobbitt@posc.org]
Sent: Tuesday, December 11, 2001 7:27 PM
To: jim.theriot@posc.org; Patrice.Krakow@SCA.com
Subject: Re: FW: [xml-dev] Validating schema vs. non validating schema


We prefer

<length uom="...">
<weight uom="...">

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
<complexType name="lengthQuantityType">
    <extension base="double">
      <attribute name="uom">
            <enumeration value="m"/>
            <enumeration value="mm"/>

The weightQuantityType can also have a restricted set of values.

I definitely prefer that you stick to the uom notation.


J C Theriot wrote:
> John,
> ... go for it ...
> Jim
> -----Original Message-----
> From: Krakow Patrice [mailto:Patrice.Krakow@SCA.com]
> Sent: Tuesday, December 11, 2001 10:41 AM
> To: xml-dev@lists.xml.org
> 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,
> Regards,
> 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: bobbitt@posc.org
I don't know the secret of success. But I do know the secret of failure is 
trying to please everyone.   ---Bill Cosby


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS