Subject: Re: [apps-discuss] Scope of RFC3986 and successor - what is a URI?

From: Graham Klyne <[email-masked]>
Date: Wed, 04 Feb 2015 15:22:45 +0000

(Responding here because I think it's my claim that's quoted here...)

On 01/02/2015 00:31, Larry Masinter wrote:
> "A parser can only be RFC3986-compliant in the extent to which it correctly makes this determination in accordance with RFC3986"
>
> Just to make sure we're using the same vocabulary:
>
> We usually talk about "conformance" and not "compliance", I think. A specification has a scope and defines roles, and conformance requirements for agents that fill those roles. With a language or protocol element kind of definition, the roles usually include "writer", "reader", "validator". A reader does parsing (the parser part) and interpreting (the part that does something with the parsed components that are the result of parsing.

I'm a bit vague about this conformance/compliance terminology distinction, but 
I'm happy to accept your terminology here.

I'm less clear about where you are going with "reader", "writer" and 
"validation" roles.  Particularly it's not clear to me that a reader always parses.

>
> If you agree with those definitions, then it is reasonable to not require conforming readers to not be "liberal in what they accept", and RFC 3986 makes no explicit conformance requirement for parsers used by readers of the URI protocol element.

I agree with this, modulo any implications of my previous comment.

My thoughts on conformance requirements:

reader: must accept valid URIs (i.e. that conform to given syntax); may also 
accept other strings, but the effects of so doing may be ill-defined.

writer: must generate/present valid URIs

validator: determines if a given string conforms the defined syntax.  I 
generally consider *part* of the role of a parser is to be a validator, hence my 
comment quoted above.  (I do agree that *useful* parsers generally do more that 
that - I'm saying it's just the validation part that might be considered to be 
RFC3986 conformant or not.)

With reference to the prior discussions about scope, I note that many libraries 
act as readers and provide additional helpful functions (IMO beyond the scope of 
RFC3986) - the regex appendix in RFC3986 would be an example of this.  Failure 
to reject a non-confirming URI string does not, IMO, mean that either they or 
RFC3986 are broken.  Which I think is the point you also make?

#g