private XmlSchema newXmlSchemaInCollection(XmlSchemaCollection collection, String namespaceURI) {
StringBuffer tinyXmlSchemaDocument = new StringBuffer();
tinyXmlSchemaDocument.append("<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema' ");
tinyXmlSchemaDocument.append("targetNamespace='" + namespaceURI + "'/>");
StringReader reader = new StringReader(tinyXmlSchemaDocument.toString());
return collection.read(reader, new ValidationEventHandler() { });
}