Re: XML Schema for RDF/XML

>>>Daniele Capursi said:
> Hy all,
> is there an official XML Schema or DTD to validate (in XML sense)
> an RDF/XMLdocument?

No.  I think we (the RDF Core Working Group) discussed it and for
some of reasons I explain below, didn't develop one.

> If not, how does the RDF API Draft check the syntax of an RDF/XML
>document while parsing it?
> All I could find about it is at

Which I wrote and says:

  Current state: broken

> It's an XML Schema, but it's not currently well formed ..

It is well formed XML, but broken as a W3C XML Schema (WXS)

> ... and it refers to w3c recommendation of 2001-05-02.

Which is the WXS version and the latest version of the W3C's XML
schema validator.

> Can anyone help me? Thanks in advance.

WXS works in a way that is tricky to make work with RDF/XML - it
requires that each namespace has a WXS schema document and that if
you want to mix them, you need another WXS schema pointing at all the
others.  It also is more proscriptive so is happier when all the XML
elements and attributes in an XML document are known.

RDF and RDF/XML lets you mix terms more flexibly than that and handle
unknown (yet still XML-namespaced) terms, so a general WXS for
RDF/XML will be rather lax, apart from some structural restrictions
on the use of the RDF namespaced elements.

(DTDs are also inappropriate for RDF/XML for the same reasons)

So the best you can do is specify a WXS for a particular application
of RDF/XML, where the terms are (mostly) all known.

Here's some work I'm doing on Dublin Core in RDF/XML, with WXS

Schema languages such as RELAX NG, Schematron are much more
appropriate for RDF/XML and RDF-in-other-XML formats.  A lot simpler

Which is why I put the RELAX NG schema in the RDF XML syntax draft

Maybe you could take that and try to translate it?  Sun's MSV might help.


Received on Wednesday, 10 July 2002 06:35:29 UTC