All Downloads are FREE. Search and download functionalities are using the official Maven repository.

msv.rngconverter.test.batch.writer.RELAXNGTester Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
/*
 * @(#)$Id: RELAXNGTester.java 1557 2003-05-14 18:39:15Z kk122374 $
 *
 * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * This software is the proprietary information of Sun Microsystems, Inc.  
 * Use is subject to license terms.
 * 
 */
package batch.writer;

import batch.BatchTester;
import batch.driver.IValidatorImplForRNG;
import batch.model.TestReader;

import com.sun.msv.writer.GrammarWriter;

/**
 * tests RELAX NG converter.
 * 
 * @author Kohsuke KAWAGUCHI
 */
public class RELAXNGTester extends BatchTester {

    protected TestReader createReader() {
        return new TestReader( new TestBuilderImpl(validator,
            new IValidatorImplForRNG(strict) ) {
            protected GrammarWriter getWriter() {
        		return new com.sun.msv.writer.relaxng.RELAXNGWriter();
            }
        } );
    }
    public static void main(String[] av) throws Exception {
        new RELAXNGTester().run(av);
    }

    protected void usage() {
        System.out.println(
            "usage "
                + this.getClass().getName()
                + " (relax|trex|xsd|dtd|rng) [-strict] \n"
                + "  tests RELAX NG converter by\n"
                + "  1. converting schema files of the specified type into RELAX NG\n"
                + "  2. then parse it by RELAX NG parser\n"
                + "  3. then use the test instances to ensure the correctness\n");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy