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 2002/02/25 22:18:18 UTC
cvs commit: xml-xerces/c/src/xercesc/validators/schema SchemaValidator.cpp SubstitutionGroupComparator.cpp
tng 02/02/25 13:18:18
Modified: c/src/xercesc/validators/schema SchemaValidator.cpp
SubstitutionGroupComparator.cpp
Log:
Schema Fix: Ensure no invalid uri index for UPA checking.
Revision Changes Path
1.3 +7 -1 xml-xerces/c/src/xercesc/validators/schema/SchemaValidator.cpp
Index: SchemaValidator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/SchemaValidator.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SchemaValidator.cpp 7 Feb 2002 16:41:29 -0000 1.2
+++ SchemaValidator.cpp 25 Feb 2002 21:18:18 -0000 1.3
@@ -56,6 +56,9 @@
/*
* $Log: SchemaValidator.cpp,v $
+ * Revision 1.3 2002/02/25 21:18:18 tng
+ * Schema Fix: Ensure no invalid uri index for UPA checking.
+ *
* Revision 1.2 2002/02/07 16:41:29 knoaman
* Fix for xsi:type.
*
@@ -482,7 +485,10 @@
unsigned int uri = fXsiType->getURI();
const XMLCh* localPart = fXsiType->getLocalPart();
- if (uri != XMLElementDecl::fgInvalidElemId || uri != XMLElementDecl::fgPCDataElemId) {
+ if (uri != XMLElementDecl::fgInvalidElemId ||
+ uri != XMLElementDecl::fgPCDataElemId ||
+ uri != XMLContentModel::gEpsilonFakeId ||
+ uri != XMLContentModel::gEOCFakeId) {
// retrieve Grammar for the uri
const XMLCh* uriStr = getScanner()->getURIText(uri);
SchemaGrammar* sGrammar = (SchemaGrammar*) fGrammarResolver->getGrammar(uriStr);
1.2 +17 -3 xml-xerces/c/src/xercesc/validators/schema/SubstitutionGroupComparator.cpp
Index: SubstitutionGroupComparator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/SubstitutionGroupComparator.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SubstitutionGroupComparator.cpp 1 Feb 2002 22:22:47 -0000 1.1
+++ SubstitutionGroupComparator.cpp 25 Feb 2002 21:18:18 -0000 1.2
@@ -56,8 +56,11 @@
/*
* $Log: SubstitutionGroupComparator.cpp,v $
- * Revision 1.1 2002/02/01 22:22:47 peiyongz
- * Initial revision
+ * Revision 1.2 2002/02/25 21:18:18 tng
+ * Schema Fix: Ensure no invalid uri index for UPA checking.
+ *
+ * Revision 1.1.1.1 2002/02/01 22:22:47 peiyongz
+ * sane_include
*
* Revision 1.11 2001/11/28 16:46:03 tng
* Schema fix: Initialize the temporary string as null terminated.
@@ -124,7 +127,8 @@
unsigned int uriId = anElement->getURI();
if (uriId == XMLContentModel::gEOCFakeId ||
uriId == XMLContentModel::gEpsilonFakeId ||
- uriId == XMLElementDecl::fgPCDataElemId)
+ uriId == XMLElementDecl::fgPCDataElemId ||
+ uriId == XMLElementDecl::fgInvalidElemId)
return false;
const XMLCh* uri = fStringPool->getValueForId(uriId);
@@ -241,7 +245,12 @@
unsigned int uriId = element->getURI();
if ((!wother && uriId == wuri) ||
- (wother && uriId != wuri && uriId != XMLContentModel::gEOCFakeId && uriId != XMLContentModel::gEpsilonFakeId))
+ (wother &&
+ uriId != wuri &&
+ uriId != XMLContentModel::gEOCFakeId &&
+ uriId != XMLContentModel::gEpsilonFakeId &&
+ uriId != XMLElementDecl::fgPCDataElemId &&
+ uriId != XMLElementDecl::fgInvalidElemId))
{
return true;
}
@@ -265,7 +274,12 @@
unsigned int subUriId = subsElements->elementAt(i)->getElementName()->getURI();
if ((!wother && subUriId == wuri) ||
- (wother && subUriId != wuri && subUriId != XMLContentModel::gEOCFakeId && subUriId != XMLContentModel::gEpsilonFakeId))
+ (wother &&
+ subUriId != wuri &&
+ subUriId != XMLContentModel::gEOCFakeId &&
+ subUriId != XMLContentModel::gEpsilonFakeId &&
+ subUriId != XMLElementDecl::fgPCDataElemId &&
+ subUriId != XMLElementDecl::fgInvalidElemId))
{
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org