Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.0 alpha 1 is here

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold - java FAQ <elharo AT metalab.unc.edu>
  • To: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.0 alpha 1 is here
  • Date: Tue, 8 Jun 2004 17:06:07 -0400 (EDT)

On Tue, 8 Jun 2004, Bradley S. Huffman wrote:

> If a element doesn't have a base URI and is added to another element that
> does,
> does the child inherit the base URI of the parent and retain it even if
> later detached? Cause that's what it seems to do.

Yes. That seemed to me to follow the priniciple of least surprise. If I
load in an XHTML document, create some new elements inlcuding a elements,
and stick them in, I'd expect the relative URLs in the href attributes to
be resolved relative to that document, and I expect that not to change
when they're detached.

I realize there are arguments on all sides of this. I sat on the fence
about this for along time. This was really the one issue that was holding
XOM back in a major way (that, and the need to to finish some books that
pay the bills) but eventually I had to call these issues one way or the
other. I tired to be as consistent with the various specs for URIs and
xml:base as I could be. Regrettably neither RFC 2396 or XML Base was
really written with the sort of issues that arise with in-memory documents
in mind. They all assume, implicitly or explicitly, that all elements come
from documents with well-defined URIs, and they really don't know what to
do when that isn't the case. :-(

I took what seemed to be the safest path.

--
Elliotte Rusty Harold
elharo AT metalab.unc.edu
elharo AT macfaq.com





Archive powered by MHonArc 2.6.24.

Top of Page