ph-schematron/src/main/java/com/helger/schematron/pure/bound/PSBoundSchemaCacheKey.java
@Nonnull
  public IPSBoundSchema createBoundSchema () throws SchematronException
  {
    // Read schema from resource
    final PSSchema aSchema = readSchema (getResource (), getErrorHandler (), getEntityResolver ());

    // Resolve the query binding to be used
    final IPSQueryBinding aQueryBinding = getQueryBinding (aSchema);

    // Pre-process schema
    final PSSchema aPreprocessedSchema = createPreprocessedSchema (aSchema, aQueryBinding);

    // And finally bind the pre-processed schema
    return aQueryBinding.bind (aPreprocessedSchema,
                               getPhase (),
                               getErrorHandler (),
                               getVariableResolver (),
                               getFunctionResolver ());
  }
@Nonnull
  public IPSBoundSchema createBoundSchema () throws SchematronException
  {
    // Read schema from resource
    final PSSchema aSchema = readSchema (getResource (), getErrorHandler (), getEntityResolver ());

    // Resolve the query binding to be used
    final IPSQueryBinding aQueryBinding = getQueryBinding (aSchema);

    // Pre-process schema
    final PSSchema aPreprocessedSchema = createPreprocessedSchema (aSchema, aQueryBinding);

    // And finally bind the pre-processed schema
    return aQueryBinding.bind (aPreprocessedSchema,
                               getPhase (),
                               getErrorHandler (),
                               getVariableResolver (),
                               getFunctionResolver ());
  }
The main routine to create a bound schema from the passed resource and
phase. The usual routine is to
<ol>
<li>read the schema from the resource - see
{@link #readSchema(IReadableResource, IPSErrorHandler, EntityResolver)}</li>
<li>resolve the query binding - see {@link #getQueryBinding(PSSchema)}</li>
<li>pre-process the schema -
{@link #createPreprocessedSchema(PSSchema, IPSQueryBinding)}</li>
<li>and finally bind it -
{@link IPSQueryBinding#bind(PSSchema, String, IPSErrorHandler, javax.xml.xpath.XPathVariableResolver, javax.xml.xpath.XPathFunctionResolver)}
</li>
</ol>

@return The bound schema. Never <code>null</code>.
@throws SchematronException
In case reading or binding fails.