- From: John Cowan <cowan@locke.ccil.org>
- Date: Fri, 9 Jun 2000 19:22:29 -0400 (EDT)
- To: "Simon St.Laurent" <simonstl@simonstl.com>
- cc: XML-uri@w3.org
On Fri, 9 Jun 2000, Simon St.Laurent wrote: > 1) What's the base URI of a defaulted attribute? Defaulted or specified, the base URI is that of the element, i.e. derived from the external general entity in which the element appears. > 2) What to do when there's no base URI? *shrug* You wanna use relative URIs, make sure there is a base URI. If there isn't, use an application specific default. RFC 2396 lays down the rules: document-specific base (xml:base, or the BASE element in HTML) if you have one; if not, the base of the (document or external) entity if you have one; if not, an application-specific fallback. Here is the relevant bit of 2396: # 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. -- John Cowan cowan@ccil.org "You need a change: try Canada" "You need a change: try China" --fortune cookies opened by a couple that I know
Received on Friday, 9 June 2000 18:55:10 UTC