So lets asume that we want to make XSLT transformation and we want to use.
TransformerFactory transFact = TransformerFactory.newInstance(); (1)
So newInstance() create object from abstract class which is impossible in Java. SO what happends behind? How Java changes the implementation. I know that you can use directlly
TransformerFactory transFact = new org.apache.xalan.processor.TransformerFactoryImpl();
but here we have contcrete instance of non-abstract class. Or we can use
System.setProperty("javax.xml.transform.TransformerFactory",
"net.sf.saxon.TransformerFactoryImpl");
or even the default implementation (1) from com.sun.org.apache.xalan.internal.xsltc.trax;
Designed to be flexible, JAXP allows you to use any XML-compliant parser from within your application. It does this with what is called a pluggability layer, which lets you plug in an implementation of the SAX or DOM API. The pluggability layer also allows you to plug in an XSL processor, letting you control how your XML data is displayed.
How this layer works? Can I write such in my application? To create instace of abstract class?