⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jaxpintro6.html

📁 j2eePDF格式的电子书
💻 HTML
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  <head>    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />    <meta http-equiv="Content-Style-Type" content="text/css" />    <title>The XML Stylesheet Language for Transformation (XSLT) APIs</title>    <link rel="StyleSheet" href="document.css" type="text/css" media="all" />    <link rel="StyleSheet" href="catalog.css" type="text/css" media="all" />    <link rel="Table of Contents" href="J2EETutorialTOC.html" />    <link rel="Previous" href="JAXPIntro5.html" />    <link rel="Next" href="JAXPIntro7.html" />    <link rel="Index" href="J2EETutorialIX.html" />  </head>  <body>    <table width="550" summary="layout" id="SummaryNotReq1">      <tr>	<td align="left" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a>	</td>        <td align="center" valign="center"><a accesskey="p" href="JAXPIntro5.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JAXPIntro7.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a>        </td>	<td align="right" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font>	</font>	</td>      </tr>    </table>    <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider">    <blockquote><a name="wp64286"> </a><h2 class="pHeading1">The XML Stylesheet Language for Transformation (XSLT) APIs</h2><a name="wp64290"> </a><p class="pBody"><a  href="JAXPIntro6.html#wp64296">Figure 4-3</a> shows the XSLT APIs in action.</p><a name="wp64294"> </a><p class="pBody"></p><div align="left"><img src="images/Fig5-33.gif" height="320" width="391" alt="XSLT APIs: A TransformerFactory creates a Transform object,which followsTransformation Instructions to convert a Source data setinto a Result data set." border="0" hspace="0" vspace="0"/></div><p class="pBody"></p><p>  <a name="64296"> </a><strong><font >Figure 4-3    XSLT APIs</font></strong></p><a name="wp64297"> </a><p class="pBody">A <code class="cCode">TransformerFactory</code> object is instantiated, and used to create a <code class="cCode">Transformer</code>. The source object is the input to the transformation process. A source object can be created from SAX reader, from a DOM, or from an input stream.</p><a name="wp64298"> </a><p class="pBody">Similarly, the result object is the result of the transformation process. That object can be a SAX event handler, a DOM, or an output stream.</p><a name="wp64299"> </a><p class="pBody">When the transformer is created, it may be created from a set of transformation instructions, in which case the specified transformations are carried out. If it is created without any specific instructions, then the transformer object simply copies the source to the result.</p><a name="wp64301"> </a><h3 class="pHeading2">The XSLT Packages</h3><a name="wp65289"> </a><p class="pBody">The XSLT APIs are defined in the following packages:</p><div align="left"><table border="1" summary="XSLT Packages" id="wp65266">  <caption><a name="wp65266"> </a><div class="pTableTitle">Table 4-3   XSLT Packages</div></caption>  <tr align="center">    <th><a name="wp66003"> </a><div class="pCellHeading">Package</div></th>    <th><a name="wp66005"> </a><div class="pCellHeading">Description</div></th></tr>  <tr align="left">    <td><a name="wp65274"> </a><div class="pCellBody"><code class="cCode">javax.xml.transform </code></div></td>    <td><a name="wp65276"> </a><div class="pCellBody">Defines the <code class="cCode">TransformerFactory</code> and <code class="cCode">Transformer</code> classes, which you use to get a object capable of doing transformations. After creating a transformer object, you invoke its <code class="cCode">transform()</code> method, providing it with an input (source) and output (result).</div></td></tr>  <tr align="left">    <td><a name="wp65278"> </a><div class="pCellBody"><code class="cCode">javax.xml.transform.dom</code></div></td>    <td><a name="wp65280"> </a><div class="pCellBody">Classes to create input (source) and output (result) objects from a DOM.</div></td></tr>  <tr align="left">    <td><a name="wp65282"> </a><div class="pCellBody"><code class="cCode">javax.xml.transform.sax</code></div></td>    <td><a name="wp65284"> </a><div class="pCellBody">Classes to create input (source) from a SAX parser and output (result) objects from a SAX event handler.</div></td></tr>  <tr align="left">    <td><a name="wp65286"> </a><div class="pCellBody"><code class="cCode">javax.xml.transform.stream</code></div></td>    <td><a name="wp65288"> </a><div class="pCellBody">Classes to create input (source) and output (result) objects from an I/O stream.</div></td></tr></table></div><p class="pBody"></p>    </blockquote>   <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider">    <table width="550" summary="layout" id="SummaryNotReq1">      <tr>	<td align="left" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a>	</td>        <td align="center" valign="center"><a accesskey="p" href="JAXPIntro5.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JAXPIntro7.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a>        </td>	<td align="right" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font>	</font>	</td>      </tr>    </table>    <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"><p><font size="-1">All of the material in <em>The J2EE(TM) 1.4 Tutorial</em> is <a href="J2EETutorialFront2.html">copyright</a>-protected and may not be published in other workswithout express written permission from Sun Microsystems.</font>  </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -