users@jaxb.java.net

Re: Compute xs:any and xs:attribute

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Thu, 10 Dec 2009 16:02:21 +0100

Hi,

> I am saving xml documents structured in a relational database. But it will
> not work if the schema defining the xml document contains xs:any or
> xs:anyAttribute.
>
> Is there anyway where I can compute xs:any or xs:attribute and its
> namespace separatly?

What do you mean by "compute separately"?

> I am not going to parse these xs:any or xs:attribute in
> my application but need to return back when asked by an external application
> which created these xs:any and xs:attribute types.

Well, you have to store them somewhere. Consider storing
@XmlAnyElement as BLOB/CLOB in the database and @XmlAnyAttribute as
string/string map.

> This will help me to save the xs:any or xs:attribute types as they are
> together with the namespaces defined in a model and the rest of the xml
> document will be modeled i a relational database.

ps. Are you aware of Hyperjaxb3?
See http://confluence.highsource.org/display/HJ3/Home

Bye.
/lexi