* @throws IOException on error reading schemas
*/
public static SchemaElement[] load(Collection resolves, String uri, ValidationContext vctx)
throws JiBXException, IOException {
IBindingFactory factory = BindingDirectory.getFactory(SchemaUtils.XS_PREFIX_BINDING, SchemaElement.class);
IUnmarshallingContext ictx = factory.createUnmarshallingContext();
int count = resolves.size();
int offset = 0;
SchemaElement[] schemas = new SchemaElement[count];
for (Iterator iter = resolves.iterator(); iter.hasNext();) {
// unmarshal document to construct schema structure
ISchemaResolver resolver = (ISchemaResolver)iter.next();
ictx.setDocument(resolver.getContent(), resolver.getName(), null);
ictx.setUserContext(vctx);
SchemaElement schema = new SchemaElement();
((IUnmarshallable)schema).unmarshal(ictx);
// set resolver for use during schema processing
schemas[offset++] = schema;