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


##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/exceptions/SchemaFileLocatable.scala:
##########
@@ -125,7 +125,12 @@ class XercesSchemaFileLocation(
 ) extends SchemaFileLocation(
     (if (xercesError.getLineNumber > 0) 
Some(xercesError.getLineNumber.toString) else None),
     (if (xercesError.getColumnNumber > 0) 
Some(xercesError.getColumnNumber.toString) else None),
-    schemaFileLocation.diagnosticFile,
+    (if (
+       xercesError.getSystemId != null &&
+         // only set to systemId if it's different from the diagnosticFile path
+       
!xercesError.getSystemId.endsWith(schemaFileLocation.diagnosticFile.getPath)
+     ) new File(xercesError.getSystemId)
+     else schemaFileLocation.diagnosticFile),

Review Comment:
   > As an aside, I think XercesSchemaFileLocation is only used when we run 
into error loading the schema. So we don't use it for validation
   
   You're talking about loading a DFDL schema right? I don't think it should be 
used for loading the XMLSchema_for_DFDL.xsd schema.
   
   > As such I don't think it represents an error in Daffodil.
   
   It might not necessarily be a bug in Daffodil, it could be in Quarkus as you 
say, but it still represents a bug somewhere that broke functionality in 
Daffodil need to load the XML Schema for DFDL schemas. For example, if some 
tool modified daffodil jars and removed XMLSchema_for_DFDL.xsd schema, that 
wouldn't want to be reported as an SDE. That's a bug in the tool that broke an 
assertion that those schemas are available to Daffodil. Breaking that assertion 
should result in an some kind of exception that's not an SDE, so those tools or 
Daffodil can be fixed.



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