[ 
https://issues.apache.org/jira/browse/DAFFODIL-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814984#comment-17814984
 ] 

Mike Beckerle commented on DAFFODIL-2234:
-----------------------------------------

Closed (Inactive PR) refers to this ticket: 
[https://github.com/apache/daffodil/pull/329]

 

> CLI needs to pass options to infoset inputters/outputters
> ---------------------------------------------------------
>
>                 Key: DAFFODIL-2234
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2234
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 2.4.0
>            Reporter: Mike Beckerle
>            Assignee: Mike Beckerle
>            Priority: Minor
>              Labels: beginner
>             Fix For: 3.7.0
>
>
> Pretty printing is undesirable for many use cases. This applies to both XML 
> pretty printing and JSON pretty printing. The XMLInfosetOutputter constructor 
> already takes a boolean 'pretty' parameter, but we don't have any way for the 
> CLI to change this constructor parameter's value from true to false in the 
> places where the codebase passes true.
> The issue here is how do we let the CLI pass options to infoset 
> inputters/outputters such as (not) pretty printing JSON/XML or using CDATA to 
> preserve whitespace in XML text?  We also need to let the CLI to pass options 
> to the TDML runner for its infoset inputters/outputters where that makes 
> sense.
> Infoset inputters/outputters created by the user or the CLI don't have any 
> access to tunables when they are created. The only parts of Daffodil that 
> have access to tunables are the Compiler/ProcessorFactory/DataProcessor which 
> have withTunable/withTunables functions.  Should we add withTunable/Tunables 
> functions to infoset inputters/outputters?
> One opinion is the CLI option could use the same {{-T}} flag and the Daffodil 
> code could just figure out which key/value pairs are tunables and which are 
> infoset inputter/outputter parameters.  Another opinion is that feels like a 
> bit of a hack and the CLI should have another option (maybe -i to match -I 
> for infoset types).
> Finally, the infoset inputters/outputters currently take options as 
> constructor parameters.  However, withXXX functions are a better API for 
> binary compatibility and future extensibility than constructor parameters.  A 
> pull request should also clean up the infoset inputters/outputters' API to 
> use a cleaner API for passing options.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to