Hi Group,

       I have a query in xerces-C++ parser regarding the validation of input
xml document against it's schema document. I am not able to provide the
correct value for the parameter, SchemaLocation in the input xml document. I
went through the mailing list mails regarding the information for the usage
of SchemaLocation, but with no much relevant information which I can apply
to get the validation done. Somebody please suggest the correct way of using
it. Since I am new to Xerces, don't know the much usage of the same. Both
schema file and xml file is in the same folder in the file system. 

I am getting the following error in xerces validation,

"The schemaLocation attribute does not contain pairs of values."

       

My schema file:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">

       <xs:element name="a">

              <xs:complexType>

                     <xs:sequence>

                            <xs:element ref="b"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="b">

              <xs:complexType/>

       </xs:element>

</xs:schema>

 

       My xml File:

<?xml version="1.0" encoding="UTF-8"?>

<a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:SchemaLocation="http://www.w3.org/2001/XMLSchema a.xsd">

       <b/>

</a>

       Awaiting a positive response.

 

Thanks,

Nagesh.

Reply via email to