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 Rusty Harold <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: Wed, 9 Jun 2004 15:44:45 -0400

At 10:20 AM -0500 6/9/04, Bradley S. Huffman wrote:

But is does change :-) Here's another use case, adding a base attribute to
the root element in file://home/hip/text_xom/test.xml

<root xml:base="www.acme.org"><foo><bah/></foo></root>

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

I'm sorry. I can't follow this. You're doing several weird things here:

1. www.acme.org is a relative URL that just happens to look like a host name. Did you mean to say http://www.acme.org? In which case you'd get very different results.

2. xml:base attributes are *not* equivalent to base URIs. They are not preserved when an element is detached. You would get different behavior if you used setBaseURI instead.

3. I don't know what you mean by far base uri below. :-(


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

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

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

--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page