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

Re: RE: Schema vs Schema-free (was: RE: XML Binary C


xml schema to binary
- Bob Wyman wrote:

> Perhaps what is required here is the definition of a new facet
> for at least one of these types that would flag the trailing zeros as
> signficant.

You can use a pattern facet on a float, double, or decimal in the same way
you do on a string to enforce this sort of constraint.

- Rich Salz wrote:

> This is wrong.  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.

Where is this specified?

Regards,

Ed Day
Objective Systems, Inc.


----- Original Message -----
From: "Bob Wyman" <bob@w...>
To: "'Rich Salz'" <rsalz@d...>
Cc: "'Elliotte Rusty Harold'" <elharo@m...>; "'xml-dev'"
<xml-dev@l...>
Sent: Wednesday, April 14, 2004 1:03 PM
Subject: RE:  RE: Schema vs Schema-free (was: RE:  XML
Binary Characterization WG public list availabl)


> Rich Salz wrote:
> > Parts of X.fws concern me -- I am thinking of the
> > round-trip from XML for something like <error-rate>.500
> > </error-rate> going to a local number, out via
> > ASN.1/DER as an IEEE float, and back.  Along the way
> > it's all too likely to end up as .5, which will
> > break my digital signature -- and quite rightly,
> > since trailing zero's are semantically significant.
> I must admit that I get a little miffed whenever this kind of
> objection arises. Certainly, there is a real problem being described,
> however, it *isn't* a problem with X.fws or any of the schema-based
> alternatives to XML. Rather, the problem is that the schemas are
> underspecified. If, as you say, trailing zero's are significant, then
> that information should be expressed in the schema. If it was
> expressed in the schema, then any schema based alternative should
> honor the schema and pass along the tailing (or leading) zeros.
> This "problem" that some people attribute to X.fws and similar
> systems is really a problem with XML Schema, RelaxNg, etc. The fact
> that it becomes more obvious when you have a system like X.fws that
> relies on schema's being accurate doesn't change the fact that the
> problem exists even without using something like X.fws. For instance,
> if I (as a coder) see an XML Schema that tells me something is a
> "Float", "Decimal" or "Double", then no one should be surprised if I
> read the XML Schema specification and treat the data as defined there.
> Thus, for doubles, leading and trailing zeros are prohibited. For
> Decimal and Float, leading and tailing zeros are optional but are not
> defined to have meaning if present.
> Perhaps what is required here is the definition of a new facet
> for at least one of these types that would flag the trailing zeros as
> signficant.
> Of course, an alternative is to simply define the type of a
> field to be a string and then constrain it to contain only numeric
> values or some number-like pattern. If this is done, then none of the
> schema-based processors will do anything other than pass the data
> through as it is found in the record.
> In summary: The problem here isn't X.fws, ASN.1, etc... -- the
> problem, if any, is that the Schema language isn't expressive enough
> or that people are using the wrong data types in their schemas. If
> X.fws is used with properly defined, expressive schemas, these
> problems will not arise.
>
> 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.