|XSD metamodel - XSD caching [message #496635]
||Tue, 10 November 2009 13:10
| Jan Arciuchiewicz
Registered: November 2009
In our project we use XSD Schema meta-model and our schema model is xml schema itself (http://www.w3.org/2001/XMLSchema.xsd).|
When we add schema it resolves imports and tries to load imported schema from "http://www.w3.org/2001/xml.xsd". We tried to use local schema while meta-model creation (by loading it from " platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSc hema.xsd "). It worked fine but the imported schema ("xml.xsd") still was taken from internet.
We tried different solutions to make everything to be loaded locally. For example loading "xml.xsd" from a bundle first and changing the URI of the resource to "http://www.w3.org/2001/xml.xsd", or having in our plug-in copy of "XMLSchema.xsd" with modified import to point to local schema location for "xml.xsd". All solutions worked fine but had some flaws.
Eventually we ended up with providing extension for standard EMF URIConverter to remap internet URIs to its local counterparts.
After this change everything works fine and XSDs are loaded from bundles (URIs are still external "http:www...").
Do you think it should be done this way? Does anybody have a better solution? Any response would be appreciated.
Powered by FUDForum
. Page generated in 0.02355 seconds