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

Re: James Clark on Schema

Subject: Re: James Clark on Schema
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 5 Jun 2002 22:00:40 +0100
james clark carlisle
> * It is unreasonable to expect a W3C specification (such as XQuery) to 
> adopt as its basis a data model not under control of the W3C, when there is 
> a W3C data model that is acceptable.
> ...
>  To hope that the various Working Groups will "see 
> the light" and choose to use a schema-like facility defined outside the W3C 
> is highly unlikely.  

I have never argued that XPath2 should be based on Relax NG, what I have
argued is that it shouldn't be based so closely on W3C Schema. In
particular, concentrating for now on the simple types rather than
complex types (element structure) it should not have accumulated
the mass of numeric, date and string types. They make no sense to be
hardwired into a query language aimed at generic XML documents.
No fixed set of random types will ever be of any real use in an XML
context as most of the documents are generated for reasons unconnected
with XQuery/XPath. An XML Query language has to be able to cope with
whatever's out there it can't just invent a world view and pretend that
all documents will conform.  Having a float and an integer type (already
an extension to XPath 1) makes sense; having byte and friends is just
slavish devotion to the schema spec. Dropping them does not mean
abandoning W3C and following James into the uncharted waters of ISO. It
just means making XPath usable again. A small section of a revised
XPath2 document mapping the primitive W3C schema types into XPath would
be all that's required.

If you want an integer less than 0 and 2^8  you should be able to
express that in the same way as an integer between 0 and 12, 
why have a special "byte type". At first sight it doesn't appear too bad,
as if you don't need it don't use it and if you do need it it might save
a keystroke or two, but the net effect of having dozens of pointless
primitive types in the language is that the language has an exponential
explosion in the complexity of its casting rules and functions, and is
impossible to learn: I challenge anyone to list the full set of primitive
XPath2 types off the top of their head, without reference to the spec
(F&O or schema).

Support for complex types also massively complicates the specification
for little to no benefit. If you want to find all children elements that
have a parent parent, it is far more natural to use XPath parent/child I
see no occasions when it would be more natural (In an Xpath context) to
define a schema type for that construct and and then query on the
type. This comment is not particularly against W3C Schema it is a
comment on Schema in general with respect to XPath. (Schema are fine for
their main use of constraining authoring and checking that a document is
correctly authored. But querying is something different)

A schema type is basically just a named content model in a DTD (if you
view DTDs as a schema language with non-XML syntax) As far as I can
tell no one ever asked in an XPath or XSLT context to be able to query 
by a particular content model without having to specify the element
name When is this supposed to be useful? (None of the XQuery use cases
show any use for this facility)

David 


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.