// parse the x attribute
String xStr = filterElement.getAttributeNS(null, ATTR_X);
if (xStr.length() == 0) {
if (xDefault == null) {
throw new MissingAttributeException(
Messages.formatMessage("region.x.required",
new Object[] {filterElement.getLocalName()}));
} else {
xStr = xDefault;
}
}
// parse the y attribute
String yStr = filterElement.getAttributeNS(null, ATTR_Y);
if (yStr.length() == 0) {
if (yDefault == null) {
throw new MissingAttributeException(
Messages.formatMessage("region.y.required",
new Object[] {filterElement.getLocalName()}));
} else {
yStr = yDefault;
}
}
// parse the width attribute
String wStr = filterElement.getAttributeNS(null, ATTR_WIDTH);
if (wStr.length() == 0) {
if (wDefault == null) {
throw new MissingAttributeException(
Messages.formatMessage("region.width.required",
new Object[] {filterElement.getLocalName()}));
} else {
wStr = wDefault;
}
}
// parse the height attribute
String hStr = filterElement.getAttributeNS(null, ATTR_HEIGHT);
if (hStr.length() == 0) {
if (hDefault == null) {
throw new MissingAttributeException(
Messages.formatMessage("region.height.required",
new Object[] {filterElement.getLocalName()}));
} else {
hStr = hDefault;
}