_eatContent = 1;
return;
}
SchemaParticle currentParticle = state.currentParticle();
_wildcardElement = currentParticle;
if (currentParticle.getParticleType() == SchemaParticle.WILDCARD)
{
//_wildcardElement = currentParticle;
QNameSet elemWildcardSet = currentParticle.getWildcardSet();
if (!elemWildcardSet.contains( name ))
{
// Additional processing may be needed to generate more
// descriptive messages
emitFieldError( event, "Element not allowed:", name );
_eatContent = 1;
return;
}
int wildcardProcess = currentParticle.getWildcardProcess();
if (wildcardProcess == SchemaParticle.SKIP)
{
_eatContent = 1;
return;
}
_localElement = _globalTypes.findElement( name );
elementField = _localElement;
if (elementField == null)
{
if (wildcardProcess == SchemaParticle.STRICT)
{
emitFieldError(
event, "Element not allowed (strict wildcard, and no definition found):", name );
}
_eatContent = 1;
return;
}
}
else
{
assert
currentParticle.getParticleType() == SchemaParticle.ELEMENT;
// If the current element particle name does not match the name
// of the event, then the current element is a substitute for
// the current particle. Replace the field with the global
// element for the replacement
if (! currentParticle.getName().equals(name))
{
if (((SchemaLocalElement)currentParticle).blockSubstitution())
{
emitFieldError(event,
"Element substitution not allowed when group head has block='substitution'", name);