catch(JBossXBException e)
{
throw new JBossXBRuntimeException(e.getMessage(), e);
}
JBossXBParser parser = unmarshaller.getParser();
if(validation != null)
{
parser.setFeature(Unmarshaller.VALIDATION, validation.booleanValue());
}
if(namespaces != null)
{
parser.setFeature(Unmarshaller.NAMESPACES, namespaces.booleanValue());
}
if(features != null)
{
for(Iterator<?> i = features.entrySet().iterator(); i.hasNext();)
{
Map.Entry<?, ?> entry = (Map.Entry<?, ?>)i.next();
if(entry.getValue() != null)
{
Boolean value = (Boolean)entry.getValue();
parser.setFeature((String)entry.getKey(), value.booleanValue());
}
}
}
//parser.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
//parser.setFeature(Unmarshaller.SCHEMA_FULL_CHECKING, true);
try
{
parser.setFeature(Unmarshaller.DYNAMIC_VALIDATION, true);
}
catch(JBossXBRuntimeException e)
{
// dynamic_validation is a required xerces-specific feature
}