Search in sources :

Example 1 with XMLSchemaFactory

use of org.apache.xerces.jaxp.validation.XMLSchemaFactory in project webtools.sourceediting by eclipse.

the class MiscFunctionsTest method loadSchema.

private Schema loadSchema() throws SAXException {
    String schemaFile = "/TestSources/id.xsd";
    SchemaFactory schemaFactory = new XMLSchemaFactory();
    URL schemaURL = bundle.getEntry(schemaFile);
    Schema jaxpschema = schemaFactory.newSchema(schemaURL);
    return jaxpschema;
}
Also used : SchemaFactory(javax.xml.validation.SchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) Schema(javax.xml.validation.Schema) URL(java.net.URL)

Example 2 with XMLSchemaFactory

use of org.apache.xerces.jaxp.validation.XMLSchemaFactory in project webtools.sourceediting by eclipse.

the class NumericEqualSITest method loadSchema.

private Schema loadSchema() throws SAXException {
    String schemaFile = "/TestSources/userdefined.xsd";
    SchemaFactory schemaFactory = new XMLSchemaFactory();
    URL schemaURL = bundle.getEntry(schemaFile);
    Schema jaxpschema = schemaFactory.newSchema(schemaURL);
    return jaxpschema;
}
Also used : SchemaFactory(javax.xml.validation.SchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) Schema(javax.xml.validation.Schema) URL(java.net.URL)

Example 3 with XMLSchemaFactory

use of org.apache.xerces.jaxp.validation.XMLSchemaFactory in project webtools.sourceediting by eclipse.

the class SeqExprCastSITest method loadSchema.

private Schema loadSchema() throws SAXException {
    String schemaFile = "/TestSources/userdefined.xsd";
    SchemaFactory schemaFactory = new XMLSchemaFactory();
    URL schemaURL = bundle.getEntry(schemaFile);
    Schema jaxpschema = schemaFactory.newSchema(schemaURL);
    return jaxpschema;
}
Also used : SchemaFactory(javax.xml.validation.SchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) Schema(javax.xml.validation.Schema) URL(java.net.URL)

Example 4 with XMLSchemaFactory

use of org.apache.xerces.jaxp.validation.XMLSchemaFactory in project webservices-axiom by apache.

the class TestValidator method runTest.

protected void runTest() throws Throwable {
    SchemaFactory factory = new XMLSchemaFactory();
    DocumentBuilder builder = dbf.newDocumentBuilder();
    Schema schema = factory.newSchema(new DOMSource(builder.parse(TestValidator.class.getResourceAsStream("ipo.xsd"))));
    Validator validator = schema.newValidator();
    validator.validate(new DOMSource(builder.parse(TestValidator.class.getResourceAsStream("ipo_1.xml"))));
}
Also used : SchemaFactory(javax.xml.validation.SchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) DOMSource(javax.xml.transform.dom.DOMSource) DocumentBuilder(javax.xml.parsers.DocumentBuilder) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) Schema(javax.xml.validation.Schema) Validator(javax.xml.validation.Validator)

Example 5 with XMLSchemaFactory

use of org.apache.xerces.jaxp.validation.XMLSchemaFactory in project webtools.sourceediting by eclipse.

the class SeqExprCastSITest method loadAtomicSchema.

private Schema loadAtomicSchema() throws SAXException {
    String schemaFile = "/TestSources/atomic.xsd";
    SchemaFactory schemaFactory = new XMLSchemaFactory();
    URL schemaURL = bundle.getEntry(schemaFile);
    Schema jaxpschema = schemaFactory.newSchema(schemaURL);
    return jaxpschema;
}
Also used : SchemaFactory(javax.xml.validation.SchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) XMLSchemaFactory(org.apache.xerces.jaxp.validation.XMLSchemaFactory) Schema(javax.xml.validation.Schema) URL(java.net.URL)

Aggregations

XMLSchemaFactory (org.apache.xerces.jaxp.validation.XMLSchemaFactory)9 Schema (javax.xml.validation.Schema)8 SchemaFactory (javax.xml.validation.SchemaFactory)8 URL (java.net.URL)7 DocumentBuilder (javax.xml.parsers.DocumentBuilder)1 DOMSource (javax.xml.transform.dom.DOMSource)1 Validator (javax.xml.validation.Validator)1 ValidatorHandler (javax.xml.validation.ValidatorHandler)1 ConfigurationException (nl.nn.adapterframework.configuration.ConfigurationException)1 XMLSchema11Factory (org.apache.xerces.jaxp.validation.XMLSchema11Factory)1 SecurityManager (org.apache.xerces.util.SecurityManager)1 SAXException (org.xml.sax.SAXException)1 SAXNotRecognizedException (org.xml.sax.SAXNotRecognizedException)1 SAXNotSupportedException (org.xml.sax.SAXNotSupportedException)1