java/src/org/apache/qetest/xslwrapper/TraxSAXWrapper.java [248:298]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        xmlReader.setDTDHandler(stylesheetHandler);
        try
        {
            xmlReader.setFeature(
                    "http://xml.org/sax/features/namespace-prefixes",
                    true);
        }
        catch (SAXException se) { /* no-op - ignore */ }
        try
        {
            xmlReader.setFeature(
                    "http://apache.org/xml/features/validation/dynamic",
                    true);
        }
        catch (SAXException se) { /* no-op - ignore */ }

        // Create a 'pipe'-like identity transformer, so we can 
        //  easily get our results serialized to disk
        TransformerHandler serializingHandler = saxFactory.newTransformerHandler();
        // Set the stylesheet's output properties into the output 
        //  via it's Transformer
        serializingHandler.getTransformer().setOutputProperties(xslOutputProps);

        // Create StreamResult to byte stream in memory
        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
        StreamResult byteResult = new StreamResult(outBytes);
        serializingHandler.setResult(byteResult);

        // Create a SAXResult dumping into our 'pipe' serializer
        //  and tie in lexical handling (is any other handling needed?)
        SAXResult saxResult = new SAXResult(serializingHandler);
        saxResult.setLexicalHandler(serializingHandler);

        // Set the original stylesheet to dump into our result
        stylesheetHandler.setResult(saxResult);

        // Timed: Parse the XML input document and do transform
        startTime = System.currentTimeMillis();
        xmlReader.parse(QetestUtils.filenameToURL(xmlName));
        transform = System.currentTimeMillis() - startTime;

        // Timed: writeResults from the byte array
        startTime = System.currentTimeMillis();
        byte[] writeBytes = outBytes.toByteArray(); // Should this be timed too or not?
                                                    // @see TraxStreamWrapper
        FileOutputStream writeStream = new FileOutputStream(resultName);
        writeStream.write(writeBytes);
        writeStream.close();
        resultWrite = System.currentTimeMillis() - startTime;

        long[] times = getTimeArray();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/src/org/apache/qetest/xslwrapper/TraxSAXWrapper.java [430:480]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        xmlReader.setDTDHandler(stylesheetHandler);
        try
        {
            xmlReader.setFeature(
                    "http://xml.org/sax/features/namespace-prefixes",
                    true);
        }
        catch (SAXException se) { /* no-op - ignore */ }
        try
        {
            xmlReader.setFeature(
                    "http://apache.org/xml/features/validation/dynamic",
                    true);
        }
        catch (SAXException se) { /* no-op - ignore */ }

        // Create a 'pipe'-like identity transformer, so we can 
        //  easily get our results serialized to disk
        TransformerHandler serializingHandler = saxFactory.newTransformerHandler();
        // Set the stylesheet's output properties into the output 
        //  via it's Transformer
        serializingHandler.getTransformer().setOutputProperties(xslOutputProps);

        // Create StreamResult to byte stream in memory
        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
        StreamResult byteResult = new StreamResult(outBytes);
        serializingHandler.setResult(byteResult);

        // Create a SAXResult dumping into our 'pipe' serializer
        //  and tie in lexical handling (is any other handling needed?)
        SAXResult saxResult = new SAXResult(serializingHandler);
        saxResult.setLexicalHandler(serializingHandler);

        // Set the original stylesheet to dump into our result
        stylesheetHandler.setResult(saxResult);

        // Timed: Parse the XML input document and do transform
        startTime = System.currentTimeMillis();
        xmlReader.parse(QetestUtils.filenameToURL(xmlName));
        transform = System.currentTimeMillis() - startTime;

        // Timed: writeResults from the byte array
        startTime = System.currentTimeMillis();
        byte[] writeBytes = outBytes.toByteArray(); // Should this be timed too or not?
                                                    // @see TraxStreamWrapper
        FileOutputStream writeStream = new FileOutputStream(resultName);
        writeStream.write(writeBytes);
        writeStream.close();
        resultWrite = System.currentTimeMillis() - startTime;

        long[] times = getTimeArray();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



