Originally posted by jack hu:
I can't understand what API is SUN Java 2 API for XSLT, is it javax.xml.transform?
Yes, that's the one. Here's an example of how to use the API:
http://www.javaalmanac.com/egs/javax.xml.transform/BasicXsl.html
Originally posted by jack hu:
anyone can give me a clear simple picture about relationship SUN JAXP and org w3 standard and apache XML parase API?
W3C has defined the DOM API as a language-agnostic set of operations for accessing and manipulating an XML document's hierarchical structure, which has been implemented in the Java API under the org.w3c.dom.* package. That is, while Java has one implementation of the standard DOM API, other languages have their own, and while the code syntax between different language implementations isn't 100% identical, the method/function names etc. are the same.
Sun Microsystem's JAXP API, on the other hand, specifies a language-specific API for working with XML documents. It's basically a set of interfaces and a couple of entry point classes (factories) against which developers like you and me should code their applications. Then, at runtime, the factory classes your code is using figure out what
implementations of the JAXP interfaces are present in the classpath and instantiates one of them for your use. Apache Xerces is one such implementation.
In other words, while you're only coding against interfaces in the javax.xml.* packages, the object you get from invoking javax.xml.parsers.DocumentBuilderFactory#newInstance() could very well be an instance of org.apache.xerces.DocumentBuilderFactoryImpl (as a made-up example).