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

cvs commit: xml-xerces/c/src/validators/datatype Base64BinaryDatatypeValidator.cpp HexBinaryDatatypeValidator.cpp

tng         01/05/17 11:13:50

  Modified:    c/src/validators/datatype Base64BinaryDatatypeValidator.cpp
                        HexBinaryDatatypeValidator.cpp
  Log:
  Schema Fix: issue error message when binary data is invalid.
  
  Revision  Changes    Path
  1.2       +8 -3      xml-xerces/c/src/validators/datatype/Base64BinaryDatatypeValidator.cpp
  
  Index: Base64BinaryDatatypeValidator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/validators/datatype/Base64BinaryDatatypeValidator.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Base64BinaryDatatypeValidator.cpp	2001/05/16 15:24:40	1.1
  +++ Base64BinaryDatatypeValidator.cpp	2001/05/17 18:13:46	1.2
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: Base64BinaryDatatypeValidator.cpp,v $
  + * Revision 1.2  2001/05/17 18:13:46  tng
  + * Schema Fix: issue error message when binary data is invalid.
  + *
    * Revision 1.1  2001/05/16 15:24:40  tng
    * Schema: Add Base64 and HexBin.  By Pei Yong Zhang.
    *
  @@ -465,13 +468,15 @@
       if (asBase)
           return;
   
  -    unsigned int base64Len = Base64::getDataLength(content);
  -    if (base64Len <= 0) 
  +    int base64Lentemp = Base64::getDataLength(content);
  +    if (base64Lentemp <= 0) 
       {
           ThrowXML(InvalidDatatypeValueException, XMLExcepts::CM_UnaryOpHadBinType);
           //ThrowXML1(InvalidDatatypeValueException, XMLExcepts::VALUE_Not_Base64, content);
           // "Value '"+content+"' is not encoded in Base64" );
       }
  +
  +    unsigned int base64Len = base64Lentemp;
   
       if (((getFacetsDefined() & DatatypeValidator::FACET_MAXLENGTH) != 0) &&
           (base64Len > getMaxLength()))
  
  
  
  1.2       +8 -3      xml-xerces/c/src/validators/datatype/HexBinaryDatatypeValidator.cpp
  
  Index: HexBinaryDatatypeValidator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/validators/datatype/HexBinaryDatatypeValidator.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HexBinaryDatatypeValidator.cpp	2001/05/16 15:24:43	1.1
  +++ HexBinaryDatatypeValidator.cpp	2001/05/17 18:13:47	1.2
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: HexBinaryDatatypeValidator.cpp,v $
  + * Revision 1.2  2001/05/17 18:13:47  tng
  + * Schema Fix: issue error message when binary data is invalid.
  + *
    * Revision 1.1  2001/05/16 15:24:43  tng
    * Schema: Add Base64 and HexBin.  By Pei Yong Zhang.
    *
  @@ -464,13 +467,15 @@
       if (asBase)
           return;
   
  -    unsigned int hexBinLen = HexBin::getDataLength(content);
  -    if (hexBinLen <= 0) 
  +    int hexBinLentemp = HexBin::getDataLength(content);
  +    if (hexBinLentemp <= 0) 
       {
           ThrowXML(InvalidDatatypeValueException, XMLExcepts::CM_UnaryOpHadBinType);
           //ThrowXML1(InvalidDatatypeValueException, XMLExcepts::VALUE_Not_Base64, content);
           // "Value '"+content+"' is not encoded in HexBin" );
       }
  +
  +    unsigned int hexBinLen = hexBinLentemp;
   
       if (((getFacetsDefined() & DatatypeValidator::FACET_MAXLENGTH) != 0) &&
           (hexBinLen > getMaxLength()))
  
  
  

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