📄 package-summary.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_02) on Thu Nov 13 17:20:27 PST 2003 --><TITLE>javax.xml.transform.sax (Java 2 Platform Ent. Ed. v1.4)</TITLE><META NAME="keywords" CONTENT="javax.xml.transform.sax package"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="javax.xml.transform.sax (Java 2 Platform Ent. Ed. v1.4)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/xml/transform/dom/package-summary.html"><B>PREV PACKAGE</B></A> <A HREF="../../../../javax/xml/transform/stream/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><H2>Package javax.xml.transform.sax</H2>This package implements SAX2-specific transformation APIs. <P><B>See:</B><BR> <A HREF="#package_description"><B>Description</B></A><P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Interface Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/xml/transform/sax/TemplatesHandler.html" title="interface in javax.xml.transform.sax">TemplatesHandler</A></B></TD><TD>A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/xml/transform/sax/TransformerHandler.html" title="interface in javax.xml.transform.sax">TransformerHandler</A></B></TD><TD>A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.</TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/xml/transform/sax/SAXResult.html" title="class in javax.xml.transform.sax">SAXResult</A></B></TD><TD>Acts as an holder for a transformation Result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/xml/transform/sax/SAXSource.html" title="class in javax.xml.transform.sax">SAXSource</A></B></TD><TD>Acts as an holder for SAX-style Source.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/xml/transform/sax/SAXTransformerFactory.html" title="class in javax.xml.transform.sax">SAXTransformerFactory</A></B></TD><TD>This class extends TransformerFactory to provide SAX-specific factory methods. </TD></TR></TABLE> <P><A NAME="package_description"><!-- --></A><H2>Package javax.xml.transform.sax Description</H2><P><p>This package implements SAX2-specific transformation APIs. It provides
classes which allow input from <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/ContentHandler.html" title="class or interface in org.xml.sax"><CODE>ContentHandler</CODE></A>
events, and also classes that produce org.xml.sax.ContentHandler events. It
also provides methods to set the input source as an
<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax"><CODE>XMLReader</CODE></A>, or to use a
<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax"><CODE>InputSource</CODE></A> as the source. It also allows the
creation of a <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLFilter.html" title="class or interface in org.xml.sax"><CODE>XMLFilter</CODE></A>, which enables
transformations to "pull" from other transformations, and lets the transformer
to be used polymorphically as an <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax"><CODE>XMLReader</CODE></A>.</p>
<p>The <A HREF="../../../../javax/xml/transform/sax/SAXSource.html" title="class in javax.xml.transform.sax"><CODE>SAXSource</CODE></A> class allows the
setting of an <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax"><CODE>XMLReader</CODE></A> to be used for "pulling"
parse events, and an <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax"><CODE>InputSource</CODE></A> that may be used to
specify the SAX source.</p>
<p>The <A HREF="../../../../javax/xml/transform/sax/SAXResult.html" title="class in javax.xml.transform.sax"><CODE>SAXResult</CODE></A> class allows the
setting of a <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/ContentHandler.html" title="class or interface in org.xml.sax"><CODE>ContentHandler</CODE></A> to be the receiver of
SAX2 events from the transformation.
<p>The <A HREF="../../../../javax/xml/transform/sax/SAXTransformerFactory.html" title="class in javax.xml.transform.sax"><CODE>SAXTransformerFactory</CODE></A> extends
<A HREF="../../../../javax/xml/transform/TransformerFactory.html" title="class in javax.xml.transform"><CODE>TransformerFactory</CODE></A> to provide factory
methods for creating <A HREF="../../../../javax/xml/transform/sax/TemplatesHandler.html" title="interface in javax.xml.transform.sax"><CODE>TemplatesHandler</CODE></A>,
<A HREF="../../../../javax/xml/transform/sax/TransformerHandler.html" title="interface in javax.xml.transform.sax"><CODE>TransformerHandler</CODE></A>, and
<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax"><CODE>XMLReader</CODE></A> instances.</p>
<p>To obtain a <A HREF="../../../../javax/xml/transform/sax/SAXTransformerFactory.html" title="class in javax.xml.transform.sax"><CODE>SAXTransformerFactory</CODE></A>,
the caller must cast the <A HREF="../../../../javax/xml/transform/TransformerFactory.html" title="class in javax.xml.transform"><CODE>TransformerFactory</CODE></A>
instance returned from
<A HREF="../../../../javax/xml/transform/TransformerFactory.html#newInstance()"><CODE>TransformerFactory.newInstance()</CODE></A>.
<p>The <A HREF="../../../../javax/xml/transform/sax/TransformerHandler.html" title="interface in javax.xml.transform.sax"><CODE>TransformerHandler</CODE></A> interface
allows a transformation to be created from SAX2 parse events, which is a "push"
model rather than the "pull" model that normally occurs for a transformation.
Normal parse events are received through the
<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/ContentHandler.html" title="class or interface in org.xml.sax"><CODE>ContentHandler</CODE></A> interface, lexical events such as
startCDATA and endCDATA are received through the
<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/ext/LexicalHandler.html" title="class or interface in org.xml.sax.ext"><CODE>LexicalHandler</CODE></A> interface, and events that signal
the start or end of disabling output escaping are received via
<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/ContentHandler.html#processingInstruction(java.lang.String, java.lang.String)" title="class or interface in org.xml.sax"><CODE>ContentHandler.processingInstruction(java.lang.String, java.lang.String)</CODE></A>, with the
target parameter being
<A HREF="../../../../javax/xml/transform/Result.html#PI_DISABLE_OUTPUT_ESCAPING"><CODE>Result.PI_DISABLE_OUTPUT_ESCAPING</CODE></A> and
<A HREF="../../../../javax/xml/transform/Result.html#PI_ENABLE_OUTPUT_ESCAPING"><CODE>Result.PI_ENABLE_OUTPUT_ESCAPING</CODE></A>. If
parameters, output properties, or other features need to be set on the
Transformer handler, a <A HREF="../../../../javax/xml/transform/Transformer.html" title="class in javax.xml.transform"><CODE>Transformer</CODE></A> reference
will need to be obtained from
<A HREF="../../../../javax/xml/transform/sax/TransformerHandler.html#getTransformer()"><CODE>TransformerHandler.getTransformer()</CODE></A>, and
the methods invoked from that reference.
<p>The <A HREF="../../../../javax/xml/transform/sax/TemplatesHandler.html" title="interface in javax.xml.transform.sax"><CODE>TemplatesHandler</CODE></A> interface
allows the creation of <A HREF="../../../../javax/xml/transform/Templates.html" title="interface in javax.xml.transform"><CODE>Templates</CODE></A> objects
from SAX2 parse events. Once the <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/ContentHandler.html" title="class or interface in org.xml.sax"><CODE>ContentHandler</CODE></A>
events are complete, the Templates object may be obtained from
<A HREF="../../../../javax/xml/transform/sax/TemplatesHandler.html#getTemplates()"><CODE>TemplatesHandler.getTemplates()</CODE></A>. Note that
<A HREF="../../../../javax/xml/transform/sax/TemplatesHandler.html#setSystemId(java.lang.String)"><CODE>TemplatesHandler.setSystemId(java.lang.String)</CODE></A> should
normally be called in order to establish a base system ID from which relative
URLs may be resolved.
<p>The
<A HREF="../../../../javax/xml/transform/sax/SAXTransformerFactory.html#newXMLFilter(javax.xml.transform.Source)"><CODE>SAXTransformerFactory.newXMLFilter(javax.xml.transform.Source)</CODE></A>
method allows the creation of a <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLFilter.html" title="class or interface in org.xml.sax"><CODE>XMLFilter</CODE></A>, which
encapsulates the SAX2 notion of a "pull" transformation. The following
illustrates several transformations chained together. Each filter points to a
parent <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax"><CODE>XMLReader</CODE></A>, and the final transformation is
caused by invoking <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLReader.html#parse(org.xml.sax.InputSource)" title="class or interface in org.xml.sax"><CODE>XMLReader.parse(org.xml.sax.InputSource)</CODE></A> on the final
reader in the chain.</p><P><P><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/xml/transform/dom/package-summary.html"><B>PREV PACKAGE</B></A> <A HREF="../../../../javax/xml/transform/stream/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -