You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by bo...@apache.org on 2008/02/13 08:35:40 UTC
svn commit: r627295 -
/xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp
Author: borisk
Date: Tue Feb 12 23:35:39 2008
New Revision: 627295
URL: http://svn.apache.org/viewvc?rev=627295&view=rev
Log:
Make sure the base type was provided when trying to resolve the schema grammar (addition to the previous fix)
Modified:
xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp
Modified: xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp?rev=627295&r1=627294&r2=627295&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp Tue Feb 12 23:35:39 2008
@@ -1490,16 +1490,21 @@
}
// Find the schema grammar for the base element using the base type as
- // a reference.
+ // a reference if it is available (it is unavailable if we are checking
+ // element group restriction which happens in redefine).
//
- SchemaGrammar* bGrammar = currentGrammar;
- const XMLCh* baseTypeURI = baseInfo->getTypeUri ();
+ SchemaGrammar* bGrammar = dGrammar;
- if (baseTypeURI != 0 && *baseTypeURI != 0) // Non-empty namespace.
- bGrammar= (SchemaGrammar*) fGrammarResolver->getGrammar(baseTypeURI);
+ if (baseInfo)
+ {
+ const XMLCh* baseTypeURI = baseInfo->getTypeUri ();
- if (!bGrammar) { //something is wrong
- return;
+ if (baseTypeURI != 0 && *baseTypeURI != 0) // Non-empty namespace.
+ bGrammar= (SchemaGrammar*) fGrammarResolver->getGrammar(baseTypeURI);
+
+ if (!bGrammar) { //something is wrong
+ return;
+ }
}
SchemaElementDecl* baseElemDecl =
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org