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/10/15 22:57:27 UTC
cvs commit: xml-xerces/c/src/validators/datatype AbstractStringValidator.cpp
tng 01/10/15 13:57:27
Modified: c/src/validators/datatype AbstractStringValidator.cpp
Log:
Schema: we should propagate the exception thrown from checkContent.
Revision Changes Path
1.6 +18 -20 xml-xerces/c/src/validators/datatype/AbstractStringValidator.cpp
Index: AbstractStringValidator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/datatype/AbstractStringValidator.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractStringValidator.cpp 2001/10/09 21:00:54 1.5
+++ AbstractStringValidator.cpp 2001/10/15 20:57:27 1.6
@@ -56,6 +56,9 @@
/*
* $Log: AbstractStringValidator.cpp,v $
+ * Revision 1.6 2001/10/15 20:57:27 tng
+ * Schema: we should propagate the exception thrown from checkContent.
+ *
* Revision 1.5 2001/10/09 21:00:54 peiyongz
* . init() take 1 arg,
* . make inspectFacetBase() virtual to allow ListDTV provide its own method,
@@ -146,7 +149,7 @@
{
if (enums)
- setEnumeration(enums, false);
+ setEnumeration(enums, false);
assignFacet();
inspectFacet();
@@ -164,7 +167,7 @@
{
RefHashTableOf<KVStringPair>* facets = getFacets();
-
+
if (!facets)
return;
@@ -376,7 +379,7 @@
REPORT_FACET_ERROR(thisLength
, baseLength
, XMLExcepts::FACET_Len_baseLen)
- }
+ }
}
/***
@@ -464,22 +467,12 @@
{
int i = 0;
int enumLength = getEnumeration()->size();
- try
- {
- for ( ; i < enumLength; i++)
- {
- // ask parent do a complete check
- pBaseValidator->checkContent(getEnumeration()->elementAt(i), false);
- // enum shall pass this->checkContent() as well.
- checkContent(getEnumeration()->elementAt(i), false);
- }
- }
-
- catch (...) //XMLException&
+ for ( ; i < enumLength; i++)
{
- ThrowXML1(InvalidDatatypeFacetException
- , XMLExcepts::FACET_enum_base
- , getEnumeration()->elementAt(i));
+ // ask parent do a complete check
+ pBaseValidator->checkContent(getEnumeration()->elementAt(i), false);
+ // enum shall pass this->checkContent() as well.
+ checkContent(getEnumeration()->elementAt(i), false);
}
}
@@ -500,7 +493,7 @@
The reason of this inheriting (or copying values) is to ease
schema constraint checking, so that we need NOT trace back to our
very first base validator in the hierachy. Instead, we are pretty
- sure checking against immediate base validator is enough.
+ sure checking against immediate base validator is enough.
***/
AbstractStringValidator *pBaseValidator = (AbstractStringValidator*) getBaseValidator();
@@ -548,7 +541,7 @@
setFixed(getFixed() | pBaseValidator->getFixed());
// inherit additional facet
- inheritAdditionalFacet();
+ inheritAdditionalFacet();
} // end of inheritance
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org