public class MultiXML extends Object
<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:
xsl:output
element.
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 and Description |
---|
MultiXML()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
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.
|
public static void main(String[] args) throws IOException, TransformerException, SAXException, ParserConfigurationException
MultiXML [-verbose] [-style sheet] [-param name=value [-param name=value] ...] infile outdirWhere:
-verbose
-style sheet
infile
prior to doing the split
-param name=value
infile
outdir
args
- command-line argumentsIOException
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)
filesection
elements).stylesheet
- XSLT stylesheet system idpublic Map<String,Object> getParams()
public void run() throws IOException, TransformerException, SAXException, ParserConfigurationException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.