It looks to me like the error is as reported: your schemaLocation string
does not contain namespace/location URI pairs (separated by spaces).
See http://www.w3.org/TR/xmlschema-0/#ref40.  I'd expect validation to
fail if a) there are an odd number of values (as in your example) or b)
one or more values is not a well-formed URI.

-----Original Message-----
From: bharath s [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 6:55 AM
To: [email protected]
Subject: SCHEMA

Hi all,

Im trying to validate the sample xml file given with
xerces2.8source..i.e..personnel.xml  against the schema
personal.xsd

Im doing this

  parser->setFeature(XMLUni::fgXercesSchema, true);
        parser->setFeature(XMLUni::fgDOMValidation, true);
        parser->setFeature(XMLUni::fgDOMNamespaces, true);
        parser->setFeature(XMLUni::fgDOMDatatypeNormalization, true);
        parser->setFeature(XMLUni::fgXercesValidateAnnotations, true);
        parser->setFeature(XMLUni::fgXercesSkipDTDValidation, true);
        XMLCh* test=XMLString::transcode("personal.xsd");

parser->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation,test);
        parser->setFeature( XMLUni::fgXercesSchemaFullChecking, true);

        myhandler* errHandler = new myhandler();
        parser->setErrorHandler(errHandler);//Set error hadler to our
own
handler to display appropriate messages
        char* xmlFile = "personnel.xml";
        DOMDocument *doc = 0;
        try {
            doc = parser->parseURI(xmlFile);//Parse the xml file into a
DOM
tree
        }


But the program is giving an error

The schemaLocation attribute does not contain pairs of values.
At line 4
At column 50
terminate called after throwing an instance of
'xercesc_2_8::DOMException'
Aborted (core dumped)


I need some help...Plz...


Thanks in advance,

Bharath Shankar

Reply via email to