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: jcowan AT reutershealth.com
- Cc: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] Builder issues
- Date: Thu, 5 Feb 2004 08:43:31 -0500
At 2:14 PM -0500 2/2/04, jcowan AT reutershealth.com wrote:
Builder:
1) 3-argument constructor doco doesn't mention NodeFactory. Also, the constructors
should have consistent doco: all should read "Creates a new".
fixed
2) Consider dropping Builder(XMLReader parser, boolean validate); it's clutter,
and it's very easy to ask the XMLReader for validation before passing it.
I'll think about it.
3) There should be a flavor of build() that accepts a org.xml.sax.InputSource.
What's the use-case here? I prefer not to expose more of SAX than I have to; but if there's a compelling need it's easy to do. I just have to change a private method to public.
4) Expose the chosen parser with a getXMLReader method, so that you can let
XOM choose the parser but still set properties on it before calling build().
No, I really don't want to do that. XOM depends pretty heavily on having some features and properties set "just so" and I don't want to make it easy to change those. Right now you could pass in your own XMLReader to construct a Builder, change the features on it, and then call build, and honestly that makes me nervous. Such are the dangers of violating encapsulation. I'm wondering if I should check and reset the features XOM needs before each build().
I suspect that the vast majority of series-builds (using the same Builder for multiple documents) will want to use the same configuration for each document anyway, and it's not that big a deal to use several different builders if that's not what you want.
--
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
-
Re: [XOM-interest] XOM 1.0d23 Last Call
, (continued)
- Re: [XOM-interest] XOM 1.0d23 Last Call, Bradley S. Huffman, 02/02/2004
- Re: [XOM-interest] XOM 1.0d23 Last Call, Bill de hÓra, 02/02/2004
-
[XOM-interest] Put methods,
Elliotte Rusty Harold, 02/05/2004
- Re: [XOM-interest] Put methods, jcowan, 02/05/2004
-
[XOM-interest] hasChildren vs. getChildCount == 0,
Elliotte Rusty Harold, 02/05/2004
-
Re: [XOM-interest] hasChildren vs. getChildCount == 0,
Dirk Bergstrom, 02/05/2004
- Re: [XOM-interest] hasChildren vs. getChildCount == 0, Bill de hÓra, 02/05/2004
- Re: [XOM-interest] hasChildren vs. getChildCount == 0, Janek Bogucki, 02/09/2004
-
Re: [XOM-interest] hasChildren vs. getChildCount == 0,
Dirk Bergstrom, 02/05/2004
- [XOM-interest] UNDECLARED vs. CDATA, Elliotte Rusty Harold, 02/05/2004
- [XOM-interest] Namespace methods, Elliotte Rusty Harold, 02/05/2004
- [XOM-interest] Builder issues, Elliotte Rusty Harold, 02/05/2004
- [XOM-interest] ID or identifier, Elliotte Rusty Harold, 02/05/2004
- [XOM-interest] NodeFactory issues, Elliotte Rusty Harold, 02/06/2004
- Re: [XOM-interest] XOM 1.0d23 Last Call, Elliotte Rusty Harold, 02/06/2004
- Re: [XOM-interest] XOM 1.0d23 Last Call, Elliotte Rusty Harold, 02/11/2004
Archive powered by MHonArc 2.6.24.