You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to make a ISchematronResource out of an Inputstream instead of just a file
I couldn't find anywhere a way to do that, the only solution for me wold be to write a temp file and then use that to create the ISchematronResource and then validate the xml
Instead of this SchematronResource aResSCH = SchematronResourceSCH.fromFile( file );
i would need something like this ISchematronResource aResSCH = SchematronResourceSCH.fromInputStream( inputStream );
If that is just not possible then I guess I'll write a temp file...
The text was updated successfully, but these errors were encountered:
cshjsc
changed the title
InputStream instead of file
[question] InputStream instead of file
Nov 24, 2021
Thanks. Good point - I will add this to the next version.
In the meantime you can build this factory method yourself like this:
/** * Create a new {@link SchematronResourceSCH} from Schematron rules provided * by an arbitrary {@link InputStream}.<br> * <b>Important:</b> in this case, no include resolution will be performed!! * * @param sResourceID * Resource ID to be used as the cache key. Should neither be * <code>null</code> nor empty. * @param aSchematronIS * The {@link InputStream} to read the Schematron rules from. May not * be <code>null</code>. * @return Never <code>null</code>. * @since 6.2.6 */@NonnullpublicstaticSchematronResourceSCHfromInputStream (@Nonnull@NonemptyfinalStringsResourceID,
@NonnullfinalInputStreamaSchematronIS)
{
returnnewSchematronResourceSCH (newReadableResourceInputStream (sResourceID, aSchematronIS));
}
Is there a way to make a ISchematronResource out of an Inputstream instead of just a file
I couldn't find anywhere a way to do that, the only solution for me wold be to write a temp file and then use that to create the ISchematronResource and then validate the xml
Instead of this
SchematronResource aResSCH = SchematronResourceSCH.fromFile( file );
i would need something like this
ISchematronResource aResSCH = SchematronResourceSCH.fromInputStream( inputStream );
If that is just not possible then I guess I'll write a temp file...
The text was updated successfully, but these errors were encountered: