Locator locator,
Attributes attlist,
PropertyList propertyList) throws FOPException {
//super.processNode(elementName, locator, attlist, propertyList);
ResultCollector collector = ResultCollector.getInstance();
String propName = attlist.getValue("property");
String component = null;
int dotIndex = propName.indexOf('.');
if (dotIndex >= 0) {
component = propName.substring(dotIndex + 1);
propName = propName.substring(0, dotIndex);
}
int propID = FOPropertyMapping.getPropertyId(propName);
if (propID < 0) {
collector.notifyException(new IllegalArgumentException(
"Property not found: " + propName));
} else {
Property prop;
prop = propertyList.getParentPropertyList().get(propID);
if (component != null) {
//Access subcomponent
Property mainProp = prop;
prop = null;
LengthPairProperty lpp = mainProp.getLengthPair();
if (lpp != null) {
prop = lpp.getComponent(FOPropertyMapping.getSubPropertyId(component));
}
LengthRangeProperty lrp = mainProp.getLengthRange();
if (lrp != null) {
prop = lrp.getComponent(FOPropertyMapping.getSubPropertyId(component));
}
KeepProperty kp = mainProp.getKeep();
if (kp != null) {
prop = kp.getComponent(FOPropertyMapping.getSubPropertyId(component));
}
SpaceProperty sp = mainProp.getSpace();
if (sp != null) {
prop = sp.getComponent(FOPropertyMapping.getSubPropertyId(component));
}
}
String s;
if (prop instanceof PercentLength) {
s = ((PercentLength)prop).getString();
} else {
s = String.valueOf(prop);
}
String expected = attlist.getValue("expected");
if (!expected.equals(s)) {
collector.notifyException(
new IllegalStateException(locator.getSystemId()
+ "\nProperty '" + propName
+ "' expected to evaluate to '" + expected
+ "' but got '" + s
+ "'\n(test:assert in "