Examples of XmlValidationHandler


Examples of com.sun.enterprise.tools.verifier.util.XMLValidationHandler

  smh = StringManagerHelper.getLocalStringsManager();
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  try {
       factory.setAttribute("http://apache.org/xml/features/allow-java-encodings", new Boolean(true));
      builder = factory.newDocumentBuilder();
      EntityResolver dh = new XMLValidationHandler(false);
      builder.setEntityResolver(dh);
  } catch (ParserConfigurationException e) {
      logger.log(Level.SEVERE, getClass().getName() + ".Exception",
        new Object[] {e.toString()});
      result.failed(smh.getLocalString
View Full Code Here

Examples of com.sun.enterprise.tools.verifier.util.XMLValidationHandler

                    try {
                        builder = factory.newDocumentBuilder();
                    } catch (ParserConfigurationException e) {
                        logger.log(Level.SEVERE, e.getMessage());
                    }
                    EntityResolver dh = new XMLValidationHandler(true);
                    ErrorHandler eh = new XMLValidationHandler(true);
                    builder.setErrorHandler(eh);
                    builder.setEntityResolver(dh);
                    uninitialised = true;
                }
            }
View Full Code Here

Examples of com.sun.enterprise.tools.verifier.util.XMLValidationHandler

    protected void createDOMObject(InputSource source, String dd)
            throws ParserConfigurationException, SAXException, IOException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware(true);
        DocumentBuilder builder = factory.newDocumentBuilder();
        EntityResolver dh = new XMLValidationHandler(false);
        builder.setEntityResolver(dh);
        Document document = builder.parse(source);

        if ((dd.indexOf("sun-")) < 0) { // NOI18N
            if ((dd.indexOf("webservices")) < 0) { // NOI18N
View Full Code Here

Examples of com.sun.enterprise.tools.verifier.util.XMLValidationHandler

            SAXParserFactory spf = SAXParserFactory.newInstance();
            spf.setValidating(true);
            // ValidatingParser p = new ValidatingParser();
            XMLReader p = spf.newSAXParser().getXMLReader();
//            XMLErrorHandler eh = new XMLErrorHandler(null);
            p.setErrorHandler(new XMLValidationHandler());
            p.parse(source);
            return true;

        } catch (Exception e) {
            return false;
View Full Code Here

Examples of com.sun.enterprise.tools.verifier.util.XMLValidationHandler

    protected void createDOMObject(InputSource source, String dd)
            throws ParserConfigurationException, SAXException, IOException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware(true);
        DocumentBuilder builder = factory.newDocumentBuilder();
        EntityResolver dh = new XMLValidationHandler(false);
        builder.setEntityResolver(dh);
        Document document = builder.parse(source);

        if ((dd.indexOf("sun-")) < 0) { // NOI18N
            if ((dd.indexOf("webservices")) < 0) { // NOI18N
View Full Code Here

Examples of com.sun.enterprise.tools.verifier.util.XMLValidationHandler

                    try {
                        builder = factory.newDocumentBuilder();
                    } catch (ParserConfigurationException e) {
                        logger.log(Level.SEVERE, e.getMessage());
                    }
                    EntityResolver dh = new XMLValidationHandler(true);
                    ErrorHandler eh = new XMLValidationHandler(true);
                    builder.setErrorHandler(eh);
                    builder.setEntityResolver(dh);
                    uninitialised = true;
                }
            }
View Full Code Here

Examples of com.sun.enterprise.tools.verifier.util.XMLValidationHandler

  smh = StringManagerHelper.getLocalStringsManager();
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  try {
       factory.setAttribute("http://apache.org/xml/features/allow-java-encodings", new Boolean(true));
      builder = factory.newDocumentBuilder();
      EntityResolver dh = new XMLValidationHandler(false);
      builder.setEntityResolver(dh);
  } catch (ParserConfigurationException e) {
      logger.log(Level.SEVERE, getClass().getName() + ".Exception",
        new Object[] {e.toString()});
      result.failed(smh.getLocalString
View Full Code Here

Examples of org.apache.maven.plugin.changes.schema.XmlValidationHandler

            return;
        }

        try
        {
            XmlValidationHandler xmlValidationHandler = changesSchemaValidator
                .validateXmlWithSchema( xmlPath, changesXsdVersion, failOnError );
            boolean hasErrors = !xmlValidationHandler.getErrors().isEmpty();
            if ( hasErrors )
            {
                logSchemaValidation( xmlValidationHandler.getErrors() );
                if ( failOnError )
                {
                    throw new MojoExecutionException( "changes.xml file " + xmlPath.getAbsolutePath()
                        + " is not valid, see previous errors." );
                }
View Full Code Here

Examples of org.apache.maven.plugin.changes.schema.XmlValidationHandler

                return;
            }

            try
            {
                XmlValidationHandler xmlValidationHandler = changesSchemaValidator
                    .validateXmlWithSchema( xmlPath, changesXsdVersion, failOnError );
                boolean hasErrors = !xmlValidationHandler.getErrors().isEmpty();
                if ( hasErrors )
                {
                    logSchemaValidation( xmlValidationHandler.getErrors() );
                    if ( failOnError )
                    {
                        throw new MojoExecutionException( "changes.xml file " + xmlPath.getAbsolutePath()
                            + " is not valid, see previous errors." );
                    }
View Full Code Here

Examples of org.apache.maven.plugin.changes.schema.XmlValidationHandler

                return;
            }

            try
            {
                XmlValidationHandler xmlValidationHandler = changesSchemaValidator
                    .validateXmlWithSchema( xmlPath, changesXsdVersion, failOnError );
                boolean hasErrors = !xmlValidationHandler.getErrors().isEmpty();
                if ( hasErrors )
                {
                    logSchemaValidation( xmlValidationHandler.getErrors() );
                    if ( failOnError )
                    {
                        throw new MojoExecutionException( "changes.xml file " + xmlPath.getAbsolutePath()
                            + " is not valid, see previous errors." );
                    }
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.