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: "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] XOM 1.0 alpha 1 is here
  • Date: Tue, 08 Jun 2004 14:30:41 -0500

Elliotte Rusty Harold writes:

> * The base URI handling has been modified as follows:
> 1. getBaseURI() always returns an absolute URI or the empty
> string if the base URI is not known. Other than the empty string it
> never returns a relative URI. It never returns null.
> 2. The base URI of an element does not change when it is
> detached or copied.

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.

I parsed the document file:/home/hip/test-xom/test.xml, which is

<root><foo><bah/></foo></root>

then created a element "far" and added it to the root element, then removed
it, this is what getBaseURI returns along the way

Document
--------
root base uri=file:/home/hip/test-xom/test.xml
foo base uri=file:/home/hip/test-xom/test.xml
bah base uri=file:/home/hip/test-xom/test.xml

After creation
--------------
far base uri=

After appended to root
----------------------
far base uri=file:/home/hip/test-xom/test.xml

After removed from root
-----------------------
far base uri=file:/home/hip/test-xom/test.xml

Is that correct?

> 3. The setBaseURI() method only accepts an absolute URI. It
> throws a MalformedURIException if you attempt to pass it a relative
> URI, or a URI with a fragment identifier. (Relative URIs are still
> allowed in xml:base attributes.)

Need to add to javadoc that passing setBaseURI null or "" clears any
previously
set base URI.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page