(file) Return to XmlParser.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlParser.cpp between version 1.18.6.4 and 1.21

version 1.18.6.4, 2003/08/14 18:31:23 version 1.21, 2003/07/29 20:50:11
Line 247 
Line 247 
     "Common.XmlParser.SEMANTIC_ERROR"     "Common.XmlParser.SEMANTIC_ERROR"
 }; };
  
 // l10n replace _formMessage (comment out the old one)  // l10n TODO replace _formMessage with the commented one and uncomment
   // the new constructors
 /* /*
 static String _formMessage(Uint32 code, Uint32 line, const String& message) static String _formMessage(Uint32 code, Uint32 line, const String& message)
 { {
Line 488 
Line 489 
  
 Boolean XmlParser::_getElementName(char*& p) Boolean XmlParser::_getElementName(char*& p)
 { {
     if (!String::isUTF8(p) ||      if (!isalpha(*p) && *p != '_')
         !(((*p >= 'A') && (*p <= 'Z')) ||  
           ((*p >= 'a') && (*p <= 'z')) ||  
           (*p == '_')))  
         throw XmlException(XmlException::BAD_START_TAG, _line);         throw XmlException(XmlException::BAD_START_TAG, _line);
     p++;  
  
     while ((*p) &&      while (*p &&
            (((*p >= 'A') && (*p <= 'Z')) ||          (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))
             ((*p >= 'a') && (*p <= 'z')) ||  
             ((*p >= '0') && (*p <= '9')) ||  
             *p == '_' || *p == '-' || *p == ':' || *p == '.'))  
         p++;         p++;
  
     // The next character must be a space:     // The next character must be a space:
Line 523 
Line 517 
 { {
     openCloseElement = false;     openCloseElement = false;
  
     if (!String::isUTF8(p) ||      if (!isalpha(*p) && *p != '_')
         !(((*p >= 'A') && (*p <= 'Z')) ||  
           ((*p >= 'a') && (*p <= 'z')) ||  
           (*p == '_')))  
         throw XmlException(XmlException::BAD_START_TAG, _line);         throw XmlException(XmlException::BAD_START_TAG, _line);
     p++;  
  
     while ((*p) &&      while (*p &&
            (((*p >= 'A') && (*p <= 'Z')) ||          (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))
             ((*p >= 'a') && (*p <= 'z')) ||  
             ((*p >= '0') && (*p <= '9')) ||  
             *p == '_' || *p == '-' || *p == ':' || *p == '.'))  
         p++;         p++;
  
     // The next character must be a space:     // The next character must be a space:
Line 564 
Line 551 
  
 void XmlParser::_getAttributeNameAndEqual(char*& p) void XmlParser::_getAttributeNameAndEqual(char*& p)
 { {
     if (!String::isUTF8(p) ||      if (!isalpha(*p) && *p != '_')
         !(((*p >= 'A') && (*p <= 'Z')) ||  
           ((*p >= 'a') && (*p <= 'z')) ||  
           (*p == '_')))  
         throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line);         throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line);
     p++;  
  
     while ((*p) &&      while (*p &&
            (((*p >= 'A') && (*p <= 'Z')) ||          (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))
             ((*p >= 'a') && (*p <= 'z')) ||  
             ((*p >= '0') && (*p <= '9')) ||  
             *p == '_' || *p == '-' || *p == ':' || *p == '.'))  
         p++;         p++;
  
     char* term = p;     char* term = p;
Line 891 
Line 871 
  
         return;         return;
     }     }
     else if (String::isUTF8(p) &&      else if (isalpha(*p) || *p == '_')
              (((*p >= 'A') && (*p <= 'Z')) ||  
               ((*p >= 'a') && (*p <= 'z')) ||  
               (*p == '_')))  
     {     {
         entry.type = XmlEntry::START_TAG;         entry.type = XmlEntry::START_TAG;
         entry.text = p;         entry.text = p;
Line 1118 
Line 1095 
     if (!getAttributeValue(name, tmp))     if (!getAttributeValue(name, tmp))
         return false;         return false;
  
     value = String(tmp,STRING_FLAG_UTF8);      value = tmp;
     return true;     return true;
 } }
  


Legend:
Removed from v.1.18.6.4  
changed lines
  Added in v.1.21

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2