}
throw err;
}
try {
DocumentImpl oldRoot = (DocumentImpl)getDocumentRoot();
TreeBuilder builder = new TreeBuilder();
builder.setPipelineConfiguration(pss.getConfiguration().makePipelineConfiguration());
builder.setNodeFactory(nodeFactory);
builder.setSystemId(this.getSystemId());
builder.open();
builder.startDocument(0);
int st = StandardNames.XSL_STYLESHEET;
builder.startElement(st, StandardNames.XS_UNTYPED, 0, 0);
builder.namespace(NamespaceConstant.XSLT_CODE, 0);
builder.attribute(pool.allocate("", "", "version"), StandardNames.XS_UNTYPED_ATOMIC, version, 0, 0);
builder.startContent();
int te = StandardNames.XSL_TEMPLATE;
builder.startElement(te, StandardNames.XS_UNTYPED, 0, 0);
builder.attribute(pool.allocate("", "", "match"), StandardNames.XS_UNTYPED_ATOMIC, "/", 0, 0);
builder.startContent();
builder.graftElement(this);
builder.endElement();
builder.endElement();
builder.endDocument();
builder.close();
DocumentImpl newRoot = (DocumentImpl)builder.getCurrentRoot();
newRoot.graftLocationMap(oldRoot);
return newRoot;
} catch (XPathException err) {
//TransformerConfigurationException e = new TransformerConfigurationException(err);
err.setLocator(this);
throw err;