Repository navigation
Add CLI option to pass options to infoset inputters and outputters - #1743
Open
olabusayoT wants to merge 1 commit into
Open
olabusayoT wants to merge 1 commit into
olabusayoT wants to merge 1 commit into
Conversation
Add a --infoset-opts option to the parse and unparse commands that takes a comma separated list of key=value pairs, for example --infoset-opts=pretty=false,xmlTextEscape=CDATA. Pairs are validated against the selected infoset type and collected into an InfosetOptions object that is passed to the infoset handlers, so new options need only a key definition and a handler change. Pair splitting is a new Misc.parseKeyValuePairs utility. Initial keys are pretty (true or false, for xml, json, and sax infosets), which previously could not be turned off, xmlTextEscape (Standard or CDATA, for xml infosets), which exposes the existing XMLTextEscapeStyle, and exiCompression (true or false, for exi and exisa infosets), which selects EXI compression. Unknown keys, invalid values, and keys that do not apply to the infoset type are reported as usage errors. Each key's values, description, applicable infoset types, and default are generated into the command help from the key definitions. The parse command now closes its output file when it finishes, so the file can be deleted on Windows when the CLI runs in the same process as a test. Library constructors are unchanged. DAFFODIL-2234
olabusayoT
force-pushed
the
daf-2234-infoset-options
branch
from
October 7, 2026 18:30
b1647b7 to
6e5629d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a --infoset-opts option to the parse and unparse commands that takes a comma separated list of key=value pairs, for example --infoset-opts=pretty=false,xmlTextEscape=CDATA. Pairs are validated against the selected infoset type and collected into an InfosetOptions object that is passed to the infoset handlers, so new options need only a key definition and a handler change. Pair splitting is a new Misc.parseKeyValuePairs utility.
Initial keys are pretty (true or false, for xml, json, and sax infosets), which previously could not be turned off, xmlTextEscape (Standard or CDATA, for xml infosets), which exposes the existing XMLTextEscapeStyle, and exiCompression (true or false, for exi and exisa infosets), which selects EXI compression. Unknown keys, invalid values, and keys that do not apply to the infoset type are reported as usage errors. Each key's values, description, applicable infoset types, and default are generated into the command help from the key definitions.
Library constructors are unchanged.
DAFFODIL-2234