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

the essence of type was: Re: W3C's five new XQuery/Xpath2 wor

  • To: "Jonathan Robie" <jonathan.robie@s...>, <xml-dev@l...>, "Champion, Mike" <Mike.Champion@S...>
  • Subject: the essence of type was: Re: W3C's five new XQuery/Xpath2 working drafts - Still missing Updates
  • From: "Jonathan Borden" <jborden@m...>
  • Date: Wed, 2 Jan 2002 10:35:48 -0500
  • References: <5.1.0.14.0.20011227082828.02cef1a0@s...>

xpath2 relaxng
Jonathan Robie wrote:


> At 05:20 PM 12/26/2001 -0700, Champion, Mike wrote:
>
> >As the "T-word" thread here a few months ago
> >http://lists.xml.org/archives/xml-dev/200108/msg01042.html indicated,
"type"
> >is a bit of a dirty word in some perfectly respectable circles. I am
> >struggling with the concepts and terminology here (I took a stab at this
in
> >my post http://lists.xml.org/archives/xml-dev/200112/msg00356.html and
> >didn't get much followup).  The various distinctions among classes,
types,
> >and domains make my head hurt, and I don't claim to have any deep
insights.
>
...
>
> We haven't been very systematic about types in the XML world. As a result,
> everyone has their own conception of types in XML, and it gets
increasingly
> difficult to say anything about types as each word we might want to use
> gets reserved for some purpose in some community. Most people confuse the
> XML types with types in their favorite system - eg relational or object
> oriented. The RDF and XML communities also think of types somewhat
> differently. So the whole discussion of types in XML has been confusing
and
> frustrating for many people, and different communities have had a hard
time
> communicating because of differing fundamental assumptions about how types
> work. I think we need greater clarity on types in XML, and I hope this
will
> be one result of the XML Query work. I personally think that RELAX-NG and
> the XML Schema Formal Description have also contributed to clarity in
these
> areas.

I agree.

When everyone has a different idea of what a type is, then the issue does
get very confusing and we refer to types as "t***". It is difficult to have
a rational discussion when the meanings of words that we frequently use
become overloaded with similar but slightly different meanings. I completely
agree that the common usage of the term "type" is as in object oriented
programming, and I also agree with the sentiment that object oriented
programming and XML are largely orthogonal (though complimentary) in
purpose.

Why not consider a type as a regular expression or pattern. An XML type is
simply a label attached to a unicode string that is within an XML document.
As Murata Makoto's talk at this past Extreme Markup Technologies showed,
DTDs, W3C XML Schema 1.0, and RELAXNG define forms of grammars, essentially
forms of regular expressions that can be used to label a piece of XML.

What then is the essential difference between RELAXNG patterns and XML
Schema types (these two have been positioned as opposing concepts)?

To me, the difference is _simply_ that XML Schema types define an explicit
derivation framework (restriction/extension) where RELAXNG patterns _appear_
less hierarchical yet in reality one can derive certain patterns from other
patterns.

So a RELAXNG pattern name can be simply used in the XPath "element of type"
expression, or imagine a function which returns a type from a DTD
expression: dtdType("(foo,bar,baz)+")

If we start looking at _types_ as string based or _XML types_ (e.g. regular
expressions) rather than types commonly associated with binary programming
languages, then we can stop refering to types as t***. Of course YMMMV, as
always.

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.