W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > April 2009

Re: Are RDFa parsers responsible for URL-encoding values when generating URLs?

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Mon, 06 Apr 2009 22:17:23 -0400
Message-ID: <49DAB7B3.5080009@digitalbazaar.com>
To: RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
Ben Adida wrote:
> Manu Sporny wrote:
>> If there are no objections, I can create a test case to ensure that
>> percent-encoding is performed before the RDFa parser generates a triple.
> I'm not opposed to this, but... isn't our SPARQL approach to testing
> already doing this effectively? Or are you saying that there are no
> tests with spaces and you want to add one?

I'm saying the second one... and if so, would this XHTML:

<base href="http://www.example.org/"></base>
<div about="Milan Marriott" typeof="foaf:Person">...</div>

cause the RDFa parser to generate this as the subject (Subject A):


or this (Subject B):


... and if (Subject B) is what should be generated, is (Subject A) still
valid output for the RDFa parser?

We should follow the encoding rules in RFC 3986[1], but this leads to a
number of URI canonicalization issues, doesn't it? What you do and don't
encode depends on the URI scheme... but we don't want to over-complicate
RDFa parser implementation.

Also, in practice - ASP Server's URLEncode() function would encode it as:


while Javascript's encodeURI() would do this:


Do we state that easing URL normalization/canonicalization is a complex
problem not covered by RDFa and which should be handled at a higher
level, or do we specify some guidance when encoding values (such as
"SHOULD percent encode ...", or "SHOULD NOT percent encode ...")?

-- manu

[1] http://tools.ietf.org/html/rfc3986

Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: The Looming Cloud Computing Bubble
Received on Tuesday, 7 April 2009 02:18:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:31 UTC