if (sle.blockExtension() || sle.blockRestriction())
{
for ( SchemaType t = xsiType ; ! t.equals( elementType ) ;
t = t.getBaseType() )
{
if ((t.getDerivationType() == SchemaType.DT_RESTRICTION && sle.blockRestriction()) ||
(t.getDerivationType() == SchemaType.DT_EXTENSION && sle.blockExtension()))
{
//need to find a way to get the right type
emitFieldError( event, XmlErrorCodes.ELEM_LOCALLY_VALID$XSI_TYPE_PROHIBITED_SUBST,
new Object[] { xsiType, QNameHelper.pretty(sle.getName()) },