Examples of XMLValidator


Examples of au.edu.qut.yawl.unmarshal.XMLValidator

     * @param rawDecompositionData the raw decomposition data
     * @throws au.edu.qut.yawl.exceptions.YDataStateException if data does not pass validation.
     */
    public static void validateDataAgainstTypes(String schema, Element rawDecompositionData, String source)
            throws YDataStateException {
        XMLValidator validator = new XMLValidator();
        XMLOutputter output = new XMLOutputter(Format.getPrettyFormat());

        String dataInput = output.outputString(rawDecompositionData);

        String errors = validator.checkSchema(
                schema,
                dataInput);

        if (errors.length() > 0) {
            throw new YDataValidationException(
View Full Code Here

Examples of com.adobe.epubcheck.xml.XMLValidator

 
  @Override
  protected void initValidators()
  {
    opfValidators.clear();
    opfValidators.add(new XMLValidator("schema/30/package-30.rnc"));
    opfValidators.add(new XMLValidator("schema/30/package-30.sch"));
    opfValidators.add(new XMLValidator("schema/30/collection-do-30.sch"));
    opfValidators.add(new XMLValidator("schema/30/collection-manifest-30.sch"));
    if (opfData != null && opfData.getTypes().contains(OPFData.DC_TYPE_EDUPUB))
    {
      opfValidators.add(new XMLValidator("schema/30/edupub/edu-opf.sch"));
    }
  }
View Full Code Here

Examples of com.spoledge.util.xml.XMLValidator

    /**
     * Validates source XML.
     */
    public void validate( Reader reader ) throws Exception {
        XMLValidator xv = getXMLValidator();
        XMLValidatorInstance xvi = xv.validate( reader );

        if (xvi.isInvalid()) throw xvi.getParseException();
    }
View Full Code Here

Examples of com.spoledge.util.xml.XMLValidator

    private static XMLValidator getXMLValidator() {
        synchronized (Generator.class) {
            if (xmlValidator == null) {
                try {
                    xmlValidator = new XMLValidator( Generator.class.getResource( XSD_RESOURCES + "/audao.xsd" ));
                }
                catch (Exception e) {
                    LogFactory.getLog( Generator.class ).error("getXMLValidator(): ", e);
                }
            }
View Full Code Here

Examples of com.sun.messaging.jmq.jmsclient.validation.XMLValidator

            //do validation here
            if (debug) {
              Debug.println("*** Validating xml message ....");
            }
           
            XMLValidator validator = (XMLValidator) this.xmlValidationTable.get(dest);
            String xml = ((TextMessage) message).getText();
            validator.validate(xml);
           
            if (debug) {
              Debug.println("*** xml message validated against xsd at URI: " + validator.getURIList());
            }
          }
        } else {
          if (debug) {
            Debug.println("***** no validation for message ... on dest: " + dest.getName() );
View Full Code Here

Examples of com.sun.messaging.jmq.jmsclient.validation.XMLValidator

          shouldValidate = ((Boolean)validateObj).booleanValue();
        }
       
        if (shouldValidate) {
         
          XMLValidator validator = null;
          String xsdURIList = null;
         
          Object uriobj = ackProperties.get("JMQXMLSchemaURIList");
         
          if (uriobj != null) {
            xsdURIList = (String)uriobj;
           
            //minimum length of a valid uri
            validator = ValidatorFactory.newValidator(xsdURIList);
           
            //set reloadXSDOnFailure flag
            Object reloadObj = ackProperties.get("JMQReloadXMLSchemaOnFailure");
            if (reloadObj != null) {
              boolean doReload = ((Boolean)reloadObj).booleanValue();
              validator.setReloadOnFailure(doReload);
            }
           
          } else {
            validator = ValidatorFactory.newValidator();
          }
View Full Code Here

Examples of oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLValidator

                // there is no conflicting metadata (from other
                // persistence unit metadata)
                MetadataPersistenceUnit existingPersistenceUnit = m_project.getPersistenceUnit();
                if (existingPersistenceUnit != null) {
                    if (! existingPersistenceUnit.equals(persistenceUnit)) {
                        (new XMLValidator()).throwPersistenceUnitMetadataConflict(existingPersistenceUnit.getConflict());
                    }
                } else {
                    m_project.setPersistenceUnit(persistenceUnit);
                }
            }
View Full Code Here

Examples of oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLValidator

     * {@link MetadataProject}.
     * @param throwExceptionOnFail
     */
    public void readMappingFiles(boolean throwExceptionOnFail) {
        // Initialize the correct contextual objects.
        m_validator = new XMLValidator();

        // step #1: discover all the standard XML mapping files.
        Map<URL, Document> list = readStandardMappingFiles();

        // step #2: add URLs corresponding to explicitly specified files
View Full Code Here

Examples of org.apache.maven.doxia.util.XmlValidator

            catch ( IOException e )
            {
                throw new ParseException( "Error reading the model: " + e.getMessage(), e );
            }

            new XmlValidator( getLog() ).validate( content );

            src = new StringReader( content );
        }

        // 2 second parsing to process
View Full Code Here

Examples of org.apache.maven.doxia.util.XmlValidator

        try
        {
            String content = IOUtil.toString( new BufferedReader( source ) );

            new XmlValidator( new PlexusLoggerWrapper( getLogger() ) ).validate( content );

            return new StringReader( content );
        }
        finally
        {
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.