286N/A<?xml version="1.0" encoding="UTF-8"?>
286N/A<!--
286N/ACopyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
286N/ADO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
286N/A
286N/AThis code is free software; you can redistribute it and/or modify it
286N/Aunder the terms of the GNU General Public License version 2 only, as
286N/Apublished by the Free Software Foundation. Oracle designates this
286N/Aparticular file as subject to the "Classpath" exception as provided
286N/Aby Oracle in the LICENSE file that accompanied this code.
286N/A
286N/AThis code is distributed in the hope that it will be useful, but WITHOUT
286N/AANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
286N/AFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
286N/Aversion 2 for more details (a copy is included in the LICENSE file that
286N/Aaccompanied this code).
286N/A
286N/AYou should have received a copy of the GNU General Public License version
286N/A2 along with this work; if not, write to the Free Software Foundation,
286N/AInc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
286N/A
286N/APlease contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
286N/Aor visit www.oracle.com if you need additional information or have any
286N/Aquestions.
286N/A-->
286N/A
286N/A<!DOCTYPE html
286N/A PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
286N/A "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
286N/A
286N/A<html xmlns="http://www.w3.org/1999/xhtml">
286N/A
286N/A<head>
286N/A <title>javax.xml.transform.sax</title>
286N/A
286N/A <meta name="CVS"
286N/A content="$Id: package.html,v 1.2 2005/06/10 03:50:41 jeffsuttor Exp $" />
286N/A <meta name="AUTHOR"
286N/A content="Jeff.Suttor@Sun.com" />
286N/A</head>
286N/A
286N/A<body>
286N/A<p>This package implements SAX2-specific transformation APIs. It provides
286N/A classes which allow input from {@link org.xml.sax.ContentHandler}
286N/A events, and also classes that produce org.xml.sax.ContentHandler events. It
286N/A also provides methods to set the input source as an
286N/A {@link org.xml.sax.XMLReader}, or to use a
286N/A {@link org.xml.sax.InputSource} as the source. It also allows the
286N/A creation of a {@link org.xml.sax.XMLFilter}, which enables
286N/A transformations to "pull" from other transformations, and lets the transformer
286N/A to be used polymorphically as an {@link org.xml.sax.XMLReader}.</p>
286N/A<p>The {@link javax.xml.transform.sax.SAXSource} class allows the
286N/A setting of an {@link org.xml.sax.XMLReader} to be used for "pulling"
286N/A parse events, and an {@link org.xml.sax.InputSource} that may be used to
286N/A specify the SAX source.</p>
286N/A<p>The {@link javax.xml.transform.sax.SAXResult} class allows the
286N/A setting of a {@link org.xml.sax.ContentHandler} to be the receiver of
286N/A SAX2 events from the transformation.
286N/A<p>The {@link javax.xml.transform.sax.SAXTransformerFactory} extends
286N/A {@link javax.xml.transform.TransformerFactory} to provide factory
286N/A methods for creating {@link javax.xml.transform.sax.TemplatesHandler},
286N/A {@link javax.xml.transform.sax.TransformerHandler}, and
286N/A {@link org.xml.sax.XMLReader} instances.</p>
286N/A<p>To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory},
286N/A the caller must cast the {@link javax.xml.transform.TransformerFactory}
286N/A instance returned from
286N/A {@link javax.xml.transform.TransformerFactory#newInstance}.
286N/A
286N/A<p>The {@link javax.xml.transform.sax.TransformerHandler} interface
286N/A allows a transformation to be created from SAX2 parse events, which is a "push"
286N/A model rather than the "pull" model that normally occurs for a transformation.
286N/A Normal parse events are received through the
286N/A {@link org.xml.sax.ContentHandler} interface, lexical events such as
286N/A startCDATA and endCDATA are received through the
286N/A {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal
286N/A the start or end of disabling output escaping are received via
286N/A {@link org.xml.sax.ContentHandler#processingInstruction}, with the
286N/A target parameter being
286N/A {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and
286N/A {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If
286N/A parameters, output properties, or other features need to be set on the
286N/A Transformer handler, a {@link javax.xml.transform.Transformer} reference
286N/A will need to be obtained from
286N/A {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and
286N/A the methods invoked from that reference.
286N/A
286N/A<p>The {@link javax.xml.transform.sax.TemplatesHandler} interface
286N/A allows the creation of {@link javax.xml.transform.Templates} objects
286N/A from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler}
286N/A events are complete, the Templates object may be obtained from
286N/A {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that
286N/A {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should
286N/A normally be called in order to establish a base system ID from which relative
286N/A URLs may be resolved.
286N/A<p>The
286N/A {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter}
286N/A method allows the creation of a {@link org.xml.sax.XMLFilter}, which
286N/A encapsulates the SAX2 notion of a "pull" transformation. The following
286N/A illustrates several transformations chained together. Each filter points to a
286N/A parent {@link org.xml.sax.XMLReader}, and the final transformation is
286N/A caused by invoking {@link org.xml.sax.XMLReader#parse} on the final
286N/A reader in the chain.</p>
286N/A</body>
286N/A</html>