W3C home > Mailing lists > Public > www-rdf-comments@w3.org > July to September 2001

Re: Question on namespace confusion (more on Re: New syntax spec )

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Tue, 18 Sep 2001 10:07:09 +0100
To: Rick Jelliffe <ricko@allette.com.au>, www-rdf-comments <www-rdf-comments@w3.org>
Message-ID: <7837.1000804029@tatooine.ilrt.bris.ac.uk>
>>>Rick Jelliffe said:
> From: "Dave Beckett" <dave.beckett@bristol.ac.uk>
> 
> >  RDF/XML has been modified to forbid unprefixed
> > attributes anywhere in the syntax. i.e. local attribute names are
> > not allowed.  
> 
> So any existing or future document type that uses unqualified
> attributes (i.e. 99% of them) cannot be used with RDF?  
> Can you confirm that an RDF document does not allow local
> attributes at any level?

We can only define what the RDF/XML syntax means, not all XML
document types.  That we do not provide a meaning in this syntax does
not mean that they could not be mapped to an RDF model by other
means.  There has been moderate success using XSLT to map XML (ok,
XHTML) to RDF/XML and this seems a profitable way to proceed.

We do not say what is the meaning of any XML outside the
<rdf:RDF>...</rdf:RDF> outer element, so RDF/XML embedded in other
XML can be used such as defined in SVG:

> Why wouldn't it be a good idea to throw RDF-in-XML as currently
> specified completely out the window, and start afresh to
> try for what the rest of us actually need: a way of allowing semantic
> markup on XML documents. I.e. to start with the XML information
> set (including local attributes) as a fact to be worked with rather than
> something to be ignored?

That is explicitly out of scope from the WG charter:

  The RDF Core WG is neither chartered to develop a new RDF syntax,
  nor to reformulate the RDF model. However, the group is expected to
  re-articulate the RDF model and syntax specification in such a way
  as to better facilitate future work on alternative XML encodings
  for RDF.
     -- http://www.w3.org/2001/sw/RDFCoreWGCharter

Needless to say if we were designing a new XML syntax, it would be
different in the light of implementation experience and subsequent
XML developments such as XML base, XML schemas etc.  The refactoring
document in fact cites some of these new ideas in the references:
  http://www.w3.org/TR/2001/WD-rdf-syntax-grammar-20010906/#section-Normative-References
including yours :)

> 
> > This was done due to widespread confusion about
> > namespaces and attributes.  Different deployed applications thought
> > that in
> >      <eg:property resource="http://example.org/resource2/"/>
> > 
> > resource actually was eg:resource, others that it was
> > (default xmlns namespace):resource, and others recognised it
> > as the rdf special attribute that it is.
> 
> Well, it is certainly not eg:resource nor defaultNamespace:resource
> (see 5.2 "Note that default namespaces do not apply directly to attributes.")
> nor rdf:resource, according to the namespaces spec.
> 
> A local resource attribute on an element in another namespace might
> be RDF's resource, but it is never rdf:resource. 

I know all that but there was/is widespread confusion about XML
namespaces and local attributes so we modified the syntax to help
with this.  AFAIK, element-local XML attributes have no global
meaning, ie. mapping to a URI, which is what RDF needs.

> Sorry for being really thick on this, but I tend to think the refactored
> RDF still does not strike at the heart of the problem I have: I know
> the XML layer, I know the namespace layer, but RDF by providing home-made 
> grammars (whether syntax or information set) lumps together bits of the 
> requirements from XML, Namespace and RDF without discipline.

The notation was invented in order to be neutral on what schema
language we might choose later, and abstracting from the XML detail,
hence needed to describe the infoset.  The minmal BNF-like notation
was then added sufficient to indicate the approach we were
attempting.  We expect to change to an existing XML schema language
or languages.

> You have a subset of XML (no unprefixed attributes), 
> a subset of Namespaces (no unqualified attributes, same thing) and
> an unstated set of rules for implying namespaces (e.g. that
> <eg:property resource="x"/> is the same as <eg:property rdf:resource="x"/>).

Nope.  The first is now forbidden.  The second is allowed and its
meaning will be defined once we provide the mapping to the RDF model.

> I guess using explicit prefixes on all attribute gets us out of that problem,
> and it does clarify that  most people interested in adding semantic markup 
> to their XML documents should safely ignore RDF.

I disagree - as I said above, element-local attributes have no
web-wide meaning by relating to URIs and hence are pretty useless for
describing semantics that can talked about on the web.

We are clarifying the XML syntax (work in progress), updating the
model formalisation and trying to explain the message, in a pretty
open way.

But this is heading into discussion territory.  I suggest if you want
to raise more general issues about RDF, can you do it on the interest
group list?  This list is meant for formal responses to published
documents which can be fed into the group and document process.

> Cheers
> Rick Jelliffe
> 
> B.t.w. Thanks for the help on this. It looks like the various schema
> language champions are all going to make versions of schemas
> for RDF, to allow comparison between the approaches of the 
> different schema languages. Should be interesting.

Thanks, I've received responses from three schema language champions
on approaches - good phrase!

Dave
Received on Tuesday, 18 September 2001 05:07:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 September 2012 14:16:28 GMT