public Document transform(Document input, @SuppressWarnings("rawtypes") Map additional_properties) throws FragmentTransformationException {
DOMBuilder builder = new DOMBuilder();
org.jdom.Document jdomDoc = builder.build(input);
ContextContainer cnt = (ContextContainer)ctx.getBean("ContextGateway");
// now transform using stylesheet passed in
org.jdom.Element elem = null;
try {
// Call GetSchemaInfo to place schema titles and codelists into
// xpath /root/gui/schemas/{} for xsl transformation to use
org.jdom.Element root = new org.jdom.Element(Jeeves.Elem.ROOT);
org.jdom.Element gui = new org.jdom.Element(Jeeves.Elem.GUI);
GetSchemaInfo gsi = new GetSchemaInfo();
gui.addContent(gsi.exec(new org.jdom.Element(Jeeves.Elem.REQUEST), cnt.getSrvctx()));
root.addContent(gui);
org.jdom.Element metadata = new org.jdom.Element(Geonet.Elem.METADATA);
metadata.addContent(jdomDoc.detachRootElement());
root.addContent(metadata);