On 10/14/2010 05:10 PM, Philippe Nobili wrote:
> 
> [NB: Maybe this is a silly question, and there is something obvious that
> I have missed...]
> 
> We use xmltool to validate our XML documents (conforming to our in-house
> schema) with xmltool.
> For this, we use the '-s' option of xmltool and provide the path to our
> XML schema. This works fine. For flexiblity reasons, we now have decided
> to use XML catalogs to locate the schema.  So we used the environment
> variable *XML_CATALOG_FILES* (comma separated list of file's path);
> unfortunately, we cannot have *xmltool* locate our schema correctly with
> this mechanism, and we always get the same warning (quite clear):
> 
> *WARNING: Cannot determine which schema to use for validating*
> 
> In our XML instances:
> xmlns="http://www.cggveritas.com/geovation/module/2.0";
> The catalog entry runs like this:
>  <uri name="http://www.cggveritas.com/geovation/module/2.0";
> uri="xsd/module/2.0/module.xsd"/>
> 
> 

The above warning indicates that the problem is not related to XML catalogs.

Without the -s option, xmltool expects your instances to have an
xsi:schemaLocation or an xsi:noNamespaceSchemaLocation attribute.

Example:

---
<foo xmlns="http://www.cggveritas.com/geovation/module/2.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.cggveritas.com/geovation/module/2.0
         http://www.cggveritas.com/geovation/module/2.0/module.xsd";>
  ...
</foo>
---

In the above case, your XML catalog could contain:

---
<uri name="http://www.cggveritas.com/geovation/module/2.0/module.xsd";
     uri="xsd/module/2.0/module.xsd"/>
---

that is, an entry maps a file URI to another file URI.

Note that your <uri> entry is probably incorrect because it seems to map
a namespace URI "http://www.cggveritas.com/geovation/module/2.0"; to a
file URI "xsd/module/2.0/module.xsd".



 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to