W3C home > Mailing lists > Public > www-rdf-interest@w3.org > September 2002

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

From: Dan Brickley <danbri@w3.org>
Date: Sat, 21 Sep 2002 04:51:53 -0400 (EDT)
To: Ashley Yakeley <ashley@semantic.org>
cc: Franco Salvetti <Franco.Salvetti@Colorado.EDU>, RDF Interest Group <www-rdf-interest@w3.org>
Message-ID: <Pine.LNX.4.30.0209210419041.12527-100000@tux.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...


instead of the 'expected':


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


	A story about RDF and XML

some raw materials showing how RDF might be used for document

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

Received on Saturday, 21 September 2002 04:51:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:38 UTC