Can you create a JIRA issue and attach a simple testcase?
Thanks,
Alberto
[email protected] wrote:
Hi
We are using xerces 2.8 and we make heavy use of the SAXtoXMLReader for
doing schema validation.
Recently we discovered that the parser does not detect schema violation
for empty XML tags for integer values.
For, example if there is a xml attribute named ABC which is defined as
integer or numeric type in the schema and we pass it as <ABC><./ABC> in
the xml document then the parser does not report any error for this. Is
this a known issue ??
I have used to following code to initialize the parser
SAX2XMLReader* m_pParser;
try
{
XMLPlatformUtils::Initialize();
m_pParser=XMLReaderFactory::createXMLReader();
//Setting the various parsing options
m_pParser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);
m_pParser->setFeature(XMLUni::fgSAX2CoreValidation, true);
m_pParser->setFeature(XMLUni::fgXercesDynamic, true);
m_pParser->setFeature(XMLUni::fgXercesSchema, true);
m_pParser->setFeature(XMLUni::fgXercesIdentityConstraintChecking,true);
m_pParser->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
m_pParser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes,true);
m_pParser->setContentHandler(m_pInstance);
m_pParser->setErrorHandler(m_pInstance);
}
catch(const SAXParseException& e)
{
char* message = XMLString::transcode(e.getMessage());
cout << "SAX Exception: " << message << endl;
XMLString::release(&message);
}
Regards
Shyam
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com