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] RE: Schema vs Schema-free

[ Lists Home | Date Index | Thread Index ]

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@wyman.us]
Sent: Wed 4/14/2004 10:46 AM
To: 'Rich Salz'
Cc: 'Elliotte Rusty Harold'; 'xml-dev'
Subject: RE: [xml-dev] 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>







 

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

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