Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] XML Catalog - namespaces or schemaLocations ... or both

The XML Catalog specification can be found here:
Yes, I tried to digest it, without much luck.  There seems to be a lot of circular definition, such as: "The system entry indicates that an entity manager must use the associated URI reference to locate the replacement text for an entity with the specified system identifier."  I'm still unclear what the "system" term is referring to.  I'm hoping for a layman's "use the uri tag here, the public tag here, and the system tag here ..."  The extension point description doesn't seem to help me much in this regard.  It *seems* to me that public and system are pre-XML Schema terms, and since we are not having to deal with anything other than schemas re: JPA (and I should note that my pre-XML Schema knowledge is ... absent), I might be able to safely ignore those.

One thing to keep in mind is that a Namespace isn't necessarily a resolvable web location.   It's just a unique identifier for a set of elements.    DTDs have no concept of a namespace it only pertains to XML Schemas and the XML Namespace specification if an XML Parser implements it.

The above is a link to the namespace specification.   In particular, you can't take an XML Schema that has a targetnamespace specified as and have an xml file that has a namespace of and have the XML validate correctly against the specification.   The namespace in the XML file has to match up with the namespace in the XSD.

So, targetnamespace in the schemas has to match a corresponding namespace in the XML file.   So doing the proposed redirection wouldn't work.
I understand that a namespace does not equal (necessarily) the web location for a schema.  Perhaps I didn't word my example quite accurately.  In my example, the plugin provider maps the web location "" to the local location "schemas/foo.xsd" (just as done in org.eclipse.jst/wst.standard.schemas), so that documents that specify the schema location using the web address are redirected to the local schema instead.  And the user maps the namespace "" (which *is* the namespace declared in the schema document) to the web location "" in her preferences, so that documents which have no schema location, but which use that namespace, are redirected to the web location for the schema.  My question is if this is theoretically possible within WTP (knowing that I cannot currently map a namespace to a web-based URI schema location), and whether or not it is then possible to redirect the user's redirection (which would normally be to the web location) to the *local* schema location, which has already been provided for her by the plugin provider (i.e. namespace -> web location -> local location) without her having to download a second copy of the schema for her own personal use.

Paul Fullbright
Oracle Corp.
Eclipse Dali/Java Persistence Tools Development

Paul Fullbright wrote:

One additional question:  is it possible (either for a plugin provider or for a user) to map a namespace to a /web location/ of a schema?  Relatedly, is it possible to map a namespace to a web location, which itself is then mapped to a local location, perhaps in an existing plugin?  (for example, plugin provider provides a local schema foo.xsd, for which he adds the xml catalog entry "" -> "schemas/foo.xsd".

wtp-dev mailing list

Back to the top