/** * Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off * the transformation of the constructed document */ public void endDocument() throws SAXException { super.endDocument(); DocumentInfo doc = (DocumentInfo)builder.getCurrentRoot(); if (doc==null) { throw new SAXException("No source document has been built"); } try { controller.transformDocument(doc, result); } catch (TransformerException err) { if (err instanceof XPathException) { controller.reportFatalError((XPathException)err); } throw new SAXException(err); } }
/** * Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off * the transformation of the constructed document */ public void endDocument() throws SAXException { super.endDocument(); DocumentInfo doc = (DocumentInfo)builder.getCurrentRoot(); builder.reset(); if (doc==null) { throw new SAXException("No source document has been built"); } try { controller.transformDocument(doc, result); } catch (TransformerException err) { if (err instanceof XPathException) { controller.reportFatalError((XPathException)err); } throw new SAXException(err); } }
/** * Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off * the transformation of the constructed document */ public void endDocument() throws SAXException { super.endDocument(); NodeInfo doc = builder.getCurrentRoot(); doc.getTreeInfo().setSpaceStrippingRule( transformer.getUnderlyingXsltTransformer().getUnderlyingController().getSpaceStrippingRule()); builder.reset(); if (doc == null) { throw new SAXException("No source document has been built"); } try { transformer.transform(doc, result); } catch (TransformerException err) { throw new SAXException(err); } }
/** * Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off * the transformation of the constructed document */ public void endDocument() throws SAXException { super.endDocument(); NodeInfo doc = builder.getCurrentRoot(); doc.getTreeInfo().setSpaceStrippingRule( transformer.getUnderlyingXsltTransformer().getUnderlyingController().getSpaceStrippingRule()); builder.reset(); if (doc == null) { throw new SAXException("No source document has been built"); } try { transformer.transform(doc, result); } catch (TransformerException err) { throw new SAXException(err); } }