Debian Codegraph @

net/sf/saxon/s9api/package.html

raw symbols SCIP
1 <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2 <!-- Copyright (c) 2018 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.s9api</title>
12 </head>
13
14 <body>
15
16 <p>This package provides Saxon's preferred Java API for XSLT, XQuery, XPath, and XML Schema processing.
17 The interface is designed to hide as much as possible of the detail of the
18 implementation. However, the API architecture faithfully reflects the internal architecture
19 of the Saxon product, unlike standard APIs such as JAXP and XQJ which in many cases force
20 compromises in the design and performance of the application.</p>
21
22 <p>An application starts by loading a {@link net.sf.saxon.s9api.Processor}, which allows configuration options
23 to be set. As far as possible, an application should instantiate a single <code>Processor</code>.</p>
24
25 <p>The interfaces for XSLT, XQuery, and XPath processing all follow the same pattern. There is a three-stage
26 execution model: first a compiler is created using a factory method in the <code>Processor</code> object.
27 The compiler holds compile-time options and the static context information. Then the compiler's
28 <code>compile()</code> method is called to create an executable, a representation of the compiled stylesheet,
29 query, or expression. This is thread-safe and immutable once created. To run the query or transformation,
30 first call the <code>load()</code> method to create a run-time object called variously an {@link
31 net.sf.saxon.s9api.XsltTransformer},
32 {@link net.sf.saxon.s9api.XQueryEvaluator}, or {@link net.sf.saxon.s9api.XPathSelector}. This holds run-time context
33 information
34 such as parameter settings and the initial context node; the object is therefore not shareable and should
35 only be run in a single thread; indeed it should normally only be used once. This object also provides
36 methods allowing the transformation or query to be executed.</p>
37
38 <p>In Saxon-EE the <code>Processor</code> owns a {@link net.sf.saxon.s9api.SchemaManager} that holds
39 the cache of schema components and can be used to load new schema components from source schema documents.
40 It can also be used to create a {@link net.sf.saxon.s9api.SchemaValidator}, which in turn is used to validate
41 instance
42 documents.</p>
43
44 <p>Source documents can be constructed using a {@link net.sf.saxon.s9api.DocumentBuilder}, which holds all the options
45 and parameters to control document building.</p>
46
47 <p>The output of a transformation, or of any other process that generates an XML tree, can be sent to a
48 {@link net.sf.saxon.s9api.Destination}. There are a number of implementations of this interface, including a
49 {@link net.sf.saxon.s9api.Serializer} which translates the XML document tree into lexical XML form.</p>
50
51 <p>There are classes to represent the objects of the XDM data model, including {@link net.sf.saxon.s9api.XdmValue},
52 {@link net.sf.saxon.s9api.XdmItem}, {@link net.sf.saxon.s9api.XdmNode}, and {@link
53 net.sf.saxon.s9api.XdmAtomicValue}. These can be manipulated using methods based on the Java 8 streams
54 processing model: for details see package {@link net.sf.saxon.s9api.streams}.</p>
55
56
57 <hr>
58
59 </body>
60 </html>