Package Name | Comment |
org.apache.xalan | |
org.apache.xalan.client |
Xalan Client Package.
Implementation of Xalan applet.
|
org.apache.xalan.extensions |
Xalan Extension Mechanism Package.
Implementation of Xalan Extension Mechanism.
|
org.apache.xalan.lib |
Xalan and EXSLT Extensions.
Extension elements and functions shipped with Xalan-Java, including EXSLT functions.
We are adding extensions to this package.
|
org.apache.xalan.lib.sql |
Xalan SQL Extension
Provides extension functions for connecting to a JDBC data source, executing a query,
and working incrementally through a "streamable" result set. Streaming (reuse of a single row node to traverse the result set) is the default mode of operation. If you want unlimited access to the entire result set, you can cache the query result set (1 row node for each row in the result set).
If you use streaming mode (the default), you can only access row elements one at a time moving forward through the result set. The use of XPath expressions in your stylesheet, for example, that attempt to return nodes from the result set in any other manner may produce unpredictable results.
XConnection provides three extension functions that you can use in your stylesheet.
new() -- Use one of the XConnection constructors to connect to a data source, and return an XConnection
object.
query() -- Use the XConnection object query() method to return a "streamable" result set in the form of a row-set
node. Work your way through the row-set one row at a time. The same row element is used over and over again, so you can
begin "transforming" the row-set before the entire result set has been returned.
- close() -- Use the XConnection object close() method to terminate the connection.
The query() extension function returns a Document node that contains (as needed) an array of column-header elements,
a single row element that is used repeatedly, and an array of col elements. Each column-header element (one per column in the
row-set) contains an attribute (ColumnAttribute) for each of the column descriptors in the ResultSetMetaData object.
Each col element contains a text node with a textual representation of the value for that column in the current row.
Example
This example displays the result set from a table in a sample InstantDB database.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:sql="org.apache.xalan.lib.sql.XConnection"
extension-element-prefixes="sql">
<xsl:output method="html" indent="yes"/>
<xsl:param name="query" select="'SELECT * FROM import1'"/>
<xsl:template match="/">
<!-- 1. Make the connection -->
<xsl:variable name="products"
select="sql:new('org.enhydra.instantdb.jdbc.idbDriver',
'jdbc:idb:D:\instantdb\Examples\sample.prp')"/>
<HTML>
<HEAD>
</HEAD>
<BODY>
<TABLE border="1">
<!--2. Execute the query -->
<xsl:variable name="table" select='sql:query($products, $query)'/>
<TR>
<!-- Get column-label attribute from each column-header-->
<xsl:for-each select="$table/sql/metadata/column-header">
<TH><xsl:value-of select="@column-label"/></TH>
</xsl:for-each>
</TR>
<xsl:apply-templates select="$table/sql/row-set/row"/>
<xsl:text> </xsl:text>
</TABLE>
</BODY>
</HTML>
<!-- 3. Close the connection -->
<xsl:value-of select="sql:close($products)"/>
</xsl:template>
<xsl:template match="row">
<TR>
<xsl:apply-templates select="col"/>
</TR>
</xsl:template>
<xsl:template match="col">
<TD>
<!-- Here is the column data -->
<xsl:value-of select="text()"/>
</TD>
</xsl:template>
</xsl:stylesheet>
|
org.apache.xalan.processor |
Xalan Processor Package.
Parses an XSLT stylesheet document (which may include and import other stylesheet documents) and produces a StylesheetRoot
(a TRaX Templates object).
StylesheetProcessor implements the TRaX {@link javax.xml.transform.TransformerFactory} interface,
as well as the {@link javax.xml.transform.sax.SAXTransformerFactory} interface.
It registers the {@link org.apache.xalan.processor.StylesheetHandler} object
(a TrAX {@link javax.xml.transform.sax.TemplatesHandler} implementation)
as the SAX ContentHandler for an XMLReader, and uses the XMLReader to parse
the stylesheet document.
Before parsing the XSLT input, StylesheetHandler assembles an {@link org.apache.xalan.processor.XSLTSchema},
which uses {@link org.apache.xalan.processor.XSLTElementDef}
and {@link org.apache.xalan.processor.XSLTAttributeDef} objects to
recursively define the elements and attributes that an XSLT stylesheet may
contain. The StylesheetHandler then passes on each parse event to the
{@link org.apache.xalan.processor.XSLTElementProcessor} which the
XSLTElementDef assigned to the element associated with that event.
|
org.apache.xalan.res |
Xalan resource Package.
Contains strings that require internationalization.
|
org.apache.xalan.serialize | |
org.apache.xalan.templates |
Xalan Templates Package.
Implements the {@link javax.xml.transform.Templates} interface,
and defines a set of classes that represent an XSLT stylesheet.
{@link org.apache.xalan.templates.StylesheetRoot} implements the {@link javax.xml.transform.Templates} interface, and
extends {@link org.apache.xalan.templates.StylesheetComposed},
which is a {@link org.apache.xalan.templates.Stylesheet} composed of itself
and its included Stylesheet objects. A StylesheetRoot also contains a
global list of all imported StylesheetComposed objects. The
role of these objects is to hold immutable stylesheet data, not to perform
procedural tasks associated with the
construction of the data (the org.apache.xalan.processor package) or with the transformation (the org.apache.xalan.transformer
package).
{@link org.apache.xalan.templates.ElemTemplateElement} is the superclass of
all XSLT instruction elements, including Stylesheet. The xFunc classes
extend members of the org.apache.xpath package and implement XSLT functions. Unlike
the Stylesheet "container" objects, the
instruction element and function classes do contain procedural execute()
methods that are called during the transformation.
|
org.apache.xalan.trace |
Xalan Trace (debugger) Package.
Implementation of Xalan Trace events, for use by a debugger.
|
org.apache.xalan.transformer |
Xalan Transformer Package.
In charge of run-time transformations and the production of result trees.
{@link org.apache.xalan.transformer.TransformerImpl} implements the
{@link javax.xml.transform.Transformer} interface, and is the core representation
of the transformation execution.
For each node in the XML source, TransformerImpl uses the StylesheetRoot and underlying XSLT schema to determine which
template to apply: one of the templates in the StylesheetRoot, a default template rule as specified in the XSLT spec, or
none.
The Transformer works with {@link org.apache.xml.serializer.SerializationHandler} to
forward the SAX-like events produced by the
transformation to the appropriate output ContentHandler.
To the degree possible, the parsing of the XML source and application of the Templates object to that source are performed
concurrently in separate threads. When necessary, the Transformer waits for the parse events that must be in place before a
given template may be applied.
|
org.apache.xalan.xslt |
Xalan command-line interface.
Implementation of Xalan command-line interface.
|
org.apache.xalan.xsltc | |
org.apache.xalan.xsltc.cmdline | |
org.apache.xalan.xsltc.cmdline.getopt | |
org.apache.xalan.xsltc.compiler | |
org.apache.xalan.xsltc.compiler.util | |
org.apache.xalan.xsltc.dom | |
org.apache.xalan.xsltc.runtime | |
org.apache.xalan.xsltc.runtime.output | |
org.apache.xalan.xsltc.trax | |
org.apache.xalan.xsltc.util | |
org.apache.xml.dtm | |
org.apache.xml.dtm.ref | |
org.apache.xml.dtm.ref.dom2dtm | |
org.apache.xml.dtm.ref.sax2dtm | |
org.apache.xml.res | |
org.apache.xml.serializer |
Xalan Serializer Package.
Processes SAX events into streams.
The {@link org.apache.xml.serializer.SerializerFactory} is used to
create a {@link org.apache.xml.serializer.Serializer} from a set of
output properties (see {@link javax.xml.transform.OutputKeys}).
{@link org.apache.xml.serializer.ToStream} acts as the main
baseclass for the Xalan serializer implementations.
{@link org.apache.xml.serializer.ToHTMLStream} derives from this
to implement HTML serialization.
{@link org.apache.xml.serializer.ToTextStream}
implements plain text serialization.
{@link org.apache.xml.serializer.ToXMLStream}
implements XML serialization.
XML mapping from characters to entity references is defined in
XMLEntities.res. HTML entity reference mapping is defined in HTMLEntities.res.
Encoding information is defined in {@link org.apache.xml.serializer.Encodings}.
|
org.apache.xml.serializer.utils | |
org.apache.xml.utils |
Xalan utilities.
Implementation of Xalan utility classes. This package is also shared by XPath.
There *should* be no outward dependencies to XPath or Xalan by classes in this package.
|
org.apache.xml.utils.res | |
org.apache.xpath |
XPath support Package.
Implementation of XPath; for the most part, only classes meant for public use are
found at this root level of the XPath packages.
|
org.apache.xpath.axes |
XPath LocationPath support.
Implementation of XPath LocationPath support -- primary classes are
LocPathIterator and UnionPathIterator.
|
org.apache.xpath.compiler |
XPath parsing and compilation support Package.
Implements an XPath parser which produces an OpMap, and a so-called Compiler
which produces an expression tree for fast evaluation.
|
org.apache.xpath.domapi |
XPath domapi Package.
Implements DOM Level 3 XPath API
|
org.apache.xpath.functions |
XPath functions Package.
Implements XPath functions -- each function is derived from Function,
FunctionOneArg, Function2Args, etc, with number-of-arguments checking being
applied mainly at compile time -- this package only implements XPath functions,
XSLT functions are found in the "templates" package.
|
org.apache.xpath.jaxp | |
org.apache.xpath.objects |
XPath objects Package.
Implementation of XPath polymorphic type objects -- this package will grow
as XPath objects are expanded to support XML Schema data types.
|
org.apache.xpath.operations |
Xalan XPath operations.
Support for XPath operations, such as +, -, string(), etc.
|
org.apache.xpath.patterns |
XPath nodetest and XSLT pattern matching support.
Implementation of XPath nodeTest support, and XSLT pattern matching support.
|
org.apache.xpath.res |
XPath resources.
Contains strings for XPath support that require internationalization.
|