javax.xml.transform.sax

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.transform.sax 
javax.xml.transform.sax
javax.xml.transform.sax

This package implements SAX2-specific transformation APIs. It provides classes which allow input from {@link org.xml.sax.ContentHandler} events, and also classes that produce org.xml.sax.ContentHandler events. It also provides methods to set the input source as an {@link org.xml.sax.XMLReader}, or to use a {@link org.xml.sax.InputSource} as the source. It also allows the creation of a {@link org.xml.sax.XMLFilter}, which enables transformations to "pull" from other transformations, and lets the transformer to be used polymorphically as an {@link org.xml.sax.XMLReader}.

The {@link javax.xml.transform.sax.SAXSource} class allows the setting of an {@link org.xml.sax.XMLReader} to be used for "pulling" parse events, and an {@link org.xml.sax.InputSource} that may be used to specify the SAX source.

The {@link javax.xml.transform.sax.SAXResult} class allows the setting of a {@link org.xml.sax.ContentHandler} to be the receiver of SAX2 events from the transformation.

The {@link javax.xml.transform.sax.SAXTransformerFactory} extends {@link javax.xml.transform.TransformerFactory} to provide factory methods for creating {@link javax.xml.transform.sax.TemplatesHandler}, {@link javax.xml.transform.sax.TransformerHandler}, and {@link org.xml.sax.XMLReader} instances.

To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory}, the caller must cast the {@link javax.xml.transform.TransformerFactory} instance returned from {@link javax.xml.transform.TransformerFactory#newInstance}.

The {@link javax.xml.transform.sax.TransformerHandler} 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 {@link org.xml.sax.ContentHandler} interface, lexical events such as startCDATA and endCDATA are received through the {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal the start or end of disabling output escaping are received via {@link org.xml.sax.ContentHandler#processingInstruction}, with the target parameter being {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If parameters, output properties, or other features need to be set on the Transformer handler, a {@link javax.xml.transform.Transformer} reference will need to be obtained from {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and the methods invoked from that reference.

The {@link javax.xml.transform.sax.TemplatesHandler} interface allows the creation of {@link javax.xml.transform.Templates} objects from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler} events are complete, the Templates object may be obtained from {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should normally be called in order to establish a base system ID from which relative URLs may be resolved.

The {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter} method allows the creation of a {@link org.xml.sax.XMLFilter}, which encapsulates the SAX2 notion of a "pull" transformation. The following illustrates several transformations chained together. Each filter points to a parent {@link org.xml.sax.XMLReader}, and the final transformation is caused by invoking {@link org.xml.sax.XMLReader#parse} on the final reader in the chain.

Java Source File NameTypeComment
SAXResult.javaClass
SAXSource.javaClass

Acts as an holder for SAX-style Source.

Note that XSLT requires namespace support.

SAXTransformerFactory.javaClass This class extends TransformerFactory to provide SAX-specific factory methods.
TemplatesHandler.javaInterface A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object.
TransformerHandler.javaInterface A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.