OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Namespaces, Xml Schema Whitespace normalization, xs:an

[ Lists Home | Date Index | Thread Index ]



David Carlisle wrote:
>> It is probably prudent to simply avoid spaces in URIs altogether.
> 
> I'd agree, but...
> 
> file:///c:/Program Files/hmmmm
> 
> 
> No one would be mad enough to put a space in a directory name
> like "Program Files" would they? That would be silly....
> 
> So the choice is; do you make the end user (if it's end users creating
> the xml files) do the %20 escaping, or do you let the end user use a
> space and specify that somewhere along the chain between the xml file
> and the URL resolution the space gets encoded. Just simply avoiding
> them isn't really an option.

According to the specs I would say that you should raise an error for 
the URI as it is not legal. Ultimately this means that the user (or the 
editor/tool the user is using to generate the document) should convert 
the spaces to %20. Additionally, I would say that the ":" is illegal 
based on rfc1738 [1] which says:

    Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
    reserved characters used for their reserved purposes may be used
    unencoded within a URL.

Under file:// there is no reserved purpose for the ":" character as I 
read it.

The gray area is that Namespaces in XML and xs:anyURI talk about strings 
that can be turned into URI references. In both cases however, I think 
that the algorithms they cite do not allow for converting " " to "%20".

[1] ftp://ftp.funet.fi/pub/doc/rfc/rfc1738.txt


Cheers,
Jeff Rafter




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS