Debian Codegraph @

net/sf/saxon/event/package.html

raw symbols SCIP
1 <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2 <!-- Copyright (c) 2014 Saxonica Limited. -->
3 <!-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -->
4 <!-- If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5 <!-- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. -->
6 <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
7
8 <html>
9
10 <head>
11 <title>Package overview for net.sf.saxon.event</title>
12 </head>
13
14 <body>
15
16 <p>This package provides classes that feed SAX-like events from one tree to another.
17 Some of these classes are associated with serializing the output of a stylesheet, but there
18 are also classes for building a tree from a stream of events, for stripping whitespace, and
19 so on.</p>
20
21 <p>The {@link net.sf.saxon.event.Receiver} interface defines a class that accepts a stream of events, with one method
22 defined for each kind of event. The events are modelled on the design of SAX, but adapted
23 to the XPath data model and to the use of Saxon's NamePool. Attributes and namespaces are
24 notified individually <i>after</i> the start of the relevant element. Many of the classes
25 in this package are implementations of the <code>Receiver</code> interface.</p>
26
27 <p>The immediate output of node constructors in a query or stylesheet goes to a {@link
28 net.sf.saxon.event.SequenceReceiver}.
29 This is a subclass of <code>Receiver</code> that can handle an arbitrary sequence, containing atomic values
30 as well as nodes. When constructing the content of an element, a {@link net.sf.saxon.event.ComplexContentOutputter}
31 is used;
32 when constructing the content of a node such as a text node or attribute, a <code>SequenceOutputter</code>
33 is used instead.</p>
34
35 <p>The final destination of the push pipeline is sometimes a serializer, and sometimes a tree builder.
36 The final serialization classes are subclasses of <code>Emitter</code>, but some of the serialization work
37 (such as indentation or application of character maps) is done by other classes on the pipeline. These
38 are generally constructed by extending the <code>ProxyReceiver</code> class.</p>
39
40 <p>The Emitter is an abstract implementation of the Receiver interface. As well as supporting
41 the Receiver interface, it provides methods for controlling the destination of serialized output
42 (a Writer or OutputStream) and for setting serialization properties (in a Properties object).
43 In practice nearly all the implementations of Receiver are currently subclasses of Emitter,
44 but this may change in the future.</p>
45
46 <p>The package includes emitters for the standard output methods xml, html, and text, and
47 proxy emitters to allow a sequence of filters to be applied to the output.</p>,
48
49 <p>The class <code>ContentHandlerProxy</code> allows events to be converted into standard SAX events and
50 sent to a SAX2 <code>ContentHandler</code>. Similarly, the class <code>ProxyReceiver</code> acts as a
51 <code>ContentHandler</code>, accepting SAX2 events and feeding them into a <code>Receiver</code> pipeline.</p>
52
53 <p>The class <code>Builder</code> is a <code>Receiver</code> that constructs a tree representation of the
54 document in memory. There are two subclasses for Saxon's two native tree models. Other classes such as
55 a <code>Stripper</code> and a <code>NamespaceReducer</code> are used to modify the document by adding
56 filters to the pipeline.</p>
57
58 <p>Saxon's schema validator and serializer are both implemented using this push pipeline model.
59 The classes that perform
60 schema validation are part of package: {@link com.saxonica.validate}, while the serialization classes
61 are in {@link net.sf.saxon.serialize}.</p>
62
63
64 </body>
65 </html>