|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.util.MultiXML
public class MultiXML
Utility class which takes a single XML file and writes it out to a number of new XML/HTML files. Each <filesection> element in the file is written to a new file, with the name taken from the filesection's file attribute. Anything outside of a filesection is ignored. Filesection elements should not be nested.
Other attributes of the filesection element are used to set output properties for the XML transformation:
This class is intended for use when you are doing an XSLT-based transformation which you would like to produce multiple output files from a single input file.
Constructor Summary | |
---|---|
MultiXML()
Default constructor. |
Method Summary | |
---|---|
Map |
getParams()
Returns the map of parameters which will be used to affect the stylesheet transformation. |
static void |
main(String[] args)
Runs the transformation. |
void |
run()
Performs the transformation in accordance with the current attributes of this object. |
void |
setDestdir(String destdir)
Sets the name of the directory to which files should be output. |
void |
setIn(String in)
Sets the location of the input XML file. |
void |
setStylesheet(String stylesheet)
Sets the location of a stylesheet which is to be used to process the input file before the splitting is done. |
void |
setVerbose(int verbose)
Sets the verbosity level - 0, 1 or 2 for ascending amounts of verbosity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiXML()
Method Detail |
---|
public static void main(String[] args) throws IOException, TransformerException, SAXException, ParserConfigurationException
MultiXML [-verbose] [-style sheet] [-param name=value [-param name=value] ...] infile outdirWhere:
args
- command-line arguments
IOException
TransformerException
SAXException
ParserConfigurationException
public void setVerbose(int verbose)
verbose
- verbosity levelpublic void setDestdir(String destdir)
destdir
- output directorypublic void setIn(String in)
in
- input file system id - may be "-" or null
for standard inputpublic void setStylesheet(String stylesheet)
stylesheet
- XSLT stylesheet system idpublic Map getParams()
public void run() throws IOException, TransformerException, SAXException, ParserConfigurationException
IOException
TransformerException
SAXException
ParserConfigurationException
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |