v6 seems to have no ability to resolve namespaces #180

Closed
opened 2024-04-16 09:15:10 +02:00 by pahjbo · 4 comments
pahjbo commented 2024-04-16 09:15:10 +02:00 (Migrated from github.com)

Although namespaces are the "primary key" for XSD schema language imports it seems that the LSResourceAdapter ignores them entirely when trying to resolve for xsd schema. I have tried writing my own LSResourceAdapter and substituting the namespaceId for the publicId, but still the lower level calls seem to ignore my catalog and still try to look up the namespaces as http URLs, rather than the redirected local file references that I want.

Although namespaces are the "primary key" for [XSD schema language imports](https://www.w3.org/TR/xmlschema11-1/#composition-schemaImport) it seems that the [LSResourceAdapter](https://github.com/xmlresolver/xmlresolver/blob/b538b23ec609f03f26ab2a280cc896cd916dd57a/src/main/java/org/xmlresolver/adapters/LSResourceAdapter.java#L53) ignores them entirely when trying to resolve for xsd schema. I have tried writing my own LSResourceAdapter and substituting the namespaceId for the publicId, but still the lower level calls seem to ignore my catalog and still try to look up the namespaces as http URLs, rather than the redirected local file references that I want.
ndw commented 2024-04-16 09:52:25 +02:00 (Migrated from github.com)

I thought there was a test for that. Thanks for the report. I'll investigate.

I thought there was a test for that. Thanks for the report. I'll investigate.
pahjbo commented 2024-04-16 11:26:20 +02:00 (Migrated from github.com)

BTW - my catalogue entries are like

<uri name="http://www.ivoa.net/xml/TAPRegExt/v1.0" uri="classpath:/schema/TAPRegExt-v1.0.xsd"/>
BTW - my catalogue entries are like ``` <uri name="http://www.ivoa.net/xml/TAPRegExt/v1.0" uri="classpath:/schema/TAPRegExt-v1.0.xsd"/> ```
pahjbo commented 2024-04-19 13:01:05 +02:00 (Migrated from github.com)

I can get a LSResourceAdapter that does what I expect by calling

 request = resolver.getRequest(namespaceURI);

see https://github.com/Javastro/ivoa-schemata/blob/master/src/main/java/org/javastro/ivoa/schema/LSResourceAdapter.java for full code

I can get a LSResourceAdapter that does what I expect by calling ``` request = resolver.getRequest(namespaceURI); ``` see https://github.com/Javastro/ivoa-schemata/blob/master/src/main/java/org/javastro/ivoa/schema/LSResourceAdapter.java for full code
ndw commented 2024-08-05 17:39:38 +02:00 (Migrated from github.com)

This was a bug. Fixed now.

This was a bug. Fixed now.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
XmlResolver/xmlresolver#180
No description provided.