Hi
First thanks for your help.
I am working with OMA, Open Mobile Alliance. There are schemas released
by OMA and IETF. Some OMA schemas point to IETF schemas. Compiling of
these schemas works very good. I can also create XML documents.
Let's say I have schema "oma-list-service.xsd" and this schema
references to another schema "ietf-common-policy.xsd". I have attached
these schemas.
But when I do the following it complains because schema
"oma-list-service.xsd" is referencing to another schema.
JAXBContext jc =
JAXBContext.newInstance(value);
Unmarshaller u = jc.createUnmarshaller();
SchemaFactory sf =
SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
Schema schema = sf.newSchema(new
File("oma-list-service.xsd"));
u.setSchema(schema);
What I am trying to do is to validate XML document againest a schema. I
don't know if there are other ways to validate XML document.
It would be nice to have a validating function created when compiling a
schema. Are there any today?
Lul
Best Regards
Lulseged Zerfu
Ericsson AB
Development unit IP Network
PDU IMS Applications & Gateways
+46 8 719 4613
-----Original Message-----
From: Aleksei Valikov [mailto:valikov_at_gmx.net]
Sent: den 22 november 2006 18:01
To: users_at_jaxb.dev.java.net
Subject: Re: unmarshall
Hi.
> I am new to JAXB and I am making investigation if JAXB fits into our
> application. It looks good but I have encountered a big problem when
> unmarshalling and validating XML document.
>
> All examples show how to unmarshall and validate XML document made of
> only one schema. I have a schema made of other schemas and I would be
> very happy to get help if there are any examples that demonstrates
> unmarshalling and validating XML document made of many schemas.
>
> Thank you for your help.
I don't know about publicly available examples but JAXB (both 1 and 2)
surely works with modularized schemas (xs:import/xs:include).
What are your difficulties, exactly?
Bye.
/lexi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net