jw3 commented on a change in pull request #520:
URL: https://github.com/apache/daffodil/pull/520#discussion_r608603018



##########
File path: daffodil-japi/src/main/scala/org/apache/daffodil/japi/Daffodil.scala
##########
@@ -866,6 +867,12 @@ class ParseResult private[japi] (pr: SParseResult, 
deprecatedOutput: Maybe[JDOMI
    * @return true if any validation errors occurred, false otherwise.
    */
   def isValidationError(): Boolean = pr.isValidationError
+
+  /**
+   * Optional result of the infoset validation.
+   * @return optional ValidationResult
+   */
+  def validationResult(): Option[ValidationResult] = pr.validationResult()

Review comment:
       > Personally, I would like to see more use-cases of this rawValidation 
data before we make it part of the public API.
   
   Concur.
   
   > like maybe we want alternative syntax like 
--validate=foo.sch:output=details.svrl
   
   Ive went down this road, there was an implementation in the original 
validator refactorings that support syntax similar to this.
   
   Question is/was, does it scale?  I say not beyond a low number of shortish 
parameters.
   
   Still valuable to input arbitrary configuration to validators, so there is 
[support for this by passing a config 
file](https://github.com/apache/daffodil/blob/master/daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala#L233)
 that was added in the validator work.
   
   But Id say that doesnt help here, because managing the output files down in 
the validator creates issues with reusing the validators, which is important 
part of that design.  So the data has to get up out of the validators to be 
written.
   
   > Thoughts?
   
   The raw stream wasnt the first choice, but its not so unappealing if you 
squint.  Conceptually there are two streams of data that come out of validators 
(1) parsed structured data by way of validation result (2) optional raw source 
data that the structured data was parsed from.
   
   




-- 
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.

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


Reply via email to