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


##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/xml/DaffodilXMLLoader.scala:
##########
@@ -221,7 +221,7 @@ class DFDLCatalogResolver private ()
         resolvedSystem
       } else if (
         resolvedUri != null && ((systemId == null) || (systemId != null && 
resolvedUri.endsWith(
-          systemId
+          (new URI(systemId)).getPath

Review Comment:
   We need a detailed comment that we do this to get around Xerces and why this 
is okay. Maybe even an example of schema in the code so it's very clear. At 
face value it looks wrong since if someone includes a schemaLocation of 
`file:/foo/bar/baz` we will ignore the fact that this is an absolute URI as 
long as the path matches the resolveUri.
   
   We should probably also only do this if the URI is an absolute `file:` URI, 
to make it clear it is only trying to work around a very specific Xercses bug 
and wont' accidentally break other cases. For example, if the URI is a jar: uri 
then we probably don't want to do this logic.



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