Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » How to provide a different schema content
How to provide a different schema content [message #37145] Wed, 11 February 2004 23:34 Go to next message
Joshua Hui is currently offline Joshua HuiFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

In FAQ section of eclipse/xsd, it has the following question:

Is there a way to have schema documents which reference other schema
documents through <include> <import> or <redefine> be fetched from
locations other than those given in the schemaLocation attribute?

Yes, you can use a ResourceSet's URIConverter's URI map to map logical
URIs to physical URIs. You can see an example of that code in
XSDProtocotypicalSchema traceLoading().

But if I want to provide the content of the schema directly, instead of
letting EMF to locate the resource, how can I do it? Basically, what I
want is something like what EntityResolver provides.

Thanks.

Joshua
Re: How to provide a different schema content [message #37248 is a reply to message #37145] Thu, 12 February 2004 14:39 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Joshua,

Have a look at the new XSDSchemaLocator API. That should give you a hook
for populating a schema into the resource set using your own mechanism.


Joshua Hui wrote:

> Hi,
>
> In FAQ section of eclipse/xsd, it has the following question:
>
> Is there a way to have schema documents which reference other schema
> documents through <include> <import> or <redefine> be fetched from
> locations other than those given in the schemaLocation attribute?
>
> Yes, you can use a ResourceSet's URIConverter's URI map to map logical
> URIs to physical URIs. You can see an example of that code in
> XSDProtocotypicalSchema traceLoading().
>
> But if I want to provide the content of the schema directly, instead of
> letting EMF to locate the resource, how can I do it? Basically, what I
> want is something like what EntityResolver provides.
>
> Thanks.
>
> Joshua
Re: How to provide a different schema content [message #583457 is a reply to message #37145] Thu, 12 February 2004 14:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Joshua,

Have a look at the new XSDSchemaLocator API. That should give you a hook
for populating a schema into the resource set using your own mechanism.


Joshua Hui wrote:

> Hi,
>
> In FAQ section of eclipse/xsd, it has the following question:
>
> Is there a way to have schema documents which reference other schema
> documents through <include> <import> or <redefine> be fetched from
> locations other than those given in the schemaLocation attribute?
>
> Yes, you can use a ResourceSet's URIConverter's URI map to map logical
> URIs to physical URIs. You can see an example of that code in
> XSDProtocotypicalSchema traceLoading().
>
> But if I want to provide the content of the schema directly, instead of
> letting EMF to locate the resource, how can I do it? Basically, what I
> want is something like what EntityResolver provides.
>
> Thanks.
>
> Joshua


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Unresolved element when validate using DOM format
Next Topic:ClassCastException in XSDSchemaImpl
Goto Forum:
  


Current Time: Fri Apr 19 23:33:02 GMT 2024

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

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

Back to the top