public static void serializerWithDOE()
throws TransformerException,
SAXException, IOException, ParserConfigurationException {
TransformerFactoryImpl tf = new TransformerFactoryImpl();
// Following is needed to ensure Saxon recognizes the JAXP-defined processing instructions
tf.setAttribute(FeatureKeys.USE_PI_DISABLE_OUTPUT_ESCAPING, Boolean.TRUE);
TransformerHandler t = tf.newTransformerHandler();
// Set some serialization options
t.getTransformer().setOutputProperty("method", "xml");
t.getTransformer().setOutputProperty("version", "1.1");
t.getTransformer().setOutputProperty("encoding", "iso-8859-1");