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: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • 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: Fri, 26 Mar 2004 11:34:45 -0600

Elliotte Rusty Harold writes:

> There are basically two approaches to this, and they are distinguished
> thusly
> :
>
> Should an element created in memory (i.e. not parsed) retain the base
> URI of its parent when detached?

Or skip this automagical stuff and have a source URI property that doesn't
change on attachment/detachment.

setSourceURI(String uri) - sets the source URI property. Set by Builder,
XIncluder, etc.
String getSourceURI() - gets the source URI property (doesn't resolve
anything or apply any algorithm)
String getBaseURI() (or a better name might be resolveBaseURI) -
resolve the base URI

setSourceURI/getSourceURI are a simple setter and a getter. The node retains
the source URI until explicitly changed by a call to setSourceURI, nothing
automagically! getBaseURI contains all the logic for resolving the base URI.
If a application doesn't like the algorithm used by getBaseURI it has access
to all the info. it needs to apply it's own resolution algorithm thru
getSourceURI, getParent, getAttributes, etc.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page