mbeckerle commented on a change in pull request #744:
URL: https://github.com/apache/daffodil/pull/744#discussion_r796868231



##########
File path: 
daffodil-lib/src/main/scala/org/apache/daffodil/xml/DaffodilXMLLoader.scala
##########
@@ -215,18 +215,34 @@ class DFDLCatalogResolver private ()
 
     val result = (resolvedId, systemId) match {
       case (null, null) => {
-        // This happens now in some unit tests.
-        // Assert.invariantFailed("resolvedId and systemId were null.")
-        Logger.log.debug(s"Unable to resolve.")
+        // This happens in numerous unit tests.
+        //
+        // It seems that in some situations the resolver is called
+        // to attempt to resolve things certain ways. Such as
+        // providing just the namespace URI, without the systemId.
+        //
+        // So the inability to resolve, in this case anyway, is not an error.
+        //
         None
       }
       case (null, sysId) =>
         {
+          // We did not get a catalog resolution of the nsURI, nor
+          // a straight file resolution of the systemId, so we
+          // use the systemId (which comes from the schemaLocation attribute)
+          // and the classpath.
           val baseURI = if (baseURIString == null) None else Some(new 
URI(baseURIString))
           val optURI = Misc.getResourceRelativeOption(sysId, baseURI)
           optURI match {
             case Some(uri) => Logger.log.debug(s"Found on classpath: ${uri}.")
-            case None => Logger.log.info(s"Unable to resolve ${sysId} in 
${baseURI}")
+            case None => {

Review comment:
       Add more doc of why we have to throw this. (Because Xerces won't create 
an error if we just return without resolving. )




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