W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2002

Re: SchemaLocation: schemaLocation value = 'myschema.xsd' must have even number of URIs.

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 3 Oct 2002 16:08:08 +0100
Message-ID: <64604914791.20021003160808@jenitennison.com>
To: Mgr Georg Black <georg.black@seznam.cz>
Cc: xmlschema-dev@w3.org

Hi Georg,

> I am trying to use namespaces. If I changed atribute
> xsi:noNamespaceSchemaLocation to xs:scheamLocation and wrote
> targetNameSpace to .xsd file I get this mistake from my
> parser(Java-Xeres 2.0.0).
>
> SchemaLocation: schemaLocation value = 'myschema.xsd' must have even
> number of URIs.
>
> What is wrong?

The xsi:schemaLocation attribute works a bit differently from the
xsi:noNamespaceSchemaLocation attribute. It takes *pairs* of values in
which the first value is a namespace URI and the second value is the
location of the schema for that namespace, separated by whitespace. So
you need it to look like:

  xsi:schemaLocation="http://www.example.com/namespace
                      myschema.xsd"

instead, where "http://www.example.com/namespace" is whatever target
namespace you're now using in your schema.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Thursday, 3 October 2002 11:15:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT