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 2001/10/16 19:01:34 UTC
cvs commit: xml-xerces/c/src/validators/schema TraverseSchema.cpp
knoaman 01/10/16 10:01:34
Modified: c/src/validators/schema TraverseSchema.cpp
Log:
Extra constraint checking.
Revision Changes Path
1.53 +9 -12 xml-xerces/c/src/validators/schema/TraverseSchema.cpp
Index: TraverseSchema.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/TraverseSchema.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- TraverseSchema.cpp 2001/10/15 19:29:26 1.52
+++ TraverseSchema.cpp 2001/10/16 17:01:34 1.53
@@ -55,7 +55,7 @@
*/
/*
- * $Id: TraverseSchema.cpp,v 1.52 2001/10/15 19:29:26 knoaman Exp $
+ * $Id: TraverseSchema.cpp,v 1.53 2001/10/16 17:01:34 knoaman Exp $
*/
// ---------------------------------------------------------------------------
@@ -1189,11 +1189,10 @@
// ------------------------------------------------------------------
// Handle "ref="
// ------------------------------------------------------------------
- if (nameEmpty || (!refEmpty && !topLevel)) {
+ if (!topLevel) {
- if (!nameEmpty) {
- reportSchemaError(XMLUni::fgXMLErrDomain, XMLErrs::DeclarationWithNameRef,
- SchemaSymbols::fgELT_GROUP, name);
+ if (refEmpty) {
+ return 0;
}
return processGroupRef(elem, ref);
@@ -1241,8 +1240,8 @@
}
else {
- if (elem.getAttributeNode(SchemaSymbols::fgATT_MINOCCURS) != 0
- || elem.getAttributeNode(SchemaSymbols::fgATT_MAXOCCURS) != 0) {
+ if (content.getAttributeNode(SchemaSymbols::fgATT_MINOCCURS) != 0
+ || content.getAttributeNode(SchemaSymbols::fgATT_MAXOCCURS) != 0) {
reportSchemaError(XMLUni::fgXMLErrDomain, XMLErrs::MinMaxOnGroupChild);
}
@@ -1327,16 +1326,14 @@
// ------------------------------------------------------------------
// Handle "ref="
// ------------------------------------------------------------------
- if (nameEmpty || (!refEmpty && !topLevel)) {
+ if (!topLevel) {
- if (!nameEmpty) {
- reportSchemaError(XMLUni::fgXMLErrDomain, XMLErrs::DeclarationWithNameRef,
- SchemaSymbols::fgELT_ATTRIBUTEGROUP, name);
+ if (refEmpty) {
+ return 0;
}
return processAttributeGroupRef(elem, ref, typeInfo);
}
-
// ------------------------------------------------------------------
// Handle "name="
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org