String type = getValue(attributes, "type");
if (Tapestry.isBlank(copyOf))
{
if (Tapestry.isBlank(type))
throw new DocumentParseException(
Tapestry.format("SpecificationParser.missing-type-or-copy-of", id),
getResourceLocation());
return;
}
if (Tapestry.isNonBlank(type))
throw new DocumentParseException(
Tapestry.format("SpecificationParser.both-type-and-copy-of", id),
getResourceLocation());
IComponentSpecification spec = (IComponentSpecification) digester.getRoot();
IContainedComponent source = spec.getComponent(copyOf);
if (source == null)
throw new DocumentParseException(
Tapestry.format("SpecificationParser.unable-to-copy", copyOf),
getResourceLocation());
IContainedComponent target = (IContainedComponent) digester.peek();