diff --git a/src/xercesc/validators/datatype/AbstractStringValidator.cpp b/src/xercesc/validators/datatype/AbstractStringValidator.cpp index 5d70e55a36a0a4f5860af9d5b16ba135bad08f53..88c5ed91f904e16b9d4376b86c3b1237a2cb8471 100644 --- a/src/xercesc/validators/datatype/AbstractStringValidator.cpp +++ b/src/xercesc/validators/datatype/AbstractStringValidator.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.19 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.18 2003/12/31 10:38:00 amassari * Made virtual function checkAdditionalFacet 'const', so that it matches the declaration in a derived class * @@ -692,7 +695,9 @@ void AbstractStringValidator::checkContent( const XMLCh* const conte if (getRegex() ==0) { try { // REVISIT: cargillmem fMemoryManager or manager? - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) { diff --git a/src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp b/src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp index 76687e882f96a6124e50765eee7ba1c7d2901e44..7875f1a56b300b2bca7ec070803cafd149330ce2 100644 --- a/src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp +++ b/src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.14 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.13 2003/12/23 21:50:36 peiyongz * Absorb exception thrown in getCanonicalRepresentation and return 0, * only validate when required @@ -208,7 +211,9 @@ void BooleanDatatypeValidator::checkContent( const XMLCh* const cont // lazy construction if (getRegex() ==0) { try { - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) { diff --git a/src/xercesc/validators/datatype/DateTimeValidator.cpp b/src/xercesc/validators/datatype/DateTimeValidator.cpp index 3e0725f9410ab8dce078479a4a0cf0a9a2065505..00617c0590d69ebb61970ef7d08709d271f827fc 100644 --- a/src/xercesc/validators/datatype/DateTimeValidator.cpp +++ b/src/xercesc/validators/datatype/DateTimeValidator.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.14 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.13 2003/12/19 23:02:25 cargilld * More memory management updates. * @@ -198,7 +201,9 @@ void DateTimeValidator::checkContent(const XMLCh* const content // lazy construction if (getRegex() ==0) { try { - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) { diff --git a/src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp b/src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp index 0a434c0d1179f2c26020cfb95d66330dabff41de..c43a09fcac18b1825711f285c4013d73caeaf6b2 100644 --- a/src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp +++ b/src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.24 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.23 2004/01/06 04:42:53 neilg * On some platforms, it is problematic to throw a different exception from inside the catch block of another exception * @@ -565,7 +568,9 @@ void DecimalDatatypeValidator::checkContent(const XMLCh* const conte if (getRegex() ==0) { try { // REVISIT: cargillmem fMemoryManager vs manager - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) { diff --git a/src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp b/src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp index 88a747072d78bf4083a22188d0a7ce90caa6d761..5720b807ae6959433a3e2da667144e3d569d612d 100644 --- a/src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp +++ b/src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.12 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.11 2004/01/03 00:04:36 peiyongz * using ctor/parseContent to avoid exception thrown from ctor * @@ -288,7 +291,9 @@ void DoubleDatatypeValidator::checkContent(const XMLCh* const conten // lazy construction if (getRegex() ==0) { try { - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) { diff --git a/src/xercesc/validators/datatype/FloatDatatypeValidator.cpp b/src/xercesc/validators/datatype/FloatDatatypeValidator.cpp index 209691efff2068e883e17aef9550c30af9c6cf70..387d7c8e9adbd3c4c63622b20dcea2dfda088712 100644 --- a/src/xercesc/validators/datatype/FloatDatatypeValidator.cpp +++ b/src/xercesc/validators/datatype/FloatDatatypeValidator.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.13 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.12 2004/01/03 00:04:36 peiyongz * using ctor/parseContent to avoid exception thrown from ctor * @@ -292,7 +295,9 @@ void FloatDatatypeValidator::checkContent(const XMLCh* const content // lazy construction if (getRegex() ==0) { try { - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) { diff --git a/src/xercesc/validators/datatype/ListDatatypeValidator.cpp b/src/xercesc/validators/datatype/ListDatatypeValidator.cpp index 0838f52c6a4c60d894a1d57574b9c91133c2c72a..7739a5031e08335efdf3e3f2e12ece9fc35d3f71 100644 --- a/src/xercesc/validators/datatype/ListDatatypeValidator.cpp +++ b/src/xercesc/validators/datatype/ListDatatypeValidator.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.19 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.18 2003/12/31 02:34:41 neilg * fix one more buffer overrun, affecting boolean lists * @@ -279,7 +282,9 @@ void ListDatatypeValidator::checkContent( BaseRefVectorOf<XMLCh>* to if (getRegex() == 0) { try { - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) { diff --git a/src/xercesc/validators/datatype/UnionDatatypeValidator.cpp b/src/xercesc/validators/datatype/UnionDatatypeValidator.cpp index fb87977cdb5ba6b24358a20a8afbd6c93a87b74a..f55ebe84e5de312fa7c191d5d8ebb510d0da4cd5 100644 --- a/src/xercesc/validators/datatype/UnionDatatypeValidator.cpp +++ b/src/xercesc/validators/datatype/UnionDatatypeValidator.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.23 2004/01/06 18:13:59 peiyongz + * using the no-exception-thrown ctor + * * Revision 1.22 2003/12/23 21:50:36 peiyongz * Absorb exception thrown in getCanonicalRepresentation and return 0, * only validate when required @@ -407,7 +410,9 @@ void UnionDatatypeValidator::checkContent(const XMLCh* const content if (getRegex() == 0) { try { - setRegex(new (fMemoryManager) RegularExpression(getPattern(), SchemaSymbols::fgRegEx_XOption, fMemoryManager)); + RegularExpression* regEx = new (fMemoryManager) RegularExpression(fMemoryManager); + regEx->setPattern(getPattern(), SchemaSymbols::fgRegEx_XOption); + setRegex(regEx); } catch (XMLException &e) {