// get the property handler
propertyHandler =
MetaPropertyHandlerFactory.getHandler(propertyName);
if (propertyHandler == null) {
throw new XDIMEException(LOCALIZER.format(
"no-meta-property-handler-registered", propertyName));
}
// get the content processor
final String dataTypeAttrValue =
ElementUtils.getAttributeValue(context, attributes,
XDIMESchemata.XHTML2_NAMESPACE, ATTR_NAME_DATA_TYPE);
final ImmutableExpandedName dataType;
if (dataTypeAttrValue == null || dataTypeAttrValue.length() == 0) {
dataType = propertyHandler.getDefaultDataType().getExpandedName();
} else {
dataType = getAsExpandedName(dataTypeAttrValue, context);
}
contentProcessor =
MetaContentProcessorFactory.getProcessor(dataType);
if (contentProcessor == null) {
throw new XDIMEException(LOCALIZER.format(
"no-meta-content-processor-registered", dataTypeAttrValue));
}
// check if this is the right property-data type pair
if (!propertyHandler.isAcceptableType(contentProcessor.getType())) {
throw new XDIMEException(LOCALIZER.format(
"invalid-type-for-meta-property",
new Object[]{dataTypeAttrValue, propertyName}));
}
contentProcessor.startProcess(context, this, attributes);