}
private void processDescendantCondition(Object sdt, String xpathBase,
int index, Tag tag ) {
Condition c = null;
HashMap<String, String> map = QueryString.parseQueryString(
tag.getVal(), true);
String conditionId = map.get(BINDING_ROLE_CONDITIONAL);
if (conditionId != null) {
c = ConditionsPart.getConditionById(conditions, conditionId);
if (c == null) {
log.error("Missing condition " + conditionId);
throw new InputIntegrityException("Required condition '" + conditionId + "' is missing");
}
// TODO: this code assumes the condition contains
// a simple xpath
log.debug("Using condition"
+ XmlUtils.marshaltoString(c, true, true));
Condition newCondition = c.repeat(xpathBase, index, conditions, xPaths);
// set sdt to use it
map.put(BINDING_ROLE_CONDITIONAL, newCondition.getId() );
tag.setVal(QueryString.create(map));
}
}