|Re: [wtp-dev] XML Catalog - namespaces or schemaLocations ... or both|
Paul, The XML Catalog specification can be found here: http://www.oasis-open.org/committees/entity/specs/cs-entity-xml-catalogs-1.0.htmlOne 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. http://www.foo.org/foo.xsd and have an xml file that has a namespace of http://www.foo.org/foo 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:
http://www.oasis-open.org/committees/entity/specs/cs-entity-xml-catalogs-1.0.html#s.rewritesystem And the corresponding rewriteURI. Dave 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 "http://www.foo.org/foo.xsd" -> "schemas/foo.xsd".
Back to the top