Examples of XSFactoryImpl


Examples of com.sun.msv.verifier.jarv.XSFactoryImpl

       
        // under the multi-thread environment, more than once s4s could be loaded.
        // it's a waste of resource, but by no means fatal.
        if(xmlSchema4XmlSchema==null) {
            try {
                XSFactoryImpl factory = new XSFactoryImpl();
                factory.setEntityResolver( new EntityResolver() {
                    public InputSource resolveEntity( String publicId, String systemId ) {
                        if(systemId.endsWith("datatypes.xsd"))
                            return new InputSource(XMLSchemaReader.class.getResourceAsStream(
                                "datatypes.xsd"));
                        if(systemId.endsWith("xml.xsd"))
                            return new InputSource(XMLSchemaReader.class.getResourceAsStream(
                                "xml.xsd"));
                        System.out.println("unexpected system ID: "+systemId);
                        return null;
                    }
                });
                xmlSchema4XmlSchema = factory.compileSchema(
                        XMLSchemaReader.class.getResourceAsStream("xmlschema.xsd"));
            } catch( Exception e ) {
                e.printStackTrace();
                throw new Error("unable to load schema-for-schema for W3C XML Schema");
            }
View Full Code Here

Examples of com.sun.msv.verifier.jarv.XSFactoryImpl

       
        // under the multi-thread environment, more than once s4s could be loaded.
        // it's a waste of resource, but by no means fatal.
        if(xmlSchema4XmlSchema==null) {
            try {
                XSFactoryImpl factory = new XSFactoryImpl();
                factory.setEntityResolver( new EntityResolver() {
                    public InputSource resolveEntity( String publicId, String systemId ) {
                        if(systemId.endsWith("datatypes.xsd"))
                            return new InputSource(XMLSchemaReader.class.getResourceAsStream(
                                "datatypes.xsd"));
                        if(systemId.endsWith("xml.xsd"))
                            return new InputSource(XMLSchemaReader.class.getResourceAsStream(
                                "xml.xsd"));
                        System.out.println("unexpected system ID: "+systemId);
                        return null;
                    }
                });
                xmlSchema4XmlSchema = factory.compileSchema(
                        XMLSchemaReader.class.getResourceAsStream("xmlschema.xsd"));
            } catch( Exception e ) {
                e.printStackTrace();
                throw new Error("unable to load schema-for-schema for W3C XML Schema");
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.