Unknown namespace URI "http://www.w3.org/2001/XMLSchema-instance"
hi all,
I get the following error when try to validate an xml document
against a schema file.
LSX-00023: Unknown namespace
URI "http://www.w3.org/2001/XMLSchema-instance"
Validation failed, error 23
My xml document is quite simple and look like:
----------------------------------------------
<?xml version="1.0"?>
<BookStore xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="BookStore.xsd">
<Book>
<Title>My Life and Times</Title>
<Author>Paul McCartney</Author>
<Date>1998</Date>
<ISBN>1-56592-235-2</ISBN>
<Publisher>McMillin Publishing</Publisher>
</Book>
</BookStore>
Schema looks like:
------------------
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:element name="BookStore">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Book" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Book">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Title"/>
<xsd:element ref="Author"/>
<xsd:element ref="Date"/>
<xsd:element ref="ISBN"/>
<xsd:element ref="Publisher"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Title" type="xsd:string"/>
<xsd:element name="Author" type="xsd:string"/>
<xsd:element name="Date" type="xsd:string"/>
<xsd:element name="ISBN" type="xsd:string"/>
<xsd:element name="Publisher" type="xsd:string"/>
</xsd:schema>
I changed one thing in the URI replacing (../2001/..
with ../1999/..) and it worked but then i got another error msg
saying..
LSX-00262: Undefined attribute "xsi:noNamespaceSchemaLocation"
Validation failed, error 262
Anyone with some good idea how to solve the problem? Thanks!
Usman.