if (currentFragment == null) {
if (logger.isDebugEnabled()) {
logger.debug("Page is not being fragmented, " +
"write everything");
}
FormatInstance childInstance =
context.getFormatInstance(
child, instance.getIndex());
context.renderFormat(childInstance);
}
// If this fragment is the one which has been requested
// then write out the children.
else if (fragment == currentFragment) {
if (logger.isDebugEnabled()) {
logger.debug("Page is being fragmented, writing " +
"fragment " + fragment.getName());
}
// Ask the children to write their output.
FormatInstance childInstance =
context.getFormatInstance(
child, instance.getIndex());
context.renderFormat(childInstance);
// If this fragment is not the one which has been