W3C home > Mailing lists > Public > www-archive@w3.org > December 2001

Re: UPDATE: datatypes

From: Peter F. Patel-Schneider <pfps@research.bell-labs.com>
Date: Mon, 17 Dec 2001 16:55:46 -0500
To: connolly@w3.org
Cc: www-archive@w3.org, fps@research.bell-labs.com, phayes@ai.uwf.edu, jjc@hplb.hpl.hp.com, Frank.van.Harmelen@cs.vu.nl, horrocks@cs.man.ac.uk, mdean@bbn.com, lynn.stein@olin.edup
Message-Id: <20011217165546G.pfps@research.bell-labs.com>
From: Dan Connolly <connolly@w3.org>
Subject: Re: UPDATE: datatypes
Date: 17 Dec 2001 15:07:32 -0600

> On Mon, 2001-12-17 at 12:46, Peter F. Patel-Schneider wrote:
> > From: Dan Connolly <connolly@w3.org>
> > Subject: Re: UPDATE: datatypes
> > Date: 17 Dec 2001 11:35:57 -0600
> > 
> > > On Mon, 2001-12-17 at 11:19, Peter F. Patel-Schneider wrote:
> > > > 		Datatypes in SWOL
> > > > 
> > > > 	Peter F. Patel-Schneider
> > > > 	Bell Labs Research
> > > > 	(17 December 2001)
> > > > 
> > > > 
> > > > The semantics and syntax documents that I sent out contain a treatment of
> > > > datatypes that has the following features.
> > > > 
> > > > 1/ Local datatyping syntax (and verification) can be handled by XML Schema
> > > >    verification.  In particular,
> > > >    
> > > >    <Person rdf:about="John">
> > > >      <age xsi:type="xsd:int">10</age>
> > > >    </Person>
> > > > 
> > > >    results in the age of John being the integer 10.
> > > 
> > > Where is the specification of that syntax?
> > 
> > XML Schema Part 1: Structures, http://www.w3.org/TR/xmlschema-0/, Section
> > 2.6.1 xsi:type, is, I believe, the primary specification of that syntax.
> > The syntax is used extensively in the XML Schema documents, including XML
> > Schema Part 0: Primer, http://www.w3.org/TR/xmlschema-0/, and, XML Schema
> > Part 2: Datatypes, http://www.w3.org/TR/xmlschema-2/.
> 
> Hmm... I'm familiar with that document, but I don't quite
> see how it applies; I don't see what schema is to be used
> for <Person>, rdf:about, etc.
> 
> Perhaps it's explained elsewhere...

From http://www.w3.org/TR/xmlschema-1/, Section 2.6 and 2.6.1.

[[[
XML Schema: Structures also defines several attributes for direct
use in any XML documents.  [...]

2.6.1 xsi:type
The Simple Type Definition (2.2.1.2) or Complex Type Definition (2.2.1.3)
used in validation of an element is usually determined by reference to the
appropriate schema components. An element information item in an instance
may, however, explicitly assert its type using the attribute xsi:type.
The value of this attribute is a QName;  see QName Interpretation
(3.15.3) for the means by which the QName is associated with a type
definition. 
]]]

> > > It doesn't mean what you suggest it means when parsed as RDF.
> > 
> > I'm not saying that it does mean *anything* as parsed by a current RDF/XML
> > parsed.  I'm saying that it does mean something in
> > 
> > 	``The semantics and syntax documents that I sent out''
> 
> It's traditional to cite sources by URI.
> 
> I presume you mean this one:
> http://lists.w3.org/Archives/Public/www-webont-wg/2001Dec/att-0123/02-syntax-data-model.text
> 
> which, in turn, cites
> 
> XQuery 1.0 and XPath 2.0 Data Model (W3C Working Draft 7 June 2001)
> http://www.w3.org/TR/2001/WD-query-datamodel-2001-6-7/
> 
> I haven't read them in detail, but from a quick scan,
> it seems to suggest that all of XML Schema becomes
> necessary to parse this language. That doesn't seem
> cost-effective.
> 
> RDF syntax is constrained so that consumers can
> parse it without a schema. This (a) simplifies
> implementations and (b) avoids a lot of trust
> issues (do I have the right schema?) but
> at the cost of (c) the syntax is somewhat awkwardly
> constrained.
> 
> If we're willing to bite the bullet on
> (a) and (b), we might as well get something
> prettier (c) while we're at it.

There are several options open for providing XML Schema datatypes for the
semantic web.  It is, of course, possible to depend on a full
implementation of XML Schema.  I strongly prefer this approach, because, as
far as I can tell, XML Schema is the W3C-recommended way of incorporating
typed data in WWW documents and so there should (soon) be available a
number of performance implementations of the full XML Schema
recommendation.   Further, XML Schema provides mechanisms for putting
datatyping information directly into XML documents, so if one desired one
would not have to depend on the XML Schema mechanisms for determining the
right schema.

However, it is also possible that one might want to (for now) build one's
own datatyping implementation.  In this case I strongly prefer going with
an input syntax that is compatible with XML Schema, namely the use of
xsi:type.  One could even restrict the XML Schema datatypes one uses to
some select built-in datatypes, resulting in a quite easy to implement, if
limited, datatyping scheme that can be upgraded to full XML Schema.

> > [...]
> > 
> > > > 1/ Determine if you disagree with the following:
> > > >    - The above is a reasonable way of handling datatypes in SWOL.
> > > 
> > > nope; it's very much more complex, syntacitcally and
> > > in the model theory, than other alternatives
> > > under discussion in the RDF Core WG.
> > 
> > Objection noted.
> > 
> > The proposal in my documents is more semantically complex than others
> > simply because it handles data values that do not have a locally-specified
> > lexical-to-value mapping.  If one were to move to an environment where this
> > mapping either had to be locally given for all literals or where the
> > mapping was unambiguous overal then there would be little difference in the
> > semantic complexity.
> 
> 
> Hmm... I don't think I understand that. What does
> "locally specified lexical-to-value mapping" mean?

I believe that this term, or variants thereof, has been used in the RDF
Core WG group discusssions on datatyping.  In any case, it means that
literals have datatyping information given syntactically close to them in
the input document, either by means of xsi:type or some other mechanism.
Some of the RDF Core WG proposals for datatyping require locally-specified
lexical-to-value mappings, others do not.

[...]

> -- 
> Dan Connolly, W3C http://www.w3.org/People/Connolly/
> 

Peter F. Patel-Schneider
Bell Labs Research
Received on Monday, 17 December 2001 16:56:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:15 GMT