On 01.04.2013 05:04, Michael T. Pope wrote: > I have a schema problem. If we are transitioning from using "ID" to > "id", we need to accept both for the time being. However I do not see > how to express this in the schema. In the absence of a better idea, > currently I am doing something like this: > > <xs:element name="aiPlayer"> > <xs:complexType> > <xs:attribute name="id" type="PlayerId" use="required"/> > <!-- @compat 0.10.7 --> > <xs:attribute name="ID" type="PlayerId" use="optional"/> > <!-- end @compat --> > </xs:complexType> > </xs:element> > > but what is needed is a way to say that one of "id" and "ID" is > required. > > Cheers, > Mike Pope >
I think <xs:element name="aiPlayer"> <xs:complexType> <xs:choice> <xs:attribute name="id" type="PlayerId"/> <!-- @compat 0.10.7 --> <xs:attribute name="ID" type="PlayerId"/> <!-- end @compat --> </xs:choice> </xs:complexType> </xs:element> should do the trick. Regards Michael ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers