|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: simple question on namespaces.
Uche Ogbuji wrote: > > <SNIP/> > > > 4) a string of the form "http://foo.org/bar.txt#baz" is a URI reference > > > 5) a string of the form "www.whatever.com/foo.bar" is NOT a URI reference > > <SNIP/> > > > > Does anyone else get irritated that the rest of the world seems to think > > that 4 and 5 are the same? I see lots and lots of advertisements in > > magazines and on television that have 'URLs' of the form www.ourwebsite.com > > with no preceding 'http://'. In fact I'm even more irritated now that > > Outlook Express has highlighted the www. as if it were a link... > > Who says "www.whatever.com/foo.bar" is not a URI reference? Certainly not > RFC 2396. > Deep sigh. You really *are* trying to confuse everyone right? :-) Though it is common practice to expand the string 'www.whatever.com' into http://www.whatever.com , per RFC 2396 the (relative) URI reference 'www.whatever.com' is not equivalent to the (absolute) URI reference 'http://www.whatever.com' <URI.esoterica> Most everyone expects to see 'www.whatever.com' as the 'authority' per RFC 2396. Such a string *could* also be a 'rel_segment' and hence 'www.whatever.com/foo.bar' matches the production 'rel_path' and hence 'relativeURI', but interpreting this as a relativeURI (and hence a URI reference) will result in unexpected behavior. When resolving a relative URI, an absolute URI is created by combining the relative URI with the base URI. Suppose the string is used within the document: http://www.foo.org/bar/baz/bop.xml and you are interpreting the string "www.whatever.com/foo.bar" as a relative URI. The resultant absolute URI would be: http://www.foo.org/bar/baz/www.whatever.com/foo.bar </URI.esoterica> Is that what you expect? Jonathan Borden The Open Healthcare Group http://www.openhealth.org
|
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
|
|||||||||

Cart








