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

RE: fundamental facets - inquiry from the XML SchemaWorking G

  • To: "Jonathan Robie" <jonathan.robie@d...>,"Eric van der Vlist" <vdv@d...>
  • Subject: RE: fundamental facets - inquiry from the XML SchemaWorking Group
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Fri, 10 Oct 2003 09:02:44 -0700
  • Cc: <xml-dev@l...>
  • Thread-index: AcOPRjOUUjfu1a7+RuiBtpq6NRpI9AAAOYcR
  • Thread-topic: fundamental facets - inquiry from the XML SchemaWorking Group

advantages of facets
>Actually, this is one of the real advantages of the facets approach taken
by XML Schema. 
 
This idea is still problematic  when it comes to implementing operations on these types. For example, casts can become very expensive such as 
 
(5 + 19) cast as my:evenNumber
 
or 
 
"2192-1293" cast as my:zipCode 
 
However at least it is possible in a well-defined manner to operate on user defined types. 

________________________________

From: Jonathan Robie [mailto:jonathan.robie@d...]
Sent: Fri 10/10/2003 8:49 AM
To: Eric van der Vlist; Dare Obasanjo
Cc: xml-dev@l...
Subject: RE:  fundamental facets - inquiry from the XML SchemaWorking Group



Eric and Dare are both right here, depending on your perspective.

As I understand Eric, he wants to use the data types of the programming
language he uses or of the databases in which data is stored. Because these
systems already have well-defined types, any mismatch between their types
and the types of XML Schema get in the way.

As I understand Dare, he wants to be able to do "Native XML Programming",
using systems base directly on the built-in types of XML Schema. Most
databases and programming languages have a set of built-in types, and many
optimizations are based on knowledge of these types.

Actually, this is one of the real advantages of the facets approach taken
by XML Schema. You can define new types based on existing ones - if you
need an integer that can only be a certain size, you use facets to express
that. Any system that can handle the more general type can also handle the
specific one. But what if you want to specify new types that are not
derived from existing ones?

Many databases allow new types to be created with 'data blades' or
'extenders' or whatever. As Dare points out, this requires specification of
the operations on these types - how do you compare two instances? how do
you serialize an instance? how do you construct an instance from a
serialized format? I'm not convinced that MathML is the right language for
doing this, but such a language could be devised. However, the problem
turtles. The specification of these operations needs to be done in terms of
SOMETHING, which brings us back to the set of types known in the language
used for specifying the operations.

So what advantage would that have over doing it directly in W3C XML Schema?

Jonathan




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.