[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces, Xml Schema Whitespace normalization, xs:an
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|