W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2007

Re: jaxb vs jaxp for XML validation

From: Michael Glavassevich <mrglavas@ca.ibm.com>
Date: Fri, 30 Nov 2007 18:33:30 -0500
To: xmlschema-dev@w3.org
Message-ID: <OFB05D74C0.336208B0-ON852573A3.008109B1-852573A3.00816E86@ca.ibm.com>

You're assuming that has to be an 'or'. It doesn't. You can provide a JAXP
javax.xml.validation.Schema to a JAXB 2.0 Unmarshaller and it will validate
the documents it unmarshals using the schema you specified.


Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

xmlschema-dev-request@w3.org wrote on 11/28/2007 09:04:49 PM:

> Given an XSD schema with key/keyref constraints,
> which XML processing to use- JAXB or JAXP?
>  JAXB is great because I get Marshal/Unmarshal
> capability. But JAXB 1.0 doesn't seem to support
> Key/Keyref constraint validation. JAXP seems to
> support this Key constraint validation in XSD. But,
> one has to implement Marshal/Unmarshal which doesn't
> come free here.
>  Obviously in my case, I do need to construct Java
> object for the incoming XML and vice-versa.

> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
Received on Sunday, 2 December 2007 04:04:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:45 UTC