Lists Home |
Date Index |
- To: "Jeff Lowery" <email@example.com>,"Xml-Dev (E-mail)" <firstname.lastname@example.org>
- Subject: RE: [xml-dev] A Data Model for Strongly Typed XML
- From: "Dare Obasanjo" <email@example.com>
- Date: Thu, 19 Dec 2002 12:43:05 -0800
- Thread-index: AcKnkRHHHQmE6Ji2Rg+PCf6PZhn9GgADDQpT
- Thread-topic: [xml-dev] A Data Model for Strongly Typed XML
This is covered in the article and I quote
"The ability to identify the datatype of nodes via the namespace URI and a local name (i.e. an expanded name) provides a loosely coupled mechanism for supporting W3C XML Schema datatypes and potentially any other type system where individual types can be identified by an expanded name"
"The primary upgrade to nodes in XQuery and XPath 2.0 from XPath 1.0 is that they can now have a typed value <http://www.w3.org/TR/2002/WD-query-datamodel-20021115/#typed-value> and a type <http://www.w3.org/TR/2002/WD-query-datamodel-20021115/#types> . The typed value of a node is a sequence of zero or more atomic values <http://www.w3.org/TR/2002/WD-query-datamodel-20021115/#AtomicValue> obtained from the content of the node; its type is a named type identified by an expanded name."
Putting these two together then the only couplings to the W3C XML Schema recommendation is that the current definition for atomic value specifies that it must be a W3C XML Schema type. Ignoring this one shortsighted rule, allows you to use the XQuery data model as a strongly typed XML data model that reflects any type system with named types be it SQL, Java, C#, XDR, or XSD.
There is the problem of how the data model reflects the strong afinity to XSD inherent in the current XQuery syntax and formal semantics working drafts. An example of this is Issue 91 of the data model which points out that just the name of a type is not enough to get all the type information about a schema validated item because XSD places some type information (i.e. content model) on the ttype definition and some on the element declaration (i.e. nillability and substitution groups). The most tightly coupled way to model this which I hope the working group doesn't do is to add accessors for nillability and substitution groups to the element nodes in the data model. A more loosely coupled way to model this is to add the notion of type id or context to the data model since this is more generally applicable. Thus a typed element node has a typed value, a named type and a type id /schema context which in the default case is a NUN for XSD support.
I've made these comments to our standards reps and they have promised to pass them along to the working group.
From: Jeff Lowery [mailto:firstname.lastname@example.org]
Sent: Thu 12/19/2002 11:00 AM
To: Xml-Dev (E-mail)
Subject: [xml-dev] A Data Model for Strongly Typed XML
From Dare's article:
"The XQuery and XPath 2.0 data model presents itself as a viable data model
for processing XML in strongly typed usage scenarios. The loose coupling to
the W3C XML Schema type system is especially beneficial because it both
provides an interoperable set of types, yet does not limit one to solely
Did I miss something? How is the XQ and XP data model loosely coupled to XML
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