[xsd-users] unnamed sequence of sequence

Boris Kolpackov boris at codesynthesis.com
Tue Jul 13 12:13:05 EDT 2010


Hi Emiliano,

Emiliano Leporati <emiliano.leporati at gmail.com> writes:
 
> this XML fragment does not seem to match the XSD definition, and moreover,
> having four distinct sequences lets us put different number of values for
> every element ( one EventPCRIndex, two EventClass, three EventValue and no
> EventPCRValue for example).
> 
> am I misinterpreting something or is this a bug in the xsd tool?

This is a deliberate design choice in the C++/Tree mapping. For more
information, please see:

http://www.codesynthesis.com/pipermail/xsd-users/2007-March/000863.html


> is there a simple workaround to achieve the desired result,

The following post list a number of possible solutions to a very similar
problem (unbounded choice). They all apply to your case as well:

http://codesynthesis.com/pipermail/xsd-users/2010-March/002741.html


> for example giving a name to the inner sequence by defining it as 
> a separate element ?

Yes, this is one of the solution, probably the simplest one.

Let me know if you still have any questions after reading the above
two posts.

Boris



More information about the xsd-users mailing list