stevedlawrence commented on code in PR #1451:
URL: https://github.com/apache/daffodil/pull/1451#discussion_r1983963247


##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/xml/DaffodilXMLLoader.scala:
##########
@@ -228,19 +228,19 @@ class DFDLCatalogResolver private ()
      *    <xs:schema...
      *    ... xsi:schemaLocation="urn:some:namespace /some/path.xsd"
      *  }}}
-     * Xerces takes that schemaLocation URI and absolutizes it to {{{ 
file:/some/path.xsd }}}
+     * Xerces takes that schemaLocation URI and absolutizes it to {{{ 
URISCHEME:/some/path.xsd }}}
      * and passes that to our resolveEntity and in turn resolveCommon, which 
while it's able
-     * to find the namespace, fails to set the resolvedUri since the 
file:/some/path.xsd will
+     * to find the namespace, fails to set the resolvedUri since the 
URISCHEME:/some/path.xsd will
      * never match anything resolved from our catalog since that'd return 
something like
-     * {{{ file:/some/absolute/path/to/some/path.xsd }}}
+     * {{{ URISCHEME:/some/absolute/path/to/some/path.xsd }}}
      *
      * This is a workaround to that bug where we convert systemId to a URI and 
check if the
      * path (from URI.getPath) matches the end of resolvedUri. Note: This can 
ignore absolute
      * URIs passed in for schemaLocation, but those are edge cases where the 
user expects
      * the namespace to match a different file (i.e what they provide in the 
schemalocation)
      * than what we find in the catalog.
      */
-    lazy val systemIdPath = if (systemIdUri != null && systemIdUri.getScheme 
== "file") {
+    lazy val systemIdPath = if (systemIdUri != null && systemIdUri.getScheme 
!= null) {

Review Comment:
   Ah right, because Xerces doesn't actually create a real jar URI, it just 
takes the path and prepends a scheme for no reason. So we're just stripping off 
that incorrect scheme to get the original path. This makes sense then.
   



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