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:

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.

What you might be interested in and I don't know if the WTP XML Catalog API supports this is the concept of a rewrite, which might fit your needs:

And the corresponding rewriteURI.


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".

Back to the top