Examples of XMLSchemaValidator

@xerces.internal @author Sandy Gao IBM @author Elena Litani IBM @author Andy Clark IBM @author Neeraj Bajaj, Sun Microsystems, inc. @version $Id: XMLSchemaValidator.java,v 1.16 2010-11-01 04:39:55 joehw Exp $
  • mf.org.apache.xerces.impl.xs.XMLSchemaValidator
    rg/sax/features/validation
  • http://apache.org/xml/properties/internal/symbol-table
  • http://apache.org/xml/properties/internal/error-reporter
  • http://apache.org/xml/properties/internal/entity-resolver
  • @xerces.internal @author Sandy Gao IBM @author Elena Litani IBM @author Andy Clark IBM @author Neeraj Bajaj, Sun Microsystems, inc. @version $Id: XMLSchemaValidator.java 1024038 2010-10-18 22:06:35Z sandygao $
  • org.apache.xerces.impl.xs.XMLSchemaValidator
    rg/sax/features/validation
  • http://apache.org/xml/properties/internal/symbol-table
  • http://apache.org/xml/properties/internal/error-reporter
  • http://apache.org/xml/properties/internal/entity-resolver
  • @author Sandy Gao IBM @author Elena Litani IBM @author Andy Clark IBM @author Neeraj Bajaj, Sun Microsystems, inc. @version $Id: XMLSchemaValidator.java,v 1.121 2002/11/08 19:38:16 sandygao Exp $
  • org.eclipse.wst.wsi.internal.core.xml.schema.XMLSchemaValidator
    This class is used to validate an XML Schema. @author Peter Brittenham (peterbr@us.ibm.com) @version 1.0.1
  • org.jboss.metadata.parser.util.XMLSchemaValidator

  • Examples of org.jboss.metadata.parser.util.XMLSchemaValidator

                    final XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);

                    WebMetaData webMetaData = WebMetaDataParser.parse(xmlReader, dtdInfo, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));

                    if (schemaValidation && webMetaData.getSchemaLocation() != null) {
                        XMLSchemaValidator validator = new XMLSchemaValidator(new XMLResourceResolver());
                        InputStream xmlInput = webXml.openStream();
                        try {
                            if (webMetaData.is23())
                                validator.validate("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", xmlInput);
                            else if(webMetaData.is24())
                                validator.validate("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", xmlInput);
                            else if (webMetaData.is25())
                                validator.validate("http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd", xmlInput);
                            else if (webMetaData.is30())
                                validator.validate("http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd", xmlInput);
                            else if (webMetaData.is31())
                                validator.validate("http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd", xmlInput);
                            else
                                validator.validate("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", xmlInput);
                        } catch (SAXException e) {
                            throw new DeploymentUnitProcessingException("Failed to validate " + webXml, e);
                        } finally {
                            xmlInput.close();
                        }
    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.