> > <list containsOnly="ucd">
> > <ucd> foo </ucd>
> > <ucd> bar </ucd>
> > </list>
>
> This is a "type-safe" list in that one declares (enforces?) it to have only
> certain types of children; that would be great if it can be done such that
> all validation is done by the XML parser (ie. well-formed and conforming to
> an XSD). Any gurus know how to do that??
If you use JAXB to generate the Java source classes that correspond to the XML elements from the schema that you end up with type-safe lists automatically. For example, VODescription has a list that can only contain GenericResource objects; however, the checking only comes when you try and marshal the Java objects back to XML. Received on 2003-08-13Z01:00:33