• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

confuse about SUN Java API for XML XSLT

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,Guys:
I am new guy for JAXP.I can't understand what API is SUN Java 2 API for XSLT, is it javax.xml.transform? anyone can give me a clear simple picture about relationship SUN JAXP and org w3 standard and apache XML parase API?
Thanks for any answer.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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).
 
jack hu
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.I catch it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic