You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2003/01/17 20:13:21 UTC

cvs commit: xml-xerces/c/src/xercesc/internal SGXMLScanner.cpp IGXMLScanner2.cpp

knoaman     2003/01/17 11:13:21

  Modified:    c/src/xercesc/internal SGXMLScanner.cpp IGXMLScanner2.cpp
  Log:
  Fix for wildcard attribute validation.
  
  Revision  Changes    Path
  1.11      +4 -3      xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp
  
  Index: SGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SGXMLScanner.cpp	13 Jan 2003 16:30:18 -0000	1.10
  +++ SGXMLScanner.cpp	17 Jan 2003 19:13:21 -0000	1.11
  @@ -2783,7 +2783,7 @@
       //        3. yyy is not XMLUni::fgXMLNSURIName
       //        4. if xxx is not null, then yyy cannot be an empty string.
       const XMLCh* prefPtr = XMLUni::fgZeroLenString;
  -    const unsigned int colonOfs = XMLString::indexOf(attrName, chColon);
  +    const int colonOfs = XMLString::indexOf(attrName, chColon);
       if (colonOfs != -1) {
           prefPtr = &attrName[colonOfs + 1];
   
  @@ -3912,7 +3912,8 @@
       if (wildCardType == XMLAttDef::Any_Any)
           anyEncountered = true;
       else if (wildCardType == XMLAttDef::Any_Other) {
  -        if (attWildCard->getAttName()->getURI() != uriId)
  +        if (attWildCard->getAttName()->getURI() != uriId
  +            && uriId != fEmptyNamespaceId)
               anyEncountered = true;
       }
       else if (wildCardType == XMLAttDef::Any_List) {
  
  
  
  1.9       +4 -3      xml-xerces/c/src/xercesc/internal/IGXMLScanner2.cpp
  
  Index: IGXMLScanner2.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner2.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- IGXMLScanner2.cpp	13 Jan 2003 16:30:18 -0000	1.8
  +++ IGXMLScanner2.cpp	17 Jan 2003 19:13:21 -0000	1.9
  @@ -1074,7 +1074,7 @@
       //        3. yyy is not XMLUni::fgXMLNSURIName
       //        4. if xxx is not null, then yyy cannot be an empty string.
       const XMLCh* prefPtr = XMLUni::fgZeroLenString;
  -    const unsigned int colonOfs = XMLString::indexOf(attrName, chColon);
  +    const int colonOfs = XMLString::indexOf(attrName, chColon);
       if (colonOfs != -1) {
           prefPtr = &attrName[colonOfs + 1];
   
  @@ -2565,7 +2565,8 @@
       if (wildCardType == XMLAttDef::Any_Any)
           anyEncountered = true;
       else if (wildCardType == XMLAttDef::Any_Other) {
  -        if (attWildCard->getAttName()->getURI() != uriId)
  +        if (attWildCard->getAttName()->getURI() != uriId
  +            && uriId != fEmptyNamespaceId)
               anyEncountered = true;
       }
       else if (wildCardType == XMLAttDef::Any_List) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org