|
|||||||||
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 | |
---|---|
java.util.Map |
getParams()
Returns the map of parameters which will be used to affect the stylesheet transformation. |
static void |
main(java.lang.String[] args)
Runs the transformation. |
void |
run()
Performs the transformation in accordance with the current attributes of this object. |
void |
setDestdir(java.lang.String destdir)
Sets the name of the directory to which files should be output. |
void |
setIn(java.lang.String in)
Sets the location of the input XML file. |
void |
setStylesheet(java.lang.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(java.lang.String[] args) throws java.io.IOException, javax.xml.transform.TransformerException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
MultiXML [-verbose] [-style sheet] [-param name=value [-param name=value] ...] infile outdirWhere:
args
- command-line arguments
java.io.IOException
javax.xml.transform.TransformerException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void setVerbose(int verbose)
verbose
- verbosity levelpublic void setDestdir(java.lang.String destdir)
destdir
- output directorypublic void setIn(java.lang.String in)
in
- input file system id - may be "-" or null
for standard inputpublic void setStylesheet(java.lang.String stylesheet)
stylesheet
- XSLT stylesheet system idpublic java.util.Map getParams()
public void run() throws java.io.IOException, javax.xml.transform.TransformerException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
java.io.IOException
javax.xml.transform.TransformerException
org.xml.sax.SAXException
javax.xml.parsers.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 |