protected void validateDescendants() throws FoTreeException {
boolean anyBlockContent = false;
for (int i = 0; i < getChildren().size(); i++) {
/* Cast to FObj should be OK, because it is not possible to create
* an FOText item whose parent is anything but an FObjMixed. */
final FObj child = getChildren().get(i);
if (child.isContentBlock()) {
anyBlockContent = true;
continue;
}
throwException(getFullName() + "has invalid content: "
+ child.getName());
}
if (! anyBlockContent) {
throwException(getFullName() + "must contain at least one %block "
+ "item.");
}