On Wed, 2006-10-11 at 13:31 -0400, Ajith Ranabahu wrote:
> Hmm...
> The instnace XML is indeed valid but it seems the way we handle things
> (atleast the assumption we made) is not correct. Right now the
> xsd:anyType generates an OMElement as the field (which essentially
> assumes that anyType will be a complex type!). But as this example
> shows it can be a primitive or derived type and our deserialization
> will fail.
> The most important issue here is that even if we manage to get the
> deser right, the generating of OMElement would not be right in this
> case. (How can you assign an integer or string to an OMElement ??)
> Would java.lang.Object be a good choice ?

OK I must be missing something: if there's xs:anyType on an xs:element
declaration then it can always be represented by an OMElement. Its an
*element*!

Also, IIRC xs:anyType cannot be a simple type- if its xs:anySimpleType
then it can be any simple type but if you want it to be either a simple
type or a complex type I think you have to say xs:ur-type or something
like that.

But that's not the problem here - you should be able to make this work
just right with an element. If you want to set its value to 173 then you
have to create a new text node containing the string value "173" and
stick that underneath the element. What's the problem?

Sanjiva.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to