Class Batch
This class has one static method only and is the command-line front end
for BatchProcessor
. That class is less restricted.
Here, due to the syntax of BatchOptions
, for instance
only one single set of style-sheet parameters can be given, for all
transformations.
If any parsing of the inputs is wanted, then at least one xslt processing job or the mere xml output must be requested.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BatchOptionsGui
Service access point: prototype for gui-based client software. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static EnumSet<Options.traceflag>
Convert an enum set of xslt trace flags as defined in this package to a set of trace flags as defined with xslt.static boolean
execute
(BatchOptions options, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgIn) Execute the CLI-parsed or GUI-generated Option model.protected static Text2Udom.ErrorStrategy
initErrorStrategy
(BatchOptions options) Construct an eror strategy according to the command line options.protected static ModuleRegistry
initModuleReg
(BatchOptions options, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg) Construct a module registry according to the command line options.static void
Central command line processing method.protected static void
Evidentprotected static <D> void
s_error
(MessageReceiver<SimpleMessage<D>> msg, String s, Object... args) Evidentprotected static <D> void
s_log
(MessageReceiver<SimpleMessage<D>> msg, int debuglevel, String s, Object... args) Evidentprotected static <D> void
s_warning
(MessageReceiver<SimpleMessage<D>> msg, int debuglevel, String s, Object... args) Evidentprotected static void
Evidentprotected static void
Evident
-
Field Details
-
prototypeGui
Service access point: prototype for gui-based client software.
-
-
Constructor Details
-
Batch
public Batch()
-
-
Method Details
-
s_error
Evident -
s_warning
protected static <D> void s_warning(MessageReceiver<SimpleMessage<D>> msg, int debuglevel, String s, Object... args) Evident -
s_log
protected static <D> void s_log(MessageReceiver<SimpleMessage<D>> msg, int debuglevel, String s, Object... args) Evident -
printErrorCounter
Evident -
terminateApplicationOnErrors_printUsage
Evident -
terminateApplicationOnErrors
Evident -
initModuleReg
protected static ModuleRegistry initModuleReg(BatchOptions options, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg) Construct a module registry according to the command line options. -
initErrorStrategy
Construct an eror strategy according to the command line options. -
convert
Convert an enum set of xslt trace flags as defined in this package to a set of trace flags as defined with xslt. Correspondance is by name. -
main
Central command line processing method. The command line parameters are defined byBatchOptions
. The processing uses the metatools xslt 1.0 implementation "txsl", and the options include also most txsl options.Stylesheet parameters can be given a sequence of style sheet parameter files, and one by one on the command line, with increasing priority. The character
SimpleFilePattern.defaultPlaceholder
can be used in these parameter values and will be replaced by the file name stem currently processed.One single call converts "k" source files into "m" output files using xslt, plus possibly the pure ".xml" version. This produces "k*m" or "k*(m+1)" output files, while all preparatory module loading, xslt compiling, etc. is performed only once. The source files are given as file position (not as "URI" et.c)
The naming for the output files is as follows: A "stem" is extracted from all sources, and combined with all target formats to construct the output file name, in the same way as "make" does. See
SimpleFilePattern
for details. The placeholder character can also appear in style sheet parameter values, and will also be replaced by the stem.(The placeholder character MUST be present = only multi-mode supported, even if it is effectively not used.)
-
execute
public static boolean execute(BatchOptions options, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgIn) Execute the CLI-parsed or GUI-generated Option model.- Returns:
- whether the kind of error proposes to any cli-based caller to present the "usage()" in case of errors
- See Also:
-