XSL (Extensible Stylesheet Language) - Implementation in JDK

This section provides a tutorial example on how to write a simple program, XSLClassChecker.java, to view implementation classes of XSL (Extensible Stylesheet Language) in JDK.

JDK offers the following interfaces to support XSL (Extensible Stylesheet Language):

One thing is missing here: who represents the transformation style rules? The answer is that javax.xml.transform.Source also represents transformation style rules, because they written in XML.

I have a simple program here, XSLClassChecker.java, to show what are the XSL implementation classes:

/* XSLClassChecker.java
 * Copyright (c) HerongYang.com. All Rights Reserved.
import javax.xml.transform.Source;
import javax.xml.transform.Result;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
class XSLClassChecker {
   public static void main(String[] args) {
      try {
         TransformerFactory f = TransformerFactory.newInstance();
         Transformer t = f.newTransformer();
         Source s = new StreamSource();
         Result r = new StreamResult();
      } catch (TransformerConfigurationException e) {
      } catch (TransformerException e) {

Output with JDK 1.8 or higher

herong> java XSLClassChecker





javax.xml.transform.TransformerException: Result object passed to
   ''{0}'' is invalid.

Note that:

If you are still using JDK 1.4.1, you may get something like:

herong> \j2sdk1.4.1_01\bin\java XSLClassChecker

javax.xml.transform.TransformerException: No output specified

Table of Contents

 About This JDK Tutorial Book

 JDK (Java Development Kit)

 Java Date-Time API

 Date, Time and Calendar Classes

 Date and Time Object and String Conversion

 Number Object and Numeric String Conversion

 Locales, Localization Methods and Resource Bundles

 Calling and Importing Classes Defined in Unnamed Packages

 HashSet, Vector, HashMap and Collection Classes

 Character Set Encoding Classes and Methods

 Character Set Encoding Maps

 Encoding Conversion Programs for Encoded Text Files

 Java Logging

 Socket Network Communication

 Datagram Network Communication

 DOM (Document Object Model) - API for XML Files

 SAX (Simple API for XML)

 DTD (Document Type Definition) - XML Validation

 XSD (XML Schema Definition) - XML Validation

XSL (Extensible Stylesheet Language)

XSL (Extensible Stylesheet Language) - Implementation in JDK

 XSLTransformer.java - XML Transformer

 Message Digest Algorithm Implementations in JDK

 Private key and Public Key Pair Generation

 PKCS#8/X.509 Private/Public Encoding Standards

 Digital Signature Algorithm and Sample Program

 "keytool" Commands and "keystore" Files

 KeyStore and Certificate Classes

 Secret Key Generation and Management

 Cipher - Encryption and Decryption

 The SSL (Secure Socket Layer) Protocol

 SSL Socket Communication Testing Programs

 SSL Client Authentication

 HTTPS (Hypertext Transfer Protocol Secure)

 Outdated Tutorials


 Full Version in PDF/EPUB