W3C home > Mailing lists > Public > uri@w3.org > July 2000

Re: XML Base for relative URIs: Interpretation of 5.1 of RFC 2396

From: Leslie Daigle <leslie@thinkingcat.com>
Date: Tue, 11 Jul 2000 10:57:38 -0400
To: "Martin J. Duerst" <duerst@w3.org>
Cc: uri@w3.org, www-xml-linking-comments@w3.org
Message-id: <396B35E2.8EEE197@thinkingcat.com>
Howdy,

Taking your points out of order...

"Martin J. Duerst" wrote:
> First, Section 5.1 speaks about a single base per document,
> having multiple bases in different areas of a document
> doesn't seem to have been a concern, or maybe was explicitly
> rejected.

Re-reading the section in the light of your comments, it does
seem to have implicitly had that assumption.  However, I don't
think it precludes the notion of bases defined within subcontexts --
it's pretty direct that how the base is specified is a feature of
the encoding (XML in this case), and at the least, it says it's
application-dependent.

As Michael says, I would worry less about what document model
RFC2396 "had in mind", and make sure you define it clearly for what
you want to do with XML.

> Second, Section 5.1 doesn't seem to consider the case of
> inclusion in the way this happens with entities or similar
> cases.

I don't agree.  The idea of "encapsulated entity" (section 5.1.2)
seems to apply well to your external entity.  I doubt it was what
was in mind when that section was written, but it does seem
eminently applicable.  It would then suggest that xml:base should
scope into external entities. 

Soo...

> File /include/entity1.xml:
> 
> <a href='link.xml'>That's the question!</a>
> 
> Assuming that the href attribute in the example document
> is governed by the XML Base specification, what should it
> refer to?
> 
> If xml:base extends into external entities, it would
> refer to /example/subdir1/link.xml. If xml:base doesn't
> extend into external entities, it would refer to
> /include/link.xml.

IMHO, it would then be /example/subdir1/link.xml

> Third, the words 'entity' and 'document' are used both
> in XML and in RFC 2396, but it is not clear how to relate

Not being an XML expert, I can't offer insight into the alignment
of usage of the term.  However, I would offer that "entity" is
to be loosely interpreted in RFC2396 -- <<that which may or may
not be a document, a fragment, or something you want to refer to>>,
a "file", except that we don't talk about "files" in the network 
context.

So, I think RFC2396 does address your needs, but I think the answers
generate something that is very hard to define/manage -- unless
you explicitly declare xml:base in each new (potential) context, 
you wind up with things that are not so much portable documents
as unpredictable hypertext events:  it's very difficult for
document creators to predict/understand the implicit dependencies
they are fostering.  But, I was never a fan of this base/relative URI
thing :-)  Have fun.

Leslie.

-- 

-------------------------------------------------------------------
"My body obeys Aristotelian laws of physics."
   -- ThinkingCat

Leslie Daigle
leslie@thinkingcat.com
-------------------------------------------------------------------
Received on Tuesday, 11 July 2000 11:02:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:27 GMT