|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.reverseXSL.Transform
public class Transform
You can customize source code (available in the jar) and make your own 'TransformPlus' version.
This tool is a command-line wrapping of the original Transformer API.
Simplest use, with a single jar containing software and transformation meta-data:
(meta-data comprises Parsing DEFinitions, XSL templates, and the mapping selection table)
java -jar ReverseXSL.jar myInputDataFile
variant (assuming ReverseXSL.jar on the CLASSPATH):
(picking-up resources from directories and/or multiple jar's using the CLASSPATH)
java com.reverseXSL.Transform myInputDataFile
both these command lines followed by ... >MyOutputFile
do capture the transformed result to a file; indeed, output is written on stdout
whereas execution logs are written on stderr
Advanced use (assuming ReverseXSL.jar on the CLASSPATH):
java com.reverseXSL.Transform myDEFFile myXSLFile myInputDataFile
where the parser DEF file and the XSL template file instruct to, respectively, parse the input with the associated Parsing DEFinition, and then transform the resulting XML with the specified XSL template. If any of those two resources are not found relative to the current working directory, the corresponding transformation step is omitted.
Tip: simply use placeholder DEF or XSL arguments like 'NoDEF' and 'NoXSL' to skip the corresponding transformation step.
Note that optional command-line arguments are noted below within '[' ']', possibly nested.
java com.reverseXSL.Transform myDefinitionFile myXSLFile myInputDataFile [<InputCleansing> <MaxFatalExceptions>
<MaxExceptions> [<true|false> [<indent>] ] ]
<InputCleansing>
is one of NONE
, ToCRLF
, ToLF
, ToUPPER
,
FullyTrimmed
, or UnfoldPSCRMRemarks
. You may
combine multiple cleansing options
with a '+' as in ToCRLF+fullytrimmed+TOUPPER
. Tokens are not case sensitive. FullyTrimmed
removes leading & trailing spaces/tabs, as well as empty lines and control characters
(more options via the java API). UnfoldPSCRMRemarks removes the arbitrary '<CR><LF>.RN/'
remarks-extension-line-breaks that can jeopardize the correct parsing of Remarks elements in IATA
PSCRM messages (a legacy feature inherited from TELEX maximum line length at 69 chars).removeNonRepeatableNilOptionalElements
." |"
.or yet:
java com.reverseXSL.Transform AUTO SELECT myInputDataFile [<InputCleansing> <MaxFatalExceptions>
<MaxExceptions> [<true|false> [<indent>] ] ]
In which case a mapping_selection_table.txt
(fixed name) file is searched up in the directory
hierarchy such as to dynamically resolve which parsing DEF and/or XSL template to apply to the given input data.
/!\ Note that the output is written on stdout whereas execution messages and logs are written on stderr; the transformed output is thus captured using command-line output redirection. For instance:
java -jar ReverseXSL.jar myInputDataFile >myOutputFile
Please refer to the Software Manual for an overview and tutorial samples.
Constructor Summary | |
---|---|
Transform()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Entry to the command-line tool for 'reverse-XSL' data transformations. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transform()
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.lang.Exception
command-line tool
for 'reverse-XSL' data transformations.
args
- command line arguments as described in Transform
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |