You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2008/03/14 12:35:40 UTC

svn commit: r637065 - /xerces/c/branches/xerces-2/src/xercesc/validators/schema/identity/XercesXPath.cpp

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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org