knoaman     2002/12/04 10:21:23

  Modified:    c/src/xercesc/validators/schema/identity XercesXPath.cpp
  Log:
  Identity constraint fix.
  
  Revision  Changes    Path
  1.4       +21 -4     
xml-xerces/c/src/xercesc/validators/schema/identity/XercesXPath.cpp
  
  Index: XercesXPath.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/validators/schema/identity/XercesXPath.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XercesXPath.cpp   4 Nov 2002 14:47:42 -0000       1.3
  +++ XercesXPath.cpp   4 Dec 2002 18:21:23 -0000       1.4
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.4  2002/12/04 18:21:23  knoaman
  + * Identity constraint fix.
  + *
    * Revision 1.3  2002/11/04 14:47:42  tng
    * C++ Namespace Support.
    *
  @@ -750,13 +753,27 @@
                   addToken(tokens, XercesXPath::EXPRTOKEN_PERIOD);
                   starIsMultiplyOperator = true;
                   currentOffset++;
  -            } else {                    // '.'
  +            } else if (ch == chPipe) { // '|'
  +                addToken(tokens, XercesXPath::EXPRTOKEN_PERIOD);
  +                starIsMultiplyOperator = true;
  +                currentOffset++;
  +            } else if (XMLReader::isWhitespace(ch)) {
  +                do {
  +                    if (++currentOffset == endOffset)
  +                        break;
  +
  +                    ch = data[currentOffset];
  +                } while (XMLReader::isWhitespace(ch));
  +
  +                if (currentOffset == endOffset || ch == chPipe) {
  +                                 addToken(tokens, XercesXPath::EXPRTOKEN_PERIOD);
  +                    starIsMultiplyOperator = true;
  +                    break;
  +                }
  +            } else {
                   ThrowXML(XPathException, XMLExcepts::XPath_InvalidChar);
               }
   
  -            if (currentOffset == endOffset) {
  -                break;
  -            }
               break;
           case CHARTYPE_ATSIGN:           // '@'
               addToken(tokens, XercesXPath::EXPRTOKEN_ATSIGN);
  
  
  

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

Reply via email to