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

Re: Namespaces, Xml Schema Whitespace normalization, xs:an


xml allow whitespace


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

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.