Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] (OT) [Nux] [StaX] Validating an XML document with Xom

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Tatu Saloranta <cowtowncoder AT yahoo.com>
  • To: Verachten Bruno <Bruno.Verachten AT atosorigin.com>, Woodstox User <user AT woodstox.codehaus.org>, xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] (OT) [Nux] [StaX] Validating an XML document with Xom
  • Date: Thu, 16 Mar 2006 11:22:55 -0800 (PST)

--- Verachten Bruno <Bruno.Verachten AT atosorigin.com>
wrote:

> > If you are interested, I can also explain the way
> to
> > configure the StAX XMLInputFactory for validation.
> If you don't mind, I would like to hear more about
> it.

Ok, but I'll probably better take this off to XOM list
(after this reply). I'll cc Woodstox user list, since
the description (I'll send full details later on)
should be useful for others.

At high level, there's a XMLValidationSchemaFactory,
that one needs to obtain same way as XMLInputFactory
(part of experimental stax2 extension), for specific
schema type. Factory can parse given input into an
immutable XMLValidationSchema object, from which
non-thread-safe per-document XMLValidator instances
can be created, by both XMLStreamReaders and
XMLStreamWriters (can validate input and output). This
is quite similar to how native MSV API works.
There are more specific details obviously, but I'll
save those to the other email as it's not really XOM
related (and there are some open questions regarding
integration with other frameworks)

...
> Well, it was really hard to move from DTDs to Schema
> in our department.
> It will be really hard too to get people used to
> RNG. ;-)

Yeah, I hear you. It's just such a pity -- for actual
validation use cases, RNG is just so much easier to
work with from all around (from xml parser integration
perspective, usage, simplicity).

Oh, one last note: if you need the w3c schema
validation right now, it is probably a good idea to
use the usual SAX route, since that's already there
and well tested. I don't want to be advertising Real
Soon Now feature too heavily, even though I fully
intend to make StAX route a competitive one.

-+ Tatu +-


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




Archive powered by MHonArc 2.6.24.

Top of Page