Element root = doc.getDocumentElement();
// Check for alternative image representation
String altSrc = DOMUtil.getAttribute(root, "altsrc").trim();
if (altSrc.length() > 0) {
Renderer renderer = context.getRenderer();
if (renderer instanceof Java2DRenderer) {
renderJava2DImage(altSrc, context);
} else if (renderer instanceof FO3DPSRenderer) {
renderPSImage(altSrc, context);
} else if (renderer instanceof FO3DAFPRenderer) {