[xsd-users] ##any type problems

Boris Kolpackov boris at codesynthesis.com
Tue Dec 19 04:43:15 EST 2006


Hi Bradley,

Bradley Beddoes <beddoes at intient.com> writes:

> Yes you've got it 100% correct there, those elements should not be
> directly represented as the any element although assuming a fuller SAML
> message was embedded here they may appear at some lower level in the
> structure ie:
> <StatusResponse>
>  <Issuer>
>  ...
>  <Request> <-- substitute for any type
> 	....
> 	<Issuer/>
> 	....
>  </Request>
> </StatusResponse>
>
> From the way your explaining how the validator is working and the XSD
> code which I looked into today I assume (with lets face it little real
> world knowledge of the working of XSD) this wouldn't pose an immediate
> problem,

Only the top-level element name that matches the wildcard matters here.
So there is no limitation on nested element names.


> Providing that switch would be much appreciated.

I am still investigating different options but can build you are
binary with this check disabled. Let me know which platform you
are using.


> >2. Use Xerces-C++ post-schema validation infoset (PSVI) to figure
> >   out associations. This shouldn't be too hard to implement and
> >   probably won't increase the generated code by too much. The only
> >   significant limitation of this approach is that it will only
> >   work with validation enabled.
>
> I personally don't see that as a negative thing in this case anyway or
> other such cases with complex schemas such as this, surely those with
> the need to use ##any also have the need to make sure the XML they are
> processing is valid. This would probably be my preferred option going
> forward given that we are already seeing some 17k LOC generated for
> saml-schema-metadata-2.0.xsd for example

I looked into PSVI today but could not find a way to determine if an
element was matched by a wildcard. I am still going to ask on the
Xerces-C++ mailing list.

BTW, out of curiosity I checked how this is supported in other data
binding tools. I particularly looking into XMLBeans and, guess what,
it silently generates broken code. You may want to check your jaxb
code -- I bet it is broken as well.


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/20061219/a62cbf56/attachment.pgp


More information about the xsd-users mailing list