olabusayoT commented on code in PR #1451:
URL: https://github.com/apache/daffodil/pull/1451#discussion_r1983955933
##########
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:
So I tested this out by adding an xsi:schemaLocation to DFDLGeneralFormat
and then did some prinlns, I got the below which means jarUri.getPath won't
return null. I also think this isn't a typical jarURI so maybe it's fine?
sysId: jar:/org/apache/daffodil/xsd/XMLSchema_for_DFDL.xsd
.getScheme: jar
.getPath: /org/apache/daffodil/xsd/XMLSchema_for_DFDL.xsd
--
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]