Page 1 of 1

XML catalog uri element

Posted: Thu Sep 08, 2005 2:05 am
by jmakeig
I can't seem to get the uri element to work in an XML catalog in the 6.0.0 version of the plugin for Eclipse 3.1. The rewriteSystem declaration below works fine, but when I try to validate a document whose root element is in the namespace, http://my.uri.goes/here/A, I get an error saying Oxygen can't find the declaration of the root element. I turned on verbose reporting in the catalog preferences and nothing even shows up on the console. Any ideas what's going on? Or what's not going on?

Code: Select all

Any help would be much appreciated.

Posted: Thu Sep 08, 2005 2:10 am
by jmakeig
Make that version 6.1.0 of the Eclipse plugin.

Posted: Thu Sep 08, 2005 10:15 am
by george

The catalog is used as an entity resolver on the XML Parser. That means it never gets a chance to resolve a namespace, it will be called by the XML parser to resolve the system ID that represents the schema location.

For mapping between namespaces to schemas you may use the Options->Preferences -- Editor / Tag Insight / Default
and map a namespace to a schema. Those schemas are used both for content completion and validation when the document does not define a schema.

Best Regards,

Posted: Thu Sep 08, 2005 8:25 pm
by jmakeig
As usual, a quick and informative reply. I'll try what you recommend. Thanks.

Posted: Thu Sep 08, 2005 11:23 pm
by jmakeig
Your instructions seem to work for a document that can be validated with a single schema (or a schema that explicitly imports other namespaces). However, I've got an xs:any declaration, such as

Code: Select all

My instance contains an element, e.g. b:B, as an xs:any instance. b:B is not defined in the schema that defines the document's root element. I've mapped the namespace associated with the b prefix with oXygen as you've specified below. However, the validator complains that it can't find the definition of b:B. Is this is bug or is this beyond how schema location look-ups should work?