jw3 commented on a change in pull request #431:
URL: https://github.com/apache/incubator-daffodil/pull/431#discussion_r510186495
##########
File path:
daffodil-lib/src/main/scala/org/apache/daffodil/util/DefaultValidator.scala
##########
@@ -100,3 +111,35 @@ object Validator extends NoBindingFactoryAdapter {
}
}
+class DefaultValidatorFactory extends ValidatorFactory {
+ def name(): String = "default" /// todo;; or should it be "xerces"
+
+ // to not muck around too much with the original logic above just wrapping
access to the
Review comment:
I dont really want to touch the original Validator implementation and
the caching approach it uses. So this adapter class wraps it. It also
implements the Xerces specific SAX error handling that the ParseResult
previously provided.
I think its also a good example of how you can use a singleton objects with
inexpensive wrappers through the factory interface (this is a little complex
for an example, but the concept is there).
----------------------------------------------------------------
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]