Lists Home |
Date Index |
- From: Paul Grosso <email@example.com>
- To: Jay Sachs <firstname.lastname@example.org>, email@example.com
- Date: Mon, 07 Aug 2000 09:57:16 -0500
At 09:53 2000 08 07 -0400, Jay Sachs wrote:
>Norman Walsh wrote:
>> I certainly agree that an entity resolver can return any resource it
>> wants, and that the entity resolver is free to choose to inform the
>> application that the system identifier is anything it wants. (I'll
>> even argue that it should be allowed to return null if it wants, that
>> case is carefully spelled out in RFC2396.)
>To be explicit here: a "null" systemId on the returned InputSource would
>mean that 5.1.2 applies, and the URI is that of the enclosing context?
No, see below. It only means that section 5.1.3 doesn't apply.
>Or that no redirection had occurred?
It doesn't say anything about whether redirection occurred.
>Or do you mean that section 5.1.4
>applies and it's now up to the application?
Only if none of sections 5.1.1-5.1.3 applied.
>I suspect the first (section 5.1.2) is more conforming to the RFC.
Section 5.1.1-5.1.4 of RFC 2396 apply in that order (see the schematic
diagram in section 5.1). Section 5.1.1 covers things like HTML's <base>
element and XML Base. Only if there is no base URI indication embedded
within the document content does one consider 5.1.2 (which talks about
"inheriting" the base URI from one's MIME envelope); then, only if that
isn't relevant, does one consider 5.1.3 which talks about the base URI
used to retrieve the document (or given XML external parsed entity).
Finally, if we've gotten to considering 5.1.3 and there is still no
non-null base URI, only then does one get to section 5.1.4.
Note that, if you get to section 5.1.3 (which is the current topic of
discussion) and you don't have a non-null base URI, you cannot go back
to section 5.1.2. So, no, section 5.1.2 doesn't apply. It's got to be
section 5.1.4 that applies in this case.
Of course, it's possible that the resolver returns a null for the
retrieved resource, but you are within the scope of an assignment
to xml:base; in that case, you've determined your base URI using
section 5.1.1, so the fact that the resolver returned a null is
not going to affect your base URI computation here.