RE: RDF and xml:base

Aaron asks:

> I'm unaware of how xml:base should be used in RDF. Are their any
> thoughts on
> this as an interoperability consideration, etc.?

Sure. First, the RDF community needs to see if XML Base has any
special impact on us. If it has a special impact on us, then we
need to start yelling. If it does not, then it is really an XML
feature that is almost orthogonal to our concerns. In that case,
I don't think we need to put special provision for it into any
revision of the model, unlike xml:lang, which may have
a need for being reflected in the model.

If we find that xml:base has no SPECIAL impact on us, we should
just do the typical steps of:
1) putting examples of its use into a future revision of the
   Syntax spec.
2) encouraging parser writers to add support for it to their
   software.
3) cautioning creators of descriptions that use of the xml:base
   attribute may harm interoperability for the next year or so until
   parsers that deal with it are more widespread. However, they are
   free to use it if they want.

> What parsers implement this?

Right now? None that I know of, although adding it to RDFFilter
looks fairly straightforward.



All of this is contingent on the question of whether the XML Base
proposal has any special impact on RDF. So let's talk about that.

I currently believe that xml:base does not have any special impact
on RDF, although it may be of limited utility.

All that the XML Base proposal does is
give a way of setting a base URI to use when absolutizing relative
URI references in XML documents. While RDF documents are rife with
URI references, few of them are relative. For example, the description

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:dc="http://purl.org/dc/elements/1.1/">
    <rdf:Description rdf:about="huh.txt">
      <dc:creator>J. Smith</dc:creator>
      <dc:subject rdf:resource="http://example.com/codes#foo"/>
      <dc:subject rdf:resource="http://example.com/codes#bar"/>
    </rdf:Description>
  </rdf:RDF>

contains 1 relative reference ("huh.txt"), 6 QNames which are
URI references according to the RDF concat rule (rdf:RDF,
rdf:Description, rdf:about, dc:creator, dc:subject, rdf:resource),
and four absolute URI references (the two namespace URIs, plus
"http://example.com/codes#foo/" and "http://example.com/codes#bar/").

The one relative reference requires a base be established. Typically
the base is the current document, see RFC 2396 for the 4 rules on
how to come up with a base URI. So this description assumes it is in
a file in the same directory as huh.txt.

We could use xml:base to eliminate the duplicate URI in the /foo
and /bar subject codes - ala

  <rdf:Description xml:base="http://example.com/codes" ...
     ...
     <dc:subject rdf:resource="foo"/>
     <dc:subject rdf:resource="bar"/>
     ...

The problem here is that the only places to hang a single xml:base
attribute so we can eliminate the duplication will also make it apply
to the value of the rdf:about attribute - which makes life hard when
trying to say what file something applies to.

On the other hand, if someone wanted to model their problem as
having one subject arc with a Bag of values, then xml:base is
more useful:

  <rdf:Description rdf:about="huh.txt">
    ...
    <dc:subject xml:base="http://example.com/codes">
      <rdf:Bag>
        <li  rdf:resource="foo"/>
        <li rdf:resoruce="bar"/>
      </rdf:Bag>
      ...

So - I think xml:base is not harmful but will have limited value in
many RDF descriptions. No need to preclude, but no need to accelerate.

Regards,

Ron Daniel Jr.
Standards Architect
Tel: +1 415 778 3113
Fax: +1 415 778 3131
Email: rdaniel@interwoven.com

Visit www.interwoven.com
Moving Business to the Web

Received on Wednesday, 9 May 2001 16:00:58 UTC