[xsd-users] ##any type problems

Boris Kolpackov boris at codesynthesis.com
Thu Dec 21 02:04:28 EST 2006


Hi Bradley,

Bradley Beddoes <beddoes at intient.com> writes:

> >I assume you mean the exact same foo (ns/type etc) element here, I would
> >actually expect the above to return true, from an instance document is
> >it ever important if the element is meant to map to the explict
> >definition or the any statement in the schema? probably not... all you
> >want to know is that it is there for consumption in your app.
>
> Forget that its late here and I have been writing code for about 16
> hours now I should have thought about what I was saying for 2 seconds
> longer before posting, naturally with a sequence its going to matter.

It could also matter in other case, all depending on the application
semantics. Even in your case, imagine the Signature element was allowed
in the payload. I think you would want to distinguish the case where
there is no "header" signature while payload itself is a signature
and when there is a "header" signature.


> >Not sure what is going on with my mail client lately it seems to be
> >broken with attachments at times, anyways assuming this attachment works
> >you can see how the ArtifactResponse and StatusResponseTypes are
> >generated. I would have to test how your case above would work out but
> >my theory is that JAXB would always unmarshall an instance document with
> >a single "foo" element as being the value of set/get foo (as it should),
> >with subsequent foo elements which are substituted for ##any being
> >stored at as set/get any
> >
>
> Likewise this, I would need to actually do the test with for example an
> instance document that had the elements bar and foo defined in that
> order to see what results it gave, I will give that a go tomorrow
> morning when I wake up and let you know.

To actually understand how JAXB associates things one will need to
study the code that fills in all the fields. Or create a test, as
you have suggested.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061221/54db599a/attachment.pgp


More information about the xsd-users mailing list