- From: Frans Englich <fenglich@trolltech.com>
- Date: Tue, 19 Dec 2006 10:23:20 +0100
- To: uri@w3.org
Hello all, Is an empty string a valid URI, URI reference, or both? In my particular case I have a C++ class for representing URIs that for long has flagged empty strings as invalid, but when using it to implement specifications I am confronted with that some consider it wrong. When one googles around on this topic one finds lots of confusion, and according to my reading, a slight leaning towards treating empty strings as valid: * http://www.stylusstudio.com/xmldev/200404/post30160.html * http://en.wikipedia.org/wiki/Uniform_Resource_Identifier#URI_reference * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4478501 * RFC 2396, C.2. Abnormal Examples * RFC 2396, 4.2. Same-document References If I'm going to take a shot, I'd say that empty URIs are invalid, but empty URI references are valid. I'd say that URI is more of an abstract concept, and that URI references is what we deal with. The latter being the shadow image of the perfect figure we cannot touch or see. So, for a class that 'parses "URIs"', I'd say that accepting the empty string is the right thing to do. Disentanglement, clarification would be highly appreciated. Cheers, Frans
Received on Tuesday, 19 December 2006 14:31:46 UTC