xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- 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] Builder argument swap
- Date: Mon, 22 Mar 2004 16:39:32 -0500
At 11:40 AM -0600 3/22/04, Bradley S. Huffman wrote:
What about setBaseURI? If you build a document from a file with Builder,
getBaseURI on any element attached to the document will return the uri
of the file. Remove a element and getBaseURI on that element and any of it's
element children will return null.
We've discussed this in the past, and the result was the current behavior. However, I could be convinced that elements should retain their base URI on being detached from the parent. Right now that isn't obviously right though.
Add the removed element to another document with a base attribute somewhere
up the parent chain and getBaseURI will return non-null.
More specifically it will return the base URI in scope in that new document. I think this is what most users will expect; ie.e. it follows the principle of least surprise; but I'm not absolutely convinced here.
However if you build the document by hand and use setBaseURI on all elements,
then getBaseURI will always return the base uri explicitly set, and it doesn't
matter how many times a element is removed and re-added to a element in another
document.
More likely would be setting the base URI when the element is detached.
From reading the XML Base spec., this doesn't make sense, and you have togo to the Infoset to understand why the above situation occurs. Which makes
me wonder if setBaseURI should be public or even exist at all.
It's necessary for XInclude.
--
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
-
[XOM-interest] Builder argument swap,
Elliotte Harold - java FAQ, 03/19/2004
-
Re: [XOM-interest] Builder argument swap,
jcowan, 03/19/2004
- Re: [XOM-interest] Builder argument swap, Elliotte Rusty Harold, 03/21/2004
-
Re: [XOM-interest] Builder argument swap,
Elliotte Rusty Harold, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
Bradley S. Huffman, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
Elliotte Rusty Harold, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
Bradley S. Huffman, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
Elliotte Rusty Harold, 03/22/2004
- Re: [XOM-interest] Builder argument swap, Bradley S. Huffman, 03/22/2004
- Re: [XOM-interest] Builder argument swap, Elliotte Rusty Harold, 03/22/2004
- Re: [XOM-interest] Builder argument swap, Bradley S. Huffman, 03/23/2004
- Re: [XOM-interest] Builder argument swap, Elliotte Rusty Harold, 03/23/2004
- [XOM-interest] Preserving base URIs on detachment, Elliotte Rusty Harold, 03/23/2004
- Re: [XOM-interest] Preserving base URIs on detachment, Elliotte Rusty Harold, 03/25/2004
- Re: [XOM-interest] Preserving base URIs on detachment, Bradley S. Huffman, 03/26/2004
- Re: [XOM-interest] Preserving base URIs on detachment, Elliotte Rusty Harold, 03/27/2004
- Re: [XOM-interest] Preserving base URIs on detachment, John Cowan, 03/27/2004
- Re: [XOM-interest] Preserving base URIs on detachment, Bradley S. Huffman, 03/27/2004
-
Re: [XOM-interest] Builder argument swap,
Elliotte Rusty Harold, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
Bradley S. Huffman, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
Elliotte Rusty Harold, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
Bradley S. Huffman, 03/22/2004
-
Re: [XOM-interest] Builder argument swap,
jcowan, 03/19/2004
Archive powered by MHonArc 2.6.24.