- From: Dan Connolly <connolly@w3.org>
- Date: Fri, 09 Jun 2000 17:18:50 -0500
- To: "Simon St.Laurent" <simonstl@simonstl.com>
- CC: XML-uri@w3.org
"Simon St.Laurent" wrote: > > At 03:28 PM 6/9/00 -0400, John Cowan wrote: > >In any case, every element and PI info item, as well as the document itself, > >has a "base URI" property. > > That'd take care of most of my arguments regarding base URI contexts, > though I'd still two key questions: > > 1) What's the base URI of a defaulted attribute? Very good question... As I recall, the Core WG decided that the base URI of a defaulted attribute is the base URI of the element to which that attribute belongs (Paul, please confirm if you can). For example, suppose this document had base URI http://example.com/here/ <!DOCTYPE aDoc [ <!ENTITY % over-there SYSTEM "http://example.com/over/there"> %over-there; ]> <aDoc> <anElt/> <aDoc> and the replacement text of over-there, i.e. the contents accessed at http://example.com/over/there was: <!ATTLIST anElt aRef CDATA #FIXED "where" > then the base URI of the aRef attribute of anElt is http://example.com/here/ , the base URI of <anElt/>, not the base URI of the ATTLIST declaration where the value occurs. (so the absolute form of "where" is http://example.com/here/where .) Last time I looked at the public infoset spec, I couldn't find text that clearly said so. The current text http://www.w3.org/TR/1999/WD-xml-infoset-19991220#infoitem.attribute doesn't help much, but it might have been drafted before the WG decided this issue. I don't recall. John C., I hope you'll include an example similar to the above in upcoming drafts. I think James Clark raised this issue originally back in fall '98.. but I can't find it in the archive. > 2) What to do when there's no base URI? My current preference is to define the infoset such that this case is ruled out by definition... just say that every XML document has a base URI, even though it might be implementation-dependent in some cases (e.g. stdin). This seems consistent with the URI spec: "5.1.4. Default Base URI If none of the conditions described in Sections 5.1.1--5.1.3 apply, then the base URI is defined by the context of the application. Since this definition is necessarily application-dependent, failing to define the base URI using one of the other methods may result in the same content being interpreted differently by different types of application. It is the responsibility of the distributor(s) of a document containing relative URI to ensure that the base URI for that document can be established. It must be emphasized that relative URI cannot be used reliably in situations where the document's base URI is not well-defined." -- http://www.ietf.org/rfc/rfc2396.txt > Answer those two, and I think we can trust applications to do their own > absolutization, leaving parsers with a safe but unchanged literal approach. > > Simon St.Laurent > XML Elements of Style / XML: A Primer, 2nd Ed. > Building XML Applications > Inside XML DTDs: Scientific and Technical > Cookies / Sharing Bandwidth > http://www.simonstl.com -- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Friday, 9 June 2000 18:17:43 UTC