Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] in-memory validation

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: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] in-memory validation
  • Date: Wed, 8 Sep 2004 06:55:59 -0400

At 4:42 PM -0700 9/7/04, Wolfgang Hoschek wrote:


I'm not convinced either that this is the right API, but do I think that in-memory validation is important and tricky/confusing enought to warrant some built-in help by XOM. How would suggest it should be done? My app would appreciate catching it's own bugs as early as possible, and validating before sending docs onto the network would help here.

Let me also say I'm not convinced it's on the wrong side of 80/20, and I'm not convinced your proposal is the wrong API either. Mostly right now I'm in feature freeze mode, as I try to get to something I'm happy to call 1.0. Something like this I'm not able to see immediately whether it's a good thing or not. It requires some careful thought and reflection I'm not prepared to do right now. I'll put it on the list for further consideration post 1.0.

My initial suspicion is that this shouldn't be part of the core API. Instead there should be a separate abstract Schema class in a separate package with subclasses for W3C Schemas, RELAX NG schema, DTDs, etc. Maybe even a SchemaFactory, but thw whole abstract factory design pattern like TrAX and JAXP use just strikes me as insanely baroque. This would have a validate method that takes a Document as an argument and returns a boolean. I think it should be possible to implement this without touching the core of XOM which is why it would make a nice third party project. If it couldn't be implemented without modifying the XOM core or accessing package private parts of nu.xom, then that would indicate a hole in the API somewhere.

Then again, I couldn't be wrong. Serious work on this from me will have to wait to post-1.0, but I suspect a third party could implement it and publish it as their own extension now. Not everything has to go into the core.
--

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