W3C home > Mailing lists > Public > www-rdf-interest@w3.org > April 2003

Re: RDF Schema Validator - Validate RDF triples

From: Dave Reynolds <der@hplb.hpl.hp.com>
Date: Tue, 29 Apr 2003 16:04:29 +0100
Message-ID: <3EAE947D.BCA9B4D6@hplb.hpl.hp.com>
To: Leo Sauermann <leo@ist.org>
CC: sandro@w3.org, www-rdf-interest@w3.org

I agree with you that a set of tools is needed to make it easier to check RDF
and RDFS. 

Many RDFS tools, including those currently in Jena2, are aiming at RDFS
inference support - deriving additional information from the vocabulary
definitions. Since RDFS can express (almost) no contradictions such inference
tools aren't much use for validation. However, the current draft specs
(specifically [1] and [2]) do suggest that an RDFS processor would be free to
run in "validation" mode and check declared domain/range constraints against the
explicitly declared types of instances. That sounds like a fairly easy tool to
write, based on the machinery we already have. 

Even so RDFS is just not expressive enough for what you want here. Specifically,
there is no way in RDFS to say whether a property is mandatory or not, so those
constraints can't be expressed let alone checked. They can be expressed in OWL.

By the way, there are a few oddities in the example schema you attached. Sorry
if this is just nit-picking. 

First, declaring the domain/range of properties from some other schema, like DC,
seems likely to cause problems if you ever wanted to merge your data with other
semantic web data that uses DC in a different way. It also feels like it might
violate some social principle of namespace ownership[3]. 

Second, your declaration of DC:title is saying that it applies to objects which
are type mm:Album AND type mm:Artist AND type mm:Track - whereas I assume you
really mean OR. That effect could be achieved in RDFS by creating a new class
mm:HasTitle and saying that mm:Album etc are sub-classes of it.

Both of these could be avoided in OWL  - for example by saying mm:Album has a
restriction that all dc:creator properties applied to it have class mm:Artist.

I wonder whether it would useful to develop a simple frame-like language for
more easily expressing these sorts of constraints, specifically for the purposes
of validation? Such a language could be transformed into OWL (and RDFS) for
standards consistency but OWL is a pretty complex beast if all you want is the
equivalent of some object-oriented style type checking to help catch authoring


[1] http://www.w3.org/TR/rdf-schema/#ch_domainrange
[2] http://www.w3.org/TR/rdf-primer/#interpretingschema
[3] I don't want to start another discussion on whether "namespace ownership" is
a meaningful concept!

Leo Sauermann wrote:
> Sorry for a late continue of this thread, i was on holiday.
> > We've talked about doing such a thing as a Jena contrib tool
> > and I'm interested
> > in use cases for it. What sorts of validation are you looking
> > for? What
> > constructs, apart from datatype clashes, do you want to
> > regard as violations to
> > be detected by a validator?
> >
> I want to use the RDF-Schema definition of
> http://www.w3.org/TR/rdf-schema/
> describe an ontology. (see musicbrainz.rdfs attachement)
> And use some data that should comply to the ontology (see
> musicbrainz.rdf and other examples
> http://www.musicbrainz.org/MM/mm_examples.html
> What I want to do is:
> - Check both rdf & rdfs to RDF syntax conformity (i.e. did I type
> rdf:Bag or rdf:bag) - this is already possible
> - check if the resources used as objects are in the range they should be
> in, especially with resources that are members of a class.
> i.e. is the "dc:creator" of an album really of class "mm:Artist"
> - check if mandatory properties of a resource exist.
> The validator should write out:
> "resource X has object Y defined as "creator" but Y is not of required
> range mm:Artist"
> "resource X is not of any known class"
> ...
> It is very hard to write RDF & RDFS without such a valiator
> Sandro Hawke
> > The term "validate" is not very well defined in the RDFS space.
> Thats correct, I transfered it from XML terminology to rdf terminology,
> so to my understanding "valid" means that the semantics are ok.
>   --------------------------------------------------------------------------------
>                       Name: Musicbrainz.rdf
>    Musicbrainz.rdf    Type: Plain Text (text/plain)
>                   Encoding: quoted-printable
>                        Name: Musicbrainz.rdfs
>    Musicbrainz.rdfs    Type: unspecified type (application/octet-stream)
>                    Encoding: quoted-printable
Received on Tuesday, 29 April 2003 11:05:10 UTC

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