[xsd-users] Compile problem with xsd schema
boris at codesynthesis.com
Fri Aug 4 14:27:33 EDT 2006
Jean-Francois Dube <jf at magnu.polymtl.ca> writes:
> Someone I know had a similar problem with xsd and Visual Studio.
> It's a limitation of the Microsoft compiler. Your schema is probably too
> "deep", and the generated code has too many levels of nested class.
> See http://msdn2.microsoft.com/en-us/library/ft39hh4x.aspx
> "Levels of nested class, structure, or union definitions in a single
> struct-declaration-list ... (16)."
> In his case, I think he had 15 levels of embeded elements in his schema.
> I don't know if there is a workaround, otherwise you will need to try to
> flaten your schema (put more elements at global scope), ... or change
I thought so at the first sight but then I saw that he is using the
--morph-anonymous option which means all type nesting is flattened
automatically. As a result there should not be more than 3 levels
There are also other cases where VC++ has hard-coded limits. One
such case is a long if-else-if-else chain. Apparently, VC++ treats
them as nested scopes and if you have a couple of hundreds of those
it complains. This problem was reported with large XML Schema
enumerations and was since fixed. Also the fact that the error is
in the .cxx file suggests that the problem is not with type nesting.
We will know for sure when we see the code ;-).
Thanks for the hint!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060804/13f1a327/attachment.pgp
More information about the xsd-users