Dear All,

I have recently started to experiment with Schema and Xerces. When I
parse (with sax.SAXCount) the instance document (see below), the
following error message is given:

[Error] foo.xml:6.2: Schema error: prefix : [] can not be resolved to a
URI.
foo.xml: 1870 ms (3 elems, 3 attrs, 16 paces, 9 chars)

This is the small test file I was trying:

---

<?xml version="1.0" ?>

<Foo:Main xmlns:Foo="http://www.foo.com/Foo";
       xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
       xsi:schemaLocation="http://www.foo.com/Foo foo.xsd"
>

  <Foo:Child>
      <Foo:Name>Some Name</Foo:Name>
  </Foo:Child>

</Foo:Main>

--

and the corresponding Schema file is:

--

<?xml version="1.0" ?>

<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema";
            xmlns:Foo="http://www.foo.com/Foo";
            targetNamespace="http://www.foo.com/Foo";
            elementFormDefault="qualified"
>

  <xsd:complexType name="ChildType">
    <xsd:element name="Name" type="string" />
  </xsd:complexType>

  <xsd:complexType name="MainType">
    <xsd:element name="Child" type="Foo:ChildType" />
  </xsd:complexType>

  <xsd:element name="Main" type="Foo:MainType" />

</xsd:schema>

--

Can somebody fill me in what exactly is wrong. It seems that the
instance file is correct, but apparently some prefix gives the problem.
But which prefix?

Thanks,
Andre
begin:vcard 
n:Juffer;Andre
x-mozilla-html:FALSE
url:http://www.biochem.oulu.fi/tutkimus/Biocomputing
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Andre Juffer
end:vcard

Reply via email to