All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.xml.transform.sax.package.html Maven / Gradle / Ivy

Go to download

Xerces2 is the next generation of high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces introduces the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program. The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual. Xerces2 is a fully conforming XML Schema 1.0 processor. A partial experimental implementation of the XML Schema 1.1 Structures and Datatypes Working Drafts (December 2009) and an experimental implementation of the XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010) are provided for evaluation. For more information, refer to the XML Schema page. Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1. Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.

The newest version!




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.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy