}
}
public void transform(Source source, Result result) throws XMLPlatformException {
try {
JXTransformer transformer = new JXTransformer();
if ((result instanceof StreamResult) && (isFragment())) {
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
}
if ((result instanceof SAXResult) && (!isFragment())) {
((SAXResult)result).getHandler().startDocument();
}
transformer.transform(source, result);
if ((result instanceof SAXResult) && (!isFragment())) {
((SAXResult)result).getHandler().endDocument();
}
} catch (TransformerException e) {
throw XMLPlatformException.xmlPlatformTransformException(e);