ph-schematron/src/main/java/com/helger/schematron/pure/exchange/PSWriter.java
@Nonnull
  public ESuccess writeToStream (@Nonnull final IPSElement aPSElement, @Nonnull @WillClose final OutputStream aOS)
  {
    ValueEnforcer.notNull (aPSElement, "PSElement");
    final IMicroElement eXML = aPSElement.getAsMicroElement ();
    return MicroWriter.writeToStream (getAsDocument (eXML), aOS, m_aWriterSettings.getXMLWriterSettings ());
  }
@Nonnull
  public ESuccess writeToStream (@Nonnull final IPSElement aPSElement, @Nonnull @WillClose final OutputStream aOS)
  {
    ValueEnforcer.notNull (aPSElement, "PSElement");
    final IMicroElement eXML = aPSElement.getAsMicroElement ();
    return MicroWriter.writeToStream (getAsDocument (eXML), aOS, m_aWriterSettings.getXMLWriterSettings ());
  }
Write the passed Schematron element to the passed output stream.

@param aPSElement
The schematron element to write. May not be <code>null</code>.
@param aOS
The output stream to write things to. May not be <code>null</code>.
The stream is automatically closed.
@return {@link ESuccess}.