| From | Sent On | Attachments |
|---|---|---|
| Blaise Doughan | Jun 14, 2010 11:02 am | |
| Blaise Doughan | Jun 29, 2010 8:06 am | .zip |
| Barack, Ron | Jul 6, 2010 8:01 am | |
| Blaise Doughan | Jul 13, 2010 7:22 am | .zip |
| Subject: | AW: [sdo] SDO-55 - Create an EntityResolver like concept for resolving imported/included schemas | |
|---|---|---|
| From: | Barack, Ron (ron....@sap.com) | |
| Date: | Jul 6, 2010 8:01:02 am | |
| List: | org.oasis-open.lists.sdo | |
Hi Blaise,
I have a question about the "parentXSD" parameter. The javaDoc says it is the
XSD doing the import, but I think you mean the (absolute) URI of the schema (so
that relative locations can be resolved). Is this correct?
Ron
Von: Blaise Doughan [mailto:blai...@oracle.com]
Gesendet: Dienstag, 29. Juni 2010 17:07
An: sd...@lists.oasis-open.org
Betreff: Re: [sdo] SDO-55 - Create an EntityResolver like concept for resolving
imported/included schemas
Hello All,
Attached are the proposed source changes. I have renamed SchemaResolver to
SchemaInputResolver as we may want to have a SchemaOutputResolver as well. Of
course we could have a SchemaResolver that does both input & output, thoughts?
-Blaise
Blaise Doughan wrote: Hello All,
As discussed last week, most SDO implementations have some means of resolving
System URIs. There a couple of use cases for which this is useful:
* The user is loading there XML schema using a non-standard URI (i.e.
pointing to somewhere on there class path).
* The user is specifying imported/included XML schemas using a relative path.
In the EclipseLink SDO implementation we have introduced the concept of a
SchemaResolver. This interface has the following signature:
public interface SchemaResolver {
/**
* @param parentXSD - The XSD doing the import or included (null for root
schemas), the system id can be obtained to resolve relative URIs
* @param namespace - The namespace portion of the import/include
* @param systemID - The URI representing the location of the XML schema.
*/
public javax.xml.transform.Source resolveSchema(javax.xml.transform.Source
parentXSD, String namespace, String systemID);
}
Java SE also has the concept of an LSResourceResolver
(http://java.sun.com/javase/6/docs/api/org/w3c/dom/ls/LSResourceResolver.html).
This approach has the benefit of working well with the javax.xml.validation
APIs.
Hopefully we can get some discussion on this topic, in order to come up with a
solution that works for everyone.
-Blaise






.zip