knoaman 2002/08/26 22:56:39 Modified: c/src/xercesc/internal XMLScanner.hpp XMLScanner.cpp Log: Identity Constraint: handle case of recursive elements. Revision Changes Path 1.11 +4 -1 xml-xerces/c/src/xercesc/internal/XMLScanner.hpp Index: XMLScanner.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XMLScanner.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- XMLScanner.hpp 16 Aug 2002 15:46:17 -0000 1.10 +++ XMLScanner.hpp 27 Aug 2002 05:56:39 -0000 1.11 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.11 2002/08/27 05:56:39 knoaman + * Identity Constraint: handle case of recursive elements. + * * Revision 1.10 2002/08/16 15:46:17 knoaman * Bug 7698 : filenames with embedded spaces in schemaLocation strings not handled properly. * @@ -736,7 +739,7 @@ // ----------------------------------------------------------------------- // IdentityConstraints Activation methods // ----------------------------------------------------------------------- - void activateSelectorFor(IdentityConstraint* const ic); + void activateSelectorFor(IdentityConstraint* const ic, const int initialDepth); // ----------------------------------------------------------------------- // Grammar preparsing methods 1.20 +9 -9 xml-xerces/c/src/xercesc/internal/XMLScanner.cpp Index: XMLScanner.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XMLScanner.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- XMLScanner.cpp 14 Aug 2002 15:20:38 -0000 1.19 +++ XMLScanner.cpp 27 Aug 2002 05:56:39 -0000 1.20 @@ -1893,7 +1893,7 @@ if (ic && (ic->getType() != IdentityConstraint::KEYREF)) { matcher->endDocumentFragment(); - fValueStoreCache->transplant(ic); + fValueStoreCache->transplant(ic, matcher->getInitialDepth()); } else if (!ic) { matcher->endDocumentFragment(); @@ -1908,7 +1908,7 @@ if (ic && (ic->getType() == IdentityConstraint::KEYREF)) { - ValueStore* values = fValueStoreCache->getValueStoreFor(ic); + ValueStore* values = fValueStoreCache->getValueStoreFor(ic, matcher->getInitialDepth()); if (values) { // nothing to do if nothing matched! values->endDcocumentFragment(fValueStoreCache); @@ -3688,10 +3688,10 @@ fValueStoreCache->startElement(); fMatcherStack->pushContext(); - fValueStoreCache->initValueStoresFor((SchemaElementDecl*) elemDecl); + fValueStoreCache->initValueStoresFor((SchemaElementDecl*) elemDecl, (int) elemDepth); for (unsigned int i = 0; i < count; i++) { - activateSelectorFor(((SchemaElementDecl*) elemDecl)->getIdentityConstraintAt(i)); + activateSelectorFor(((SchemaElementDecl*) elemDecl)->getIdentityConstraintAt(i), (int) elemDepth); } // call all active identity constraints @@ -3776,7 +3776,7 @@ if (ic && (ic->getType() != IdentityConstraint::KEYREF)) { matcher->endDocumentFragment(); - fValueStoreCache->transplant(ic); + fValueStoreCache->transplant(ic, matcher->getInitialDepth()); } else if (!ic) { matcher->endDocumentFragment(); @@ -3791,7 +3791,7 @@ if (ic && (ic->getType() == IdentityConstraint::KEYREF)) { - ValueStore* values = fValueStoreCache->getValueStoreFor(ic); + ValueStore* values = fValueStoreCache->getValueStoreFor(ic, matcher->getInitialDepth()); if (values) { // nothing to do if nothing matched! values->endDcocumentFragment(fValueStoreCache); @@ -4259,14 +4259,14 @@ // --------------------------------------------------------------------------- // XMLScanner: IC activation methos // --------------------------------------------------------------------------- -void XMLScanner::activateSelectorFor(IdentityConstraint* const ic) { +void XMLScanner::activateSelectorFor(IdentityConstraint* const ic, const int initialDepth) { IC_Selector* selector = ic->getSelector(); if (!selector) return; - XPathMatcher* matcher = selector->createMatcher(fFieldActivator); + XPathMatcher* matcher = selector->createMatcher(fFieldActivator, initialDepth); fMatcherStack->addMatcher(matcher); matcher->startDocumentFragment();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]