W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > September 2003

can we leave relative URI references unconstrained? (no, don't think so after all)

From: Dan Connolly <connolly@w3.org>
Date: Tue, 16 Sep 2003 11:38:48 -0500
To: w3c-rdfcore-wg@w3.org
Message-Id: <1063730328.5532.219.camel@dirk.dm93.org>

Thinking out loud...

Consider:

  <rdf:RDF>
   <Doodad rdf:about="very silly ## reference"/>
  </rdf>

Is that an RDF document? OK, after you add
the namespaces... is it an RDF document?

Consulting our shiny new drafts... we find...
http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20030905/#aboutAttr

which takes us to
http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20030905/#URI-reference

which says
  "An attribute ·string-value· interpreted as an RDF URI reference."

hmm... "interpreted as" doesn't seem to change the fact that
the syntax allows any string. So far, no clear evidence
to rule out this document...

Now to the relevant grammar actions...

If there is an attribute a with a.URI == rdf:about then e.subject :=
uri(identifier := resolve(e, a.string-value)).
http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20030905/#nodeElement


then back to 6.3.3 Grammar Action Notation
to see how resolve() works...

then down to  5.3 Resolving URIs
http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20030905/#section-baseURIs

"Relative URI references are resolved into RDF URI references according
to the algorithm specified in XML Base [XML-BASE] (and RFC 2396)."

er... but that algorithm takes an ASCII string as input,
and a limited form of ASCII string... it doesn't take
any old unicode string.

So this appears to be a conforming RDF document whose abstract syntax
is incompletely specified... er... no, in section 5.5 Conformance,
"RDF document" is specified as something that is serialized from
an RDF graph, not somethignt that matches this grammar(!).

By that definition, since there's no RDF URI Reference
that can result from resolving "very silly ## reference",
this isn't an RDF document.

I took an action (2003-09-12#4) to propose to relax that
constraint, but now that I see how RDF document is defined,
I don't think that's wise.

I suppose it would be sorta rude to just stop here and hit
send... let's pop back to the motivating issue... ah yes,
% in URIs...

so the relevant test case looks more like

  <rdf:RDF>
   <Doodad rdf:about="somewhat%silly%reference"/>
  </rdf>

let's look at 6.4 RDF URI References again...
http://www.w3.org/TR/2003/WD-rdf-concepts-20030905/#dfn-URI-reference

we can't delete the % from that para; if we did, then

  <rdf:RDF xml:base="http://example/">
   <Doodad rdf:about="quite%2Fordinary%2Freference"/>
  </rdf>

would turn into the URI http://example/quite%252Fordinary%252Freference
which is clearly not what we want; by design, it remains
http://example/quite%2Fordinary%2Freference

I suggest this last case be put in the test suite in response
to the 26Aug comment.
http://lists.w3.org/Archives/Public/www-rdf-comments/2003JulSep/0282.html

Gosh... I see more issues... control characters and such
in the "escaping % in RDF URI references" thread.

Seems clear to me that our spec doesn't allow control characters;
how would you find a unicode string U' where utf8-%%-encode(U')
is a plain old ASCII absolute URI reference with optional fragid
while U' has control characters in it? Ew... now I see... yes,
they are allowed by our current draft.

Ugh... time to study namespaces 1.1... I'm losing energy at
this point. I think I'll hit send now. Perhaps I'll find
time/energy to pick it up again later.


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Tuesday, 16 September 2003 12:38:49 EDT

This archive was generated by hypermail pre-2.1.9 : Tuesday, 16 September 2003 12:38:52 EDT