[xsd-users] Attribute list as a C++ list of token

Boris Kolpackov boris at codesynthesis.com
Wed Jun 20 09:52:38 EDT 2012


Hi Joël,

Klaim - Joël Lamotte <mjklaim at gmail.com> writes:

>  <xs:union memberTypes="aos:stage_ref_list aos:special_stage_ref" />
> 
> So here I wanted to ask if it would be possible in the case of a list
> attribute being used (in a union or not), to provide some kind of iterator
> that would allow going through the tokens?

XSD maps xs:list to a C++ sequence container. It is xs:union that spoils
things. In C++/Tree unions are always mapped to a string. Providing a more
elaborate mapping is not trivial and will require full-blown validation to
determine which member type it is.

So if you want a nice list, try to get rid of the union.

Boris



More information about the xsd-users mailing list