W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > November 2002

RDFS 'vs' DTDs: types of things, types of xml documents (was Re: RDF vs the rest of the world (fwd)

From: Dan Brickley <danbri@w3.org>
Date: Wed, 6 Nov 2002 15:03:43 -0500 (EST)
To: <w3c-rdfcore-wg@w3.org>, <brian_mcbride@hp.com>
Message-ID: <Pine.LNX.4.30.0211061502090.18473-100000@tux.w3.org>


Just wanted to file this away here, as possible fodder for if/when we
elaborate on RDF's relationship to XML.




---------- Forwarded message ----------
Date: Sat, 21 Sep 2002 04:51:53 -0400 (EDT)
From: Dan Brickley <danbri@w3.org>
To: Ashley Yakeley <ashley@semantic.org>
Cc: Franco Salvetti <Franco.Salvetti@Colorado.EDU>,
     RDF Interest Group <www-rdf-interest@w3.org>
Subject: RDFS 'vs' DTDs: types of things,
     types of xml documents (was Re:  RDF vs the rest of the world
Resent-Date: Sat, 21 Sep 2002 04:51:56 -0400 (EDT)
Resent-From: www-rdf-interest@w3.org



On Fri, 20 Sep 2002, Ashley Yakeley wrote:

>
> At 2002-09-20 18:59, Franco Salvetti wrote:
>
> >The rande/domanin are not constraint anymore,
> > but just way to declare the type of a variable.
>
> The type of a value in RDF is a constraint, isn't it?

The terminology of 'constraint' was confusing.

rdfs:domain and rdfs:range allows one to write down some modest
constraints on the kinds of statements that can be simultaneously true.
For eg., RDFS allows us to note that that something can't be the
xyz:author of something else without also being an xyz:Writer, and without
that 'something else' being some particular xyz:WrittenWork.

So in this sense, it is all about constraints. *But...*

The terminology of 'constraint', however, raises different expectations.

Particularly in the context of XML, people understood the notion of
constraint as working in the DTD tradition, ie. as part of document typing
and validation. A DTDish notion of 'constraint' says a 'FooCorpBiblioDoc'
describes WrittenWorks and the Writers that write them; all <WrittenWork>
elements will ("must"!) contain <author> and <Writer> subelements arranged
in such-and-so way. Traditional XML DTDs allow you to figure out whether
or not some specific XML document is a member of some category of XML
documents, by comparing its contents to the rules/constraints listed in
the DTD. The DTD is thought of as listing the membership constraints for a
class of document.

There's a subtle difference, which is why I prefer not to talk about RDFS
providing 'constraints'. In the RDFS case, the constraints relate to the
notions of authorship, Writer, WrittenWorks. In the XML case, the
constraints relate to the characterstics of particular XML documents.

Above that, there's a broad unifying similarity: RDFS can help us figure
out whether something is a particular kind of person, eg a Writer. XML
DTDs (and Schemas) help us figure out whether something is a particular
kind of XML document, eg in the fictional FooCorp XML-Bilbiography. The
former case takes as evidence facts about people and the things they may
or may not have written. The latter case takes as evidence facts about XML
documents and the arrangement of tagged sections of text written inside
them. Both scenarios relate to a simple task: data formats for
bilbiographies, and the structure and meaning of documents written in such
formats. Both are, in a sense, about constraints. But the constraints
relate to different kinds of things; XML file formats in one case; the
kinds of things those files describe, in the other case.

The problem is that the expectations we have from thinking about DTDs can
transfer inappropriately to the RDF world. We can slip into thinking that
RDFS 'constraints' such as rdfs:range allow us to conclude 'something is
wrong' when an RDF document has...

<xyz:WrittenWork>
 <xyz:author>
   <xyz:Englishman>
    ...

instead of the 'expected':

<xyz:WrittenWork>
 <xyz:author>
   <xyz:Writer>
    ...

The idea that xyz:author is constrained to point to xyz:Writer gets
mixed up with the idea that all RDF/XML documents that use xyz:author must
("it's a constraint, right?") consequently use xyz:Writer.

I believe the use of the term 'constraint' encourages such confusion
between levels. RDF is currently *not* typically used to talk about types
of document. It could be. Particulary if it built on the expressive
features added by WebOnt. So usually in RDF we're talking about the things
that RDF/XML documents are _about_; and not about the characteristics of
those documents. We don't in RDF/S usually take care to talk about types
of XML document and the rules for counting, or not counting, as valid
members of those classes.

If we did, we'd have unified the XML and RDF schema layers and the world
of W3C data-formatting specs would be a slightly less confusing place...

Dan

seealso:
	http://www.w3.org/2001/06/rdf-xproc/1
	A story about RDF and XML

some raw materials showing how RDF might be used for document
formatting...

	http://www.w3.org/TR/NOTE-dcd (old)
	http://www.w3.org/TR/xml-infoset-rdfs (recent)



-- 
mailto:danbri@w3.org
http://www.w3.org/People/DanBri/
Received on Wednesday, 6 November 2002 15:04:11 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:53:59 EDT