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

Re: Why is xml:base a URI *reference*?


xml base uri
* Jonathan Borden wrote:
>Does anyone here know the reasoning behind this? In specific, why does 
>xml:base allow URI references (i.e. with fragment identifiers) rather 
>than simply using URIs (URIrefs sans fragment identifiers)?

XML 1.0 uses URI References for system identifiers and forbids fragment
identifiers, that's way more weird... However, I'd rather ask why it
should be restrictive. If my base uri is <http://www.example.org/#foo>
and I have a same document reference <> it would in most implementations
resolve to <http://www.example.org/#foo>, a browser would otherwise jump
to the top of the document rather than do nothing if I click on a link
to <> which is somewhat useful. However, resolving URIs if the base URI
contains a fragment identifier is somewhat dangerous as implementations
often disagree about the result, for example if the base URI is
<http://www.example.org/#foo> and your relative URI is "?"

  * Microsoft J#        http://www.example.org/?#foo
  * Perl URI.pm         http://www.example.org/?#foo
  * Sun Java SDK 1.4.2  http://www.example.org/?
  * Microsoft .NET (C#) http://www.example.org/?
  * ...

>The reason that I ask is that there are some instances in the RDF and 
>OWL PR where xml:base's ending in '#' are used so that the base URI 
>matches the XML namespace ... I can see the convenience of this but the 
>practice strikes me as a bit weird. Perhaps I am missing something.

URI References ending in '#' are always weird...

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.