code: public Schema createSchema(InputSource in) throws IOException, SAXException, IncorrectSchemaException {
      SchemaReader r = compactSyntax ? CompactSchemaReader.getInstance() : autoSchemaLanguage;
      return r.createSchema(in, properties.toPropertyMap());
    }
docs: Creates a schema by parsing an XML document.  A non-null <code>XMLReaderCreator</code> must be specified
  with <code>setXMLReaderCreator</code> before calling <code>createSchema</code>.  The <code>ErrorHandler</code>
  is allowed to be <code>null</code>. The <code>DatatypeLibraryFactory</code> is allowed to be <code>null</code>.
  
  <p>Normally, if a schema cannot be created, <code>createSchema</code> will throw
  a <code>IncorrectSchemaException</code>; however,
  before doing so, one or more errors will be reported using the <code>ErrorHandler</code> if it is non-null.  If the
  <code>ErrorHandler</code> throws a <code>SAXException</code>, then <code>createSchema</code> will pass this
  through rather than throwing a <code>IncorrectSchemaException</code>. Similarly, if <code>XMLReader.parse</code>
  throws a <code>SAXException</code> or <code>IOException</code>, then <code>createSchema</code> will pass
  this through rather than throwing a <code>IncorrectSchemaException</code>. Thus, if an error handler
  is specified that reports errors to the user, there is no need to report any additional message to the
  user if <code>createSchema</code> throws <code>IncorrectSchemaException</code>.
  
  @param in the <code>InputSource</code> containing the XML document to be parsed;
  must not be <code>null</code>
  @return the <code>Schema</code> constructed from the XML document;
  never <code>null</code>.
  
  @throws IOException if an I/O error occurs
  @throws SAXException if there is an XML parsing error and the XMLReader or ErrorHandler
  throws a SAXException
  @throws com.thaiopensource.validate.IncorrectSchemaException if the XML document was not a correct RELAX NG schema
  @throws NullPointerException if the current XMLReaderCreator is <code>null</code>