Error Handling Xslt Jaxp 1.2
Java Microsoft & .NET Cloud Open Source PHP Database next Developer.com XML Read More in XML » Getting Started with Java JAXP and XSL Transformations (XSLT) November 25, 2003 By Richard G. Baldwin Bio » Send Email » More Articles » Tweet Java Programming Notes # 2202 Preface General Background Information on XSLT Preview Discussion and Sample Code Run the Program Summary What's Next? Complete Program Listings Preface What is JAXP? As the name implies, the Java API for XML Processing (JAXP) is an API designed to help you write programs for processing XML documents. JAXP is very important for many reasons, not the least of which is the fact that it is a critical part of the Java Web Services Developer Pack (Java WSDP). This is the second lesson in a series designed to initially help you understand how to use JAXP, and to eventually help you understand how to use the Java WSDP. Post a comment Email Article Print Article Share Articles Digg del.icio.us Slashdot DZone Reddit StumbleUpon Facebook FriendFeed Furl Newsvine Google LinkedIn MySpace Technorati Twitter YahooBuzz The first lesson was entitled Java API for XML Processing (JAXP), Getting Started. What is XML? XML is an acronym for theeXtensible Markup Language. I will not attempt to teach XML in this series of tutorial lessons. Rather, I will assume that you already understand XML, and I will teach you how to use JAXP to write programs for creating and processing XML documents. I have published numerous tutorial lessons on XML at Gamelan.comand www.DickBaldwin.com. You may find it useful to refer to those lessons. In addition, I provided a review of the salient aspects of XML in the first lesson in this series. From time to time, I will also provide background information regarding XML in the lessons in this series. For example, I will provide background information on XSL and XSL Transformations (XSLT) later in this document under General Background Information on XSLT. Viewing tip You may find it useful to open another copy of this lesson in a separate browser window. That will make it easier for you to scroll back and forth among the different listings and figures while you are reading about them. Supplementary material I recommend that you also study the other lessons in my extensive collection of online Java
has shifted from TrAX to JAXP. Although the name has changed, the concept has not: JAXP provides a standard Java interface to many XSLT processors, allowing you to choose your favorite underlying implementation while retaining portability. First released in March 2000, Sun's JAXP 1.0 utilized XML 1.0, XML Namespaces 1.0, SAX 1.0, and DOM Level 1. JAXP is a standard extension to Java, meaning that Sun provides a specification through its Java Community Process (JCP) as well as a reference implementation. JAXP http://www.developer.com/xml/article.php/3113351/Getting-Started-with-Java-JAXP-and-XSL-Transformations-XSLT.htm 1.1 follows the same basic design philosophies of JAXP 1.0, adding support for DOM Level 2, SAX 2, and XSLT 1.0. A tool like JAXP is necessary because the XSLT specification defines only a transformation language; it says nothing about how to write a Java XSLT processor. Although they all perform the same basic tasks, every processor uses a different API and has its http://docstore.mik.ua/orelly/xml/jxslt/ch05_02.htm own set of programming conventions. JAXP is not an XML parser, nor is it an XSLT processor. Instead, it provides a common Java interface that masks differences between various implementations of the supported standards. When using JAXP, your code can avoid dependencies on specific vendor tools, allowing flexibility to upgrade to newer tools when they become available. The key to JAXP's design is the concept of plugability layers. These layers provide consistent Java interfaces to the underlying SAX, DOM, and XSLT implementations. In order to utilize one of these APIs, you must obtain a factory class without hardcoding Xalan or SAXON code into your application. This is accomplished via a lookup mechanism that relies on Java system properties. Since three separate plugability layers are used, you can use a DOM parser from one vendor, a SAX parser from another vendor, and yet another XSLT processor from someone else. In reality, you will probably need to use a DOM parser compatible with your XSLT processor if you try to transform the DOM tree directly. Figure 5-1 illustrates the high-level architecture of JAXP 1.1. Figure 5-1. JAXP 1.1 architecture As shown, application
See also the JAXP FAQ for more information. Note: If you are reading this page online, this is the most current version of the https://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.5/jaxp/ReleaseNotes.html release notes. If this page was downloaded as part of the release bundle, please see the JAXP Documentation page for the most current version of the release notes. Contents Running Applications with the JAXP JAR files included in the Java WSDP 1.5 on the Sun Java System Application Server Platform Edition 8 Component Versions Identifying the error handling JAR Files XML Parsing Known Schema Processing Limitations Known Migration Issues from JAXP 1.1 Security Issue XSLT Processing The Interpreting XSLT Processor (Xalan) The Compiling XSLT Processor (XSLTC) Custom Class Loader Issue Manually Specifying which XSLT Implementation to Use JWSDP Security Considerations Changes in JAXP RI Versions Running Applications with the JAXP JAR files included in error handling xslt the Java WSDP 1.4 on the Sun Java System Application Server Platform Edition 8 The JAXP libraries included with the Application Server are in the