Re: xml:base (was Re: IRI meets RDF meets HTTP redirect)

Sandro Hawke scripsit:

> <rdf:RDF xmlns:rdf=""
> 	 xmlns:foaf=""
>          xml:base="">
>   <rdf:Description rdf:about="">
>     <foaf:likes rdf:resource="" />
>   </rdf:Description>
> </rdf:RDF>
> ================================================================

Unfortunately, the above showed up in my mailer with a pile of question
marks, but I'll pretend it didn't.  I'm also reversing the order of your
options for rhetorical purposes.

> ** Option 2:
> This input is not well formed XML.

In no case would an erroneous value of the xml:base attribute (for
example, "%%%" would be such a value) make an XML document *not well
formed*.  It would, however, make the document not conform to the XML
Base recommendation.

However, your example is *not* such a case.

> ** Option 1:
> This is perfectly decent XML.

Yes, it is, and what's more it conforms to XML Base.

> It parses to this N-Triple:
>    <> <> <>.

Almost.  It parses to the N-Triple that results when
you %-escape the above non-ASCII characters.  If you
read either
or , you
will find that non-ASCII characters are not permitted
in N-Triples files.  Furthermore, they are not required,
because N-Triples express relations between resources
named by URIs, not by IRIs.

I repeat:  the value of an xml:base attribute may contain
non-ASCII (and non-URI) characters.  The resulting base URI
does not; it contains their %-escaped equivalents.

> I'm happy with this option, and I understood Jeremy and Chris to be as
> well.  FWIW, the W3C RDF validator (using Jeremy's parser) does this.

If the validator returns that N-Triple then it is broken.

Is not a patron, my Lord [Chesterfield],        John Cowan
one who looks with unconcern on a man 
struggling for life in the water, and when
he has reached ground encumbers him with help?
        --Samuel Johnson

Received on Friday, 20 April 2007 00:22:59 UTC