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

RE: RE: Schema vs Schema-free

  • To: <bob@w...>,"Rich Salz" <rsalz@d...>
  • Subject: RE: RE: Schema vs Schema-free
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Wed, 14 Apr 2004 11:11:54 -0700
  • Cc: "Elliotte Rusty Harold" <elharo@m...>,"xml-dev" <xml-dev@l...>
  • Thread-index: AcQiSSG8uxc+C96TQymSuSeeNkHEQAAAcua5
  • Thread-topic: RE: Schema vs Schema-free

schema free
W3C XML Schema makes a mess of canonical forms and lexical values. Experience has taught me that you can't store typed values (i.e. canonical forms) and use XML Schema as the basis of your type system. A very simple example is what happens if you have a type with a pattern restriction that restricts away the canonical form. For example something like 
 
<xs:simpleType name="precedingzeronumeric">
 <xs:restriction base="xs:integer">
  <xs:pattern value="0[0-9]*" />
 </xs:restriction>
</xs:simpleType>
 
I fail to see how you can claim to fully support using XML Schema to specify types and not have to store lexical representations instead of 'optimized' numeric values. 
 
-- 
PITHY WORDS OF WISDOM
Blessed are the meek for they shall inherit the Earth, minus 40% inheritance tax. 

________________________________

From: Bob Wyman [mailto:bob@w...]
Sent: Wed 4/14/2004 10:46 AM
To: 'Rich Salz'
Cc: 'Elliotte Rusty Harold'; 'xml-dev'
Subject: RE:  RE: Schema vs Schema-free



Rich Salz wrote:
> You *can't* express it as a schema numeric type
> because the document creator must have freedom
> to specify the number of trailing zero's, not
> the schema.
        I agree! The user should be able to "specify the number of
trailing zero's". But, XML Schema doesn't support that. What is needed
is something like the following:

<float preserve_trailing="yes">1.00000</float>
or
<float significant_digits="4">1.0000</float>
        Such syntax would allow the user to "specify" the number of
trailing zeros. However, in the absense of such a method of
specification, I can't imagine how it would be useful for anyone to
add optional zeros in an element which is formally defined to have a
canonical form that eliminates the trailing zeros. While it may be
satisfying to the document creator, and while the zeros may have
meaning to that creator, the creator can't expect anyone who reads the
schema to attribute the same meaning to those zeros. So, fine, if
you're writing data that only you will read, then do whatever you
want. But, if you're writing data that others will read, then if you
wish to be understood, you must follow the rules of the schema
language you're using.

> No, it's a mismatch between the data-type folks
> and the markup-type folks.
        Not so. It doesn't matter if you are "data" or "markup." If
you don't specify what your data means then your data has no meaning.

> And the data folks don't seem to realize that the
> current crop of security functions requires them
> think like markup-type folks on the wire.
        Not so. The security systems will all have a means to define a
canonicalization function. Clearly, when you pass a signed document,
you need to ensure that the canonical form is passed or can be
reconstructed. This has nothing to do with the present issue.

                bob wyman


-----------------------------------------------------------------
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://www.oasis-open.org/mlmanage/index.php>




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.