Search in sources :

Example 1 with SchemaFactory

use of com.thaiopensource.relaxng.SchemaFactory in project camel by apache.

the class JingEndpoint method doStart.

@Override
protected void doStart() throws Exception {
    super.doStart();
    if (inputSource == null) {
        ObjectHelper.notEmpty(resourceUri, "resourceUri", this);
        InputStream inputStream = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(), resourceUri);
        inputSource = new InputSource(inputStream);
    }
    if (schemaFactory == null) {
        schemaFactory = new SchemaFactory();
        schemaFactory.setCompactSyntax(compactSyntax);
        schemaFactory.setXMLReaderCreator(new Jaxp11XMLReaderCreator());
    }
    if (schema == null) {
        schema = schemaFactory.createSchema(inputSource);
    }
}
Also used : SchemaFactory(com.thaiopensource.relaxng.SchemaFactory) InputSource(org.xml.sax.InputSource) Jaxp11XMLReaderCreator(com.thaiopensource.xml.sax.Jaxp11XMLReaderCreator) InputStream(java.io.InputStream)

Aggregations

SchemaFactory (com.thaiopensource.relaxng.SchemaFactory)1 Jaxp11XMLReaderCreator (com.thaiopensource.xml.sax.Jaxp11XMLReaderCreator)1 InputStream (java.io.InputStream)1 InputSource (org.xml.sax.InputSource)1