[xsd-users] Attribute list as a C++ list of token
Boris Kolpackov
boris at codesynthesis.com
Thu Jun 21 05:00:16 EDT 2012
Hi Joël,
[CC'ed xsd-users.]
Klaim - Joël Lamotte <mjklaim at gmail.com> writes:
> But then I cannot have either a list of values or a unique special value,
> right?
Right. The other alternative would be to provide a custom stage_ref_ex
class implementation that would determine what kind value it is and
parse/serialize accordingly. Something along these lines:
class stage_ref_ex: public stage_ref_list
{
...
bool special () const;
void special (bool);
private:
bool special_;
};
Then in the parsing constructor you would check whether the element
or attribute text is the special "#all" value. If it is, then you
set the special_ flag. Otherwise, you simply delegate to the
stage_ref_list parsing c-tor. Similar logic will also need to be
implemented in the serialization operator.
Boris
More information about the xsd-users
mailing list