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

RE: Validating schema vs. non validating schema


weight uom
Hello,

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?

Regards,

Patrice

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


Patrice,

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">
  <simpleContent>
    <extension base="double">
      <attribute name="uom">
        <simpleType>
          <restriction>
            <enumeration value="m"/>
            <enumeration value="mm"/>
    etc.

The weightQuantityType can also have a restricted set of values.

I definitely prefer that you stick to the uom notation.

John

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

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.