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] Why is xml:base a URI *reference*?

[ Lists Home | Date Index | Thread Index ]

* 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...




 

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

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