- Timestamp:
- 02/09/10 18:26:36 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/NXschematron.java
r1507 r1520 44 44 private File reducedNeXusFile; 45 45 private File schematronFile; 46 private File inputNexusFile; 46 47 private boolean keepTemp; 47 48 private InputStream dsdlIncludeXSLTStream = null; … … 52 53 // "iso_abstract_expand.xsl", "iso_svrl_for_xslt2.xsl"}; 53 54 54 public NXschematron(File reducedNeXusFile, File schematronFile,55 public NXschematron(File inputNexusFile, File reducedNeXusFile, File schematronFile, 55 56 final boolean keepTemp) { 56 57 57 58 this.reducedNeXusFile = reducedNeXusFile; 58 59 this.schematronFile = schematronFile; 60 this.inputNexusFile = inputNexusFile; 59 61 this.keepTemp = keepTemp; 60 62 … … 77 79 78 80 /** 79 * Transform an XML file to som thing else given ansXSLT transformation.81 * Transform an XML file to something else given an XSLT transformation. 80 82 * @param inputFilename the XML input file name. 81 83 * @param xslFilename the xslt file name. … … 92 94 93 95 /** 94 * Transform an XML file to som thing else given ansXSLT transformation.96 * Transform an XML file to something else given an XSLT transformation. 95 97 * @param inputFile the XML input file 96 98 * @param xslFile the xslt file. … … 178 180 179 181 // 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"); 181 187 182 188 if (!this.keepTemp) { … … 192 198 193 199 public static void main(String[] args) { 194 if (args.length != 2) {195 System.out.println("Must specify t woinput files");200 if (args.length != 3) { 201 System.out.println("Must specify three input files"); 196 202 return; 197 203 } 198 204 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); 201 207 File results = sch.validate(); 202 208 System.out.println(results.getAbsolutePath());
Note: See TracChangeset
for help on using the changeset viewer.
