Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-3209

Harmony's default instance of javax.xml.TransformerFactory differs from RI's one

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Misc
    • None
    • Patch Available

    Description

      Xalan provides both a compiler and a runtime processor.
      Interpretive processor is used by defaut in xalan's distribution unlike SUN's jdk, which uses XSLT compiler.

      So Harmony uses "interpreter" mode now.
      This change could be done by setting of system property.

      See please more info at http://xml.apache.org/xalan-j/xsltc_usage.html.

      The test to see this is:
      import javax.xml.parsers.DocumentBuilderFactory;
      import javax.xml.parsers.SAXParserFactory;
      import javax.xml.transform.TransformerFactory;

      public class TransformerFactoryTest {
      public static void main(String[] args)

      { System.out.println(TransformerFactory.newInstance()); System.out.println(DocumentBuilderFactory.newInstance()); System.out.println(SAXParserFactory.newInstance()); }

      }

      RI prints:
      com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl@247401
      com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl@247eff
      com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl@2483b5
      unlike Harmony:
      org.apache.xalan.processor.TransformerFactoryImpl@206b9400
      org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@206c004c
      org.apache.xerces.jaxp.SAXParserFactoryImpl@206c46a8.

      Attachments

        1. set_property.patch
          0.6 kB
          Evgeniya Maenkova

        Activity

          People

            cap Alexey Petrenko
            egmaenko Evgeniya Maenkova
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: