mbeckerle commented on code in PR #821:
URL: https://github.com/apache/daffodil/pull/821#discussion_r1038273416


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DataProcessor.scala:
##########
@@ -372,7 +372,7 @@ class DataProcessor private (
       validationMode match {
         case ValidationMode.Full | ValidationMode.Custom(_) =>
           val bos = new java.io.ByteArrayOutputStream()
-          val xmlOutputter = new XMLTextInfosetOutputter(bos, false)
+          val xmlOutputter = new XMLTextInfosetOutputter(bos, false, 
tunables.xmlOutputStyle)

Review Comment:
   Hmmm. I see lots of need for future parameterization of infoset 
outputters/inputters. 
   
   Is there a fundamental flaw with the way we do tunables now that you are 
advocating we move away from?
   
   To me, whatever mechanism we provide for this is going to be substantially 
similar to the tunables object we already have. Or is there some different idea?
   
   Plausible controls for infoset XML-related inputters/outputters are:
   - substitution scheme to use for XML illegal characters
   - pretty print safe/not
   - threshold or guidance on when to use CDATA vs. escapifying
   - control of when to output Unicode characters, and when to output 
`&#xHHHH;` notation and use Ascii as the charset. 
   - Whether to append the XML "slug line" `<?xml .... >` at start of data
   - Whether to append a byte-order-mark at start of data. 
   
   I'm not suggesting we add these things now. Just that any/all of them are 
plausible things we'd want to implement by parameterizing infoset 
inputters/outputters with parameters settable/tunable from outside the DFDL 
schema. 
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to