Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parse a file, using either a DFDL schema or a saved parser.

Usage

Note that the -P or --parser feature is not yet implemented (April 2013)

daffodil parse (-s <schema>... [-r [{<namespace>}]<root>] [-p <path>] | -P <parser>) [-D[{namespace}]<variable>=<value>...] [-T<tunable>=<value>] [-o <output>] [-V [mode]] [-c <file>] [infile]

...

LongShortArgumentsDescription
--schema
-s
<schema>
The annotated DFDL schema to use to create the parser. This option may be supplied multiple times for multi-schema support. This option cannot be used with the --parser option.
--root
-r
[{<namespace>}]<root>
The root element of the DFDL schema to use. This must be one of the top-level elements of the schema defined with --schema. This requires the --schema option to be defined. If not supplied, the first element of the first schema defined with --schema is used. A namespace may be specified by prefixing it with {namespace}.
--path
-p
<path>
The path to the node from the root element to create the parser from.
--parser
-P
<parser>
Use a previously saved parser, created using the save-parser subcommand. This option cannot be used with the --schema option.
 
-D
[{<namespace>}]<variable>=<value>

Variables to be used when parsing. The variable can be prefixed with {namespace} to define which namespace the variable belongs in, for example:

-D{http://example.com}var1=val

 
-T
<tunable>=<value>

Modify Daffodil configuration options to change parsing behavior. See Configuration File#Tunable Parameters for the list of tunable parameters.

--output
 
<output>
Write output to a give file. If the option is not given or is -, output is written to standard out.
--validate
-V
[mode]
The validation mode. 'on', 'limited' or 'off'. If 'mode' is not provided, defaults to 'on'. If --validate is not provided, defaults to 'off'.
--config-c<file>XML file containing configuration items, such as external variables or Daffodil tunables. See  Configuration File for details on the file format.
  
[infile]

Input file to parse. If not specified, or is a value of -, reads from standard in. In supplied, this must be the last option on the command line.

--version
  Display the version of Daffodil.
--help
  Display help message.

...

Note that the Unparse subcommand is not currently implemented (April 2013)implemented as of 0.15.0.

daffodil unparse (-s <schema>... [-r [{<namespace>}]<root>] [-p <path>] | -P <parser>) [-D[{<namespace>}]<variable>=<value>...] [-T<tunable>=<value>] [-o <output>] [-V [mode]] [-c <file>] [infile]

...

Create a save a parser that can be reused for parsing and unparsing.

Usage

...

daffodil save-parser -s <schema>... [-r <root> [-n <namespace>]] [-p <path>] [-o <output>] [outfile]

...