ph-schematron/src/main/java/com/helger/schematron/SchematronHelper.java
@Nullable
  public static IMicroDocument getWithResolvedSchematronIncludes (@Nonnull final IReadableResource aResource,
                                                                  @Nullable final ISAXReaderSettings aSettings,
                                                                  @Nonnull final IPSErrorHandler aErrorHandler)
  {
    final InputSource aIS = InputSourceFactory.create (aResource);
    final IMicroDocument aDoc = MicroReader.readMicroXML (aIS, aSettings);
    if (aDoc != null)
    {
      // Resolve all Schematron includes
      if (_recursiveResolveAllSchematronIncludes (aDoc.getDocumentElement (),
                                                  aResource,
                                                  aSettings,
                                                  aErrorHandler).isFailure ())
      {
        // Error resolving includes
        return null;
      }
    }
    return aDoc;
  }
@Nullable
  public static IMicroDocument getWithResolvedSchematronIncludes (@Nonnull final IReadableResource aResource,
                                                                  @Nullable final ISAXReaderSettings aSettings,
                                                                  @Nonnull final IPSErrorHandler aErrorHandler)
  {
    final InputSource aIS = InputSourceFactory.create (aResource);
    final IMicroDocument aDoc = MicroReader.readMicroXML (aIS, aSettings);
    if (aDoc != null)
    {
      // Resolve all Schematron includes
      if (_recursiveResolveAllSchematronIncludes (aDoc.getDocumentElement (),
                                                  aResource,
                                                  aSettings,
                                                  aErrorHandler).isFailure ())
      {
        // Error resolving includes
        return null;
      }
    }
    return aDoc;
  }
Resolve all Schematron includes of the passed resource.

@param aResource
The Schematron resource to read. May not be <code>null</code>.
@param aSettings
The SAX reader settings to be used. May be <code>null</code> to use
the default settings.
@param aErrorHandler
The error handler to be used. May not be <code>null</code>.
@return <code>null</code> if the passed resource could not be read as XML
document