* @param doc DOM document representing the XML document
* @param ns Namespace for the document
* @param pos Position on the page
*/
public void renderDocument(Document doc, String ns, Rectangle2D pos) {
RendererContext context;
context = new RendererContext(this, getMimeType());
context.setUserAgent(userAgent);
context.setProperty(SVGRendererContextConstants.SVG_DOCUMENT, svgDocument);
context.setProperty(SVGRendererContextConstants.SVG_PAGE_G, currentPageG);
context.setProperty(SVGRendererContextConstants.XPOS,
new Integer(currentIPPosition + (int)pos.getX()));
context.setProperty(SVGRendererContextConstants.YPOS,
new Integer(currentBPPosition + (int)pos.getY()));
context.setProperty(SVGRendererContextConstants.WIDTH,
new Integer((int)pos.getWidth()));
context.setProperty(SVGRendererContextConstants.HEIGHT,
new Integer((int) pos.getHeight()));
renderXML(context, doc, ns);
}