< prev index next >

test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DBFNamespaceTest.java

Print this page




  88         assertTrue(compareWithGold(goldfile, outputfile));
  89     }
  90 
  91     /**
  92      * This method transforms a Node without any xsl file and uses SAXResult to
  93      * invoke the callbacks through a ContentHandler. If namespace processing is
  94      * not chosen, namespaceURI in callbacks should be an empty string otherwise
  95      * it should be namespaceURI.
  96      *
  97      * @throws Exception If any errors occur.
  98      */
  99     private void dummyTransform(Document document, String fileName)
 100             throws Exception {
 101         DOMSource domSource = new DOMSource(document);
 102         try(MyCHandler chandler = MyCHandler.newInstance(new File(fileName))) {
 103             TransformerFactory.newInstance().newTransformer().
 104                 transform(domSource, new SAXResult(chandler));
 105         }
 106     }
 107 }
 108 
 109 


  88         assertTrue(compareWithGold(goldfile, outputfile));
  89     }
  90 
  91     /**
  92      * This method transforms a Node without any xsl file and uses SAXResult to
  93      * invoke the callbacks through a ContentHandler. If namespace processing is
  94      * not chosen, namespaceURI in callbacks should be an empty string otherwise
  95      * it should be namespaceURI.
  96      *
  97      * @throws Exception If any errors occur.
  98      */
  99     private void dummyTransform(Document document, String fileName)
 100             throws Exception {
 101         DOMSource domSource = new DOMSource(document);
 102         try(MyCHandler chandler = MyCHandler.newInstance(new File(fileName))) {
 103             TransformerFactory.newInstance().newTransformer().
 104                 transform(domSource, new SAXResult(chandler));
 105         }
 106     }
 107 }


< prev index next >