jw3 commented on a change in pull request #431:
URL: https://github.com/apache/incubator-daffodil/pull/431#discussion_r504194648
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DataProcessor.scala
##########
@@ -702,10 +706,22 @@ class ParseResult(dp: DataProcessor, override val
resultState: PState)
*/
def validateResult(bytes: Array[Byte]): Unit = {
Assert.usage(resultState.processorStatus eq Success)
- val schemaURIStrings =
resultState.infoset.asInstanceOf[InfosetElement].runtimeData.schemaURIStringsForFullValidation
+
+ val (v, args) = dp.validationMode match {
+ case ValidationMode.Custom(name, args) =>
+ Validators.find(name).getOrElse(
+ Assert.abort(s"Validator '$name' not found")
Review comment:
> Can we move much of this find logic to when a user calls
withValidationMode?
@stevedlawrence I missed your point there earlier. Yeah that sounds
reasonable, Ill move it and see how it looks.
----------------------------------------------------------------
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]