Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » XML editor catalogue entry, xsd:import problem by not resolving the schemaLocation/namespace
XML editor catalogue entry, xsd:import problem by not resolving the schemaLocation/namespace [message #1734551] Thu, 09 June 2016 10:07 Go to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
Hi,

Problem:

I am using two EMF models (A and B) which referencing each other. The
WST XML Editor does not resolve the referenced schema (A) as context
assistant for elements of schema A are not provided, only for schema B.

From the two EMF models I export the XSD. There are two XSD files,
where one file references to the other like this:

in schemaB.XSD

<xsd:import namespace="http://xyz.com/schemaA.xsd"
schemaLocation="../../com.xyz.a/model/schemaA.xsd"/>

Both schemas are in different plugins. Each plugin is using the
org.eclipse.wst.xml.core.catalogContributions extension point.

e.g.:
<extension point="org.eclipse.wst.xml.core.catalogContributions">
<catalogContribution id="opn">
<uri name="http://xyz.com/schemaA.xsd" uri="assets/schemaA.xsd"></uri>
</catalogContribution>
</extension>

Workaround:
Please note the ../../ at the schemaLocation of the xsd:import element.
I replaced the ../../ with platform:/plugin/ and this fixed the issue.

Question:
As the namespace http://xyz.com/schemaA.xsd is also at the catalogue I
believe the schema location should be resolved from the catalogue
instead of the schemaLocation attribute at the xsd:import element.

I am wrong or do I misunderstand the catalogue?


Any hints are appreciated, Martin
Re: XML editor catalogue entry, xsd:import problem by not resolving the schemaLocation/namespace [message #1735351 is a reply to message #1734551] Fri, 17 June 2016 13:57 Go to previous messageGo to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
To whom it may concern,

attached please find 2 plugins for any one who want to reproduce the issue.

Plugin com.xyz.b has a ecore model, schema (b.xsd), etc.

Plugin com.xyz.a has a schema (a.xsd) referencing to x.xsd.

I think all is fine from EMF point of view but after exporting the
product the catalogue entry can't be found by the XML editor.

For me my workaround to replace the schemaLocation in a.xsd will be my
solution to use the WST XML editor.


generated:
[code]
<xsd:import namespace="http://xyz.com/schemaB.xsd"
schemaLocation="../../com.xyz.b/model/b.xsd"/>
[code]

workaround:
[code]
<xsd:import namespace="http://xyz.com/schemaB.xsd" schemaLocation="
platform:/plugin/com.xyz.b/model/b.xsd"/>
[code]


suspected problem:
XML editor does not look into the catalogue to find the schema of the
namespace, but just tries to read the schema from schemLocation.

Martin
Re: XML editor catalogue entry, xsd:import problem by not resolving the schemaLocation/namespace [message #1735352 is a reply to message #1735351] Fri, 17 June 2016 13:58 Go to previous message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
now the attachemnt ....
  • Attachment: com.xyz.zip
    (Size: 65.19KB, Downloaded 189 times)
Previous Topic:Server Oracle Weblogic Server 12c (12.1.2) at localhost [Default Domain] failed to start
Next Topic:"mark occurrences" in HTML editor
Goto Forum:
  


Current Time: Mon Oct 07 18:36:15 GMT 2024

Powered by FUDForum. Page generated in 0.03472 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top