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

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):

http://www.example.org/Milan+Marriott

or this (Subject B):

http://www.example.org/Milan%20Marriott

... 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:

http://www.example.org/Milan+Marriott

while Javascript's encodeURI() would do this:

http://www.example.org/Milan%20Marriott

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
http://blog.digitalbazaar.com/2009/03/28/cloud-computing-bubble/

Received on Tuesday, 7 April 2009 02:18:11 UTC