[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can anyURI be empty?


anyuri empty string
On Wed, 2004-04-07 at 03:47, Michael Kay wrote:
> > If it couldn't, it would be wrong. An empty string is a valid URI.
> 
> On this, like so many other things, RFC 2396 is a total disaster. An empty
> string is not valid according to the BNF syntax, but the RFC gives detailed
> semantics for what it means (detailed semantics, though very imprecise
> semantics).
> 
> And the schema REC doesn't help. It has the famous note saying that the
> definition places "only very modest obligations" on an implementation, and
> it doesn't say what those obligations are.

Yes.  This is a direct result of our realization that
we have as much trouble understanding RFC 2396 as anyone
else.  The anyURI type imposes the obligations of 
RFC 2396, whatever those are.  Any attempt to paraphrase
them on our part would lead, I fear, to an unsatisfactory
result: either we would make some mistake (like believing
that since the BNF does not accept the empty string,
it must not be legal) or we would make no mistakes.  In
the one case, we'd be misleading our readers, and in 
either case, we'd find ourselves mired in a never-ending
effort to prove that our paraphrase was, or was not,
correct.  

The only rule I have heard suggested plausibly is that
in a URI or URI reference, it's not legal to have two
hash marks; if this is (a) true and (b) really the only
syntactic constraint on URIs and URI references, then
the set of legal lexical forms for anyURI is the set of
strings which after IRI escaping have at most one
hash mark.

But I should add that some people deny that RFC 2396
outlaws strings with two hash marks.  They do this
usually by pointing to software that doesn't object,
which doesn't seem to me to make it a persuasive
argument.  So I lean toward the belief that they are 
wrong, or that they are talking about something other 
than what RFC 2396 defines.

-C. M. Sperberg-McQueen
 World Wide Web Consortium
 MIT Computer Science and Artificial Intelligence Laboratory


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.