pss.reportError(err);
throw err;
}
try {
DocumentImpl oldRoot = (DocumentImpl)getDocumentRoot();
LinkedTreeBuilder builder = new LinkedTreeBuilder();
builder.setPipelineConfiguration(pss.getConfiguration().makePipelineConfiguration());
builder.setNodeFactory(nodeFactory);
builder.setSystemId(this.getSystemId());
builder.open();
builder.startDocument();
int st = StandardNames.XSL_STYLESHEET;
builder.startElement(st, 0);
builder.namespace(new NamespaceBinding("xsl", NamespaceConstant.XSLT), 0);
builder.attribute(pool.allocate("", "", "version"), version);
builder.startContent();
int te = StandardNames.XSL_TEMPLATE;
builder.startElement(te, 0);
builder.attribute(pool.allocate("", "", "match"), "/");
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;