entry.getKey(), context.getPath(), "Element occurs less times than required." ) )
{
particle.setAttribute( "minOccurs", entry.getValue().toString() );
}
else
throw new XmlException( "Element '" + entry.getKey().getLocalPart()
+ "' required at least minOccurs times!" );
}
if( !particle.getAttribute( "maxOccurs" ).equals( "unbounded" )
&& Integer.parseInt( particle.getAttribute( "maxOccurs" ) ) < entry.getValue() )
{
if( context.getHandler().callback( ConflictHandler.Event.MODIFICATION, ConflictHandler.Type.TYPE,
new QName( schema.getNamespace(), context.getAttribute( "typeName" ) ), context.getPath(),
"Element occurs more times than allowed." ) )
{
particle.setAttribute( "maxOccurs", entry.getValue().toString() );
}
else
throw new XmlException( "Element '" + entry.getKey().getLocalPart()
+ "' must not occur more than maxOccurs times!" );
}
}
return true;
}