users@jaxb.java.net

Re: schema location or namespace of JAXB object

From: Kenny MacLeod <kennym_at_kizoom.com>
Date: Wed, 27 Jun 2007 14:22:26 +0100

You know, the more I think about this, the less I understand... for the
life of me, I can't see how the namespace URI is marshalled when the
annotated classes contain no such information. It must be something
obvious, but I can't see it.

Anyone?

> - How does JAXB manage to marshal a .xml with the schema location and
> namespace information
> when the only argument I give to the marshaller is the ObjectFactory ?
> - When my .xml is unmarshalled, how the unmarshaller manages the schema
> location and namespace information ?
>
> Regards.
> Christophe
>
>
>
> Le 27 juin 07 à 14:00, Kenny MacLeod a écrit :
>
>>> Isn't SchemaFactory reliant on a .xsd ?
>>
>> It is, but JAXB isn't reliant on schema at all. You can inject a
>> Schema into the JAXB unmarshaller if you wish, but that's only to add
>> validation.
>>
>>> My problem is that at runtime I don't have access to the schema but
>>> to JAXB instances generated from a .xml unmarshalling.
>>> And I want to access the schema location information from any JAXB
>>> object.
>>
>> JAXB itself gives you no help there, you'll need to locate the schema
>> yourself.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>