olabusayoT commented on code in PR #1479: URL: https://github.com/apache/daffodil/pull/1479#discussion_r2198520165
########## daffodil-core/src/main/scala/org/apache/daffodil/lib/validation/XercesValidator.scala: ########## @@ -71,23 +76,30 @@ object XercesValidatorFactory { * to do a validation pass on the TDML expected Infoset w.r.t. the model and to * do a validation pass on the actual result w.r.t. the model as an XML document. */ -class XercesValidator(schemaSources: Seq[javax.xml.transform.Source]) extends Validator { +class XercesValidator(schemaSource: javax.xml.transform.Source) + extends api.validation.Validator { private val factory = new org.apache.xerces.jaxp.validation.XMLSchemaFactory() private val resolver = DFDLCatalogResolver.get factory.setResourceResolver(resolver) - private val schema = factory.newSchema(schemaSources.toArray) + private val schema = factory.newSchema(schemaSource) private val validator = new ThreadLocal[XercesValidatorImpl] { override def initialValue(): XercesValidatorImpl = initializeValidator(schema.newValidator, resolver) } - def validateXML(document: java.io.InputStream): ValidationResult = - validateXML(document, new XercesErrorHandler) + def validateXML( + document: java.io.InputStream, + validationHandler: api.validation.ValidationHandler + ): Unit = + validateXML(document, new XercesErrorHandler(validationHandler)) - def validateXML(document: java.io.InputStream, eh: ErrorHandler): ValidationResult = { + def validateXML( + document: java.io.InputStream, + eh: ErrorHandler + ): Unit = { Review Comment: We use it in the DaffodilXMLLoader, the errorHandler passed in is a sax errorhandler -- 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: commits-unsubscr...@daffodil.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org