Ignore:
Timestamp:
02/09/10 18:26:36 (21 months ago)
Author:
Stephen Rankin
Message:

Added save results feature and single file checking (NXDL). Update of Javadocs. ref#236.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/NXschematron.java

    r1507 r1520  
    4444    private File reducedNeXusFile; 
    4545    private File schematronFile; 
     46    private File inputNexusFile; 
    4647    private boolean keepTemp; 
    4748    private InputStream dsdlIncludeXSLTStream = null; 
     
    5253    //    "iso_abstract_expand.xsl", "iso_svrl_for_xslt2.xsl"}; 
    5354 
    54     public NXschematron(File reducedNeXusFile, File schematronFile, 
     55    public NXschematron(File inputNexusFile, File reducedNeXusFile, File schematronFile, 
    5556            final boolean keepTemp) { 
    5657 
    5758        this.reducedNeXusFile = reducedNeXusFile; 
    5859        this.schematronFile = schematronFile; 
     60        this.inputNexusFile = inputNexusFile; 
    5961        this.keepTemp = keepTemp; 
    6062 
     
    7779 
    7880    /** 
    79      * Transform an XML file to somthing else given ans XSLT transformation. 
     81     * Transform an XML file to something else given an XSLT transformation. 
    8082     * @param inputFilename the XML input file name. 
    8183     * @param xslFilename the xslt file name. 
     
    9294 
    9395    /** 
    94      * Transform an XML file to somthing else given ans XSLT transformation. 
     96     * Transform an XML file to something else given an XSLT transformation. 
    9597     * @param inputFile the XML input file 
    9698     * @param xslFile the xslt file. 
     
    178180 
    179181        // Now lets validate the actual reduced file. 
    180         File resultsFile = File.createTempFile("result", ".xml"); 
     182        //File resultsFile = File.createTempFile(inputNexusFile.getName() + ".result", ".xml"); 
     183 
     184        //File resultsFile = File.createTempFile(inputNexusFile.getName(). + ".result", ".xml"); 
     185 
     186        File resultsFile = new File(reducedNeXusFile.getName().replaceAll(".reduced", "") + ".result"); 
    181187 
    182188        if (!this.keepTemp) { 
     
    192198 
    193199    public static void main(String[] args) { 
    194         if (args.length != 2) { 
    195             System.out.println("Must specify two input files"); 
     200        if (args.length != 3) { 
     201            System.out.println("Must specify three input files"); 
    196202            return; 
    197203        } 
    198204        try { 
    199             NXschematron sch = new NXschematron( 
    200                     new File(args[0]), new File(args[1]), false); 
     205            NXschematron sch = new NXschematron(new File(args[0]), 
     206                    new File(args[1]), new File(args[2]), false); 
    201207            File results = sch.validate(); 
    202208            System.out.println(results.getAbsolutePath()); 
Note: See TracChangeset for help on using the changeset viewer.