Author: amassari
Date: Fri Mar 14 04:35:38 2008
New Revision: 637065

URL: http://svn.apache.org/viewvc?rev=637065&view=rev
Log:
If the XPath parser returns 'false', it means the XPath is invalid... 
(XERCESC-1787)

Modified:
    
xerces/c/branches/xerces-2/src/xercesc/validators/schema/identity/XercesXPath.cpp

Modified: 
xerces/c/branches/xerces-2/src/xercesc/validators/schema/identity/XercesXPath.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/branches/xerces-2/src/xercesc/validators/schema/identity/XercesXPath.cpp?rev=637065&r1=637064&r2=637065&view=diff
==============================================================================
--- 
xerces/c/branches/xerces-2/src/xercesc/validators/schema/identity/XercesXPath.cpp
 (original)
+++ 
xerces/c/branches/xerces-2/src/xercesc/validators/schema/identity/XercesXPath.cpp
 Fri Mar 14 04:35:38 2008
@@ -390,7 +390,9 @@
 
     ValueVectorOf<int>                tokens(16, fMemoryManager);
     XPathScannerForSchema             scanner(stringPool);
-    bool                              success = 
scanner.scanExpression(fExpression, 0, length, &tokens);
+    if(!scanner.scanExpression(fExpression, 0, length, &tokens))
+        ThrowXMLwithMemMgr(XPathException, 
XMLExcepts::XPath_TokenNotSupported, fMemoryManager);
+
     bool                              firstTokenOfLocationPath=true;
     unsigned int                      tokenCount = tokens.size();
     RefVectorOf<XercesStep>*          stepsVector = new (fMemoryManager) 
RefVectorOf<XercesStep>(16, true, fMemoryManager);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to