* @return The calculated attribute type.
* @throws TilesException If the type is not recognized.
*/
private AttributeType calculateType(Attribute attr,
TilesRequestContext request) throws TilesException {
AttributeType type;
Object valueContent = attr.getValue();
if (valueContent instanceof String) {
String valueString = (String) valueContent;
if (isValidDefinition(request, valueString)) {
type = AttributeType.DEFINITION;