Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Preserving base URIs on detachment

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <cowan AT ccil.org>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Preserving base URIs on detachment
  • Date: Sat, 27 Mar 2004 13:09:02 -0500

Elliotte Rusty Harold scripsit:

> This only really matters at all if that element somehow contains a
> relative URI, e.g. in an href attribute. Otherwise the question is
> moot.

Agreed. I think the most compelling argument for freezing the base URI
when an element is detached is that it's very easy to clear the base URI
with setBaseURI(null) -- I didn't know that actually worked -- whereas
it is more work to freeze it for yourself.

> On the other hand, if the element is then added to another document
> with a different base URI, and then a child with no base URI is added
> to the detached element, it may be a surprise that relative URIs in
> the child are resolved relative to the old document and not the new
> one.

Maybe so, and maybe not. If I write a piece about Lenny, and you quote
me in your document, your readers will not assume that the Lenny in the
quote is necessarily your Lenny; since they see that the piece is quoted
from me, they're more likely to assume that it's my Lenny that's meant.
But perhaps they'll think that because you are quoting me and have not
absolutized my reference to Lenny, that my Lenny and your Lenny are the
same after all.

Context is all, and no one approach can get it right in all cases;
hence the importance of my argument about convenience.

--
He played King Lear as though John Cowan <jcowan AT reutershealth.com>
someone had played the ace. http://www.ccil.org/~cowan
--Eugene Field http://www.reutershealth.com




Archive powered by MHonArc 2.6.24.

Top of Page