Element element, String attribute,
LengthUnit unitConstraint) {
if (value1 != null && value1 instanceof StyleLength &&
value2 != null && value2 instanceof StyleLength) {
StyleLength length1 = (StyleLength) value1;
StyleLength length2 = (StyleLength) value2;
if (length1.getUnit() == unitConstraint &&
length2.getUnit() == unitConstraint) {
int unitLength = unitConstraint.toString().length();
StringBuffer buffer = new StringBuffer();
String value = context.getRenderValue(length1).toString();
String number = value.substring(0, value.length() - unitLength);