dleslie 01/01/12 13:29:51
Modified: targets/xalan/design design1_1_0.html design2_0_0.html
Removed: targets/xalan/design/images conceptual.gif data.gif
org_apache.gif process.gif trax.gif xalan1_1x1.gif
xmllogo.gif xpath.gif
Log:
Xalan-J 2 design moved to Xalan J2 tree.
Revision Changes Path
1.5 +8 -8 xml-site/targets/xalan/design/design1_1_0.html
Index: design1_1_0.html
===================================================================
RCS file: /home/cvs/xml-site/targets/xalan/design/design1_1_0.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- design1_1_0.html 2000/07/28 13:26:49 1.4
+++ design1_1_0.html 2001/01/12 21:29:17 1.5
@@ -1,10 +1,10 @@
<html>
- <head>
- <title>
- </title>
- </head>
- <body>
- <meta content="0; URL=design2_0_0.html" http-equiv="Refresh">
- Redirecting to <a href="design2_0_0.html">Xalan-J 2.0 Design</a>
- </body>
+<head>
+<title>
+</title>
+</head>
+<body>
+<meta content="0; URL=../../xalan-j/design/design2_0_0.html"
http-equiv="Refresh">
+ Redirecting to <a href="../../xalan-j/design/design2_0_0.html">Xalan-J
2.0 Design</a>
+</body>
</html>
1.5 +10 -649 xml-site/targets/xalan/design/design2_0_0.html
Index: design2_0_0.html
===================================================================
RCS file: /home/cvs/xml-site/targets/xalan/design/design2_0_0.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- design2_0_0.html 2000/12/08 14:11:14 1.4
+++ design2_0_0.html 2001/01/12 21:29:20 1.5
@@ -1,649 +1,10 @@
-<HTML><HEAD><TITLE>Xalan-J 2.0 Design</TITLE></HEAD><BODY alink="#ff0000"
bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4"
marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><H1><A
href="http://xml.apache.org"><IMG src="images/xmllogo.gif"></A>
- Xalan-J 2.0 Design</H1><HR>
- <P></P>
- <P>Author: Scott Boag<BR>State: In Progress</P>
- <UL>
- <LI><A href="#intro">Introduction</A></LI>
- <LI><A href="#overarch">Overview of Architecture</A></LI>
- <LI><A href="#process">Process Module</A></LI>
- <LI><A href="#templates">Templates Module</A></LI>
- <LI><A href="#transformer">Transformer Module</A></LI>
- <UL>
- <LI><A href="#stree">Stree Module</A></LI>
- <LI><A href="#extensions">Extensions Module</A></LI>
- </UL>
- <LI><A href="#xpath">XPath Module</A></LI>
- <UL><LI><A href="#xpathdbconn">XPath Database Connection</A></LI></UL>
- <LI><A href="#utils">Utils Package</A></LI>
- <LI><A href="#other">Other Packages</A></LI>
- <LI><A href="#coding">Coding Conventions</A></LI>
- <LI><A href="#open">Open Issues</A><BR><BR></LI>
- <LI><A href="http://xml.apache.org/xalan-j/index.html">Xalan-J 2.0 Uesr's
Guide</A></LI>
- <LI><A href="http://xml.apache.org/xalan-j/apidocs/index.html">Xalan-J
2.0 Javadoc</A></LI>
- </UL><A name="intro"><!--anchor--></A>
- <H2>Introduction</H2>
- <P></P>
- <P>This document presents the basic design for Xalan-J 2.0, which is a
- <A
href="http://www.awl.com/cseng/titles/0-201-89542-0/techniques/refactoring.htm">refactoring</A>
- and redesign of the Xalan-J 1.x processor. The main goals of
this redesign are
- to: </P>
- <OL>
- <LI>Make the design and code more understandable by Open Source
- people.</LI>
- <LI>Reduce code size and complexity.</LI>
- <LI>By simplifying the code, make optimization easier.</LI>
- <LI>Make modules generally more localized, and less tangled
with other
- modules.</LI>
- <LI>Begin the adoption of the TrAX (Transformations for XML)
- interfaces.</LI>
- <LI>Increase the streamability of transformations.</LI></OL>
- <P>The techniques used toward these goals are to:</P>
- <OL>
- <LI>In general, flatten the hierarchy of packages, in order to
make the
- structure more apparent from the top-level view.</LI>
- <LI>Break the construction and the validation of the XSLT
stylesheet from
- the stylesheet objects themselves.</LI>
- <LI>Drive the construction of the stylesheet through a table,
so that it
- is less prone to error.</LI>
- <LI>Break the transformation process into a separate package,
away from
- the stylesheet objects.</LI>
- <LI>Create this design document, as a starting point for people
interested in
- approaching the code.</LI>
- </OL>
- <P>The goals are not:</P>
- <OL>
- <LI>To add more features in the progress of this refactoring.
This is
- design and code clean-up in order to meet the above-named
goals. We expect that it will be <B>much</B> easier to add
- features once this work is completed.</LI>
- <LI>To optimize code for the sake of optimization. However, we
- expect that the code will be faster once this work is
complete.</LI>
- </OL>
- <P>How well we've achieved the goals will be measured by feedback from
the
- <A
href="http://xml-archive.webweaving.org/xml-archive-xalan">Xalan-dev</A> list,
and by software metrics tools.</P>
- <P>Please note that the diagrams in this design document are meant to
be
- useful abstractions, and may not always be exact.</P>
- <A name="overarch"><!--anchor--></A>
- <H2>Overview of Architecture</H2>
- <P></P>
- <P>Xalan 2.0 is divided into four major modules, and various smaller
- modules. The main modules are:</P>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/processor/package-summary.html">org.apache.xalan.processor</A></FONT></CODE></DT>
- <DD>The module that processes the stylesheet, and provides the
main
- entry point into Xalan.</DD>
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/templates/package-summary.html">org.apache.xalan.templates</A></FONT></CODE></DT>
- <DD>The module that defines the stylesheet structures,
including the
- Stylesheet object, template element instructions, and
Attribute Value
- Templates. </DD>
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/transformer/package-summary.html">org.apache.xalan.transformer</A></FONT></CODE></DT>
- <DD>The module that applies the source tree to the Templates,
and
- produces a result tree.</DD>
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xpath/package-summary.html">org.apache.xpath</A></FONT></CODE></DT>
- <DD>The module that processes both XPath expressions, and XSLT
Match
- patterns.</DD>
- </DL>
- <P>In addition to the above modules, Xalan implements the
- <A href="http://trax.openxml.org/">TrAX</A> interfaces, and
depends on the
- <A href="http://www.megginson.com/SAX/Java/index.html">SAX2</A> and <A
href="http://www.w3.org/TR/DOM-Level-2/">DOM</A> packages.
-</P><P><IMG src="images/trax.gif"></P><P>There is also a general utilities
package that contains both XML utility
- classes such as QName, but generally useful classes such as
- StringToIntTable.</P>
- <P>In the diagram below, the dashed lines denote visibility. All
packages
- access the SAX2 and DOM packages.</P>
- <P><IMG src="images/xalan1_1x1.gif"></P>
- <P>In addition to the above packages, there are the following
additional
- packages:</P>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/client/package-summary.html">org.apache.xalan.client</A></FONT></CODE></DT>
- <DD>This package has a client applet. I suspect this should be
moved
- into the samples directory.</DD>
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/extensions/package-summary.html">org.apache.xalan.extensions</A></FONT></CODE></DT>
- <DD>This holds classes belonging to the Xalan extensions
mechanism,
- which allows Java code and script to be called from within a
stylesheet.</DD>
-
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/lib/package-summary.html">org.apache.xalan.lib</A></FONT></CODE></DT>
- <DD>This is the built-in Xalan extensions library, which holds
- extensions such as Redirect (which allows a stylesheet to
produce multiple
- output files).</DD>
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/res/package-summary.html">org.apache.xalan.res</A></FONT></CODE></DT>
- <DD>This holds resource files needed by Xalan, such as error
message
- resources.</DD>
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/trace/package-summary.html">org.apache.xalan.trace</A></FONT></CODE></DT>
- <DD>This package contains classes and interfaces that allow a
caller to
- add trace listeners to the transformation, allowing an
interface to XSLT
- debuggers and similar tools.</DD>
- </DL>
- <DL>
- <DT><CODE><FONT face="courier, monospaced"><A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/xslt/package-summary.html">org.apache.xalan.xslt</A></FONT></CODE></DT>
- <DD>This package is for backwards compatibility with
applications that
- depend on Xalan 1.x interfaces.</DD>
- </DL>
- <P>A more conceptual view of this architecture is as follows:</P><P><IMG
src="images/conceptual.gif"></P><A name="process"><!--anchor--></A>
- <H2>Process Module</H2>
- <P></P>
- <P>The <CODE><FONT face="courier,
monospaced">org.apache.xalan.process</FONT></CODE> module implements the
- <CODE><FONT face="courier,
monospaced">org.apache.xalan.trax.Processor</FONT></CODE> interface, which
provides a
- factory method for creating a concrete Processor instance, and
provides methods
- for creating a <CODE><FONT face="courier,
monospaced">org.apache.xalan.trax.Templates</FONT></CODE> instance, which, in
- Xalan and XSLT terms, is the Stylesheet. Thus the task of the
process module is
- to read the XSLT input in the form of a file, stream, SAX
events, or a DOM
- tree, and produce a Templates/Stylesheet object.</P>
- <P>The overall strategy is to define a schema that dictates the legal
- structure for XSLT elements and attributes, and to associate
with those
- elements construction-time processors that can fill in the
appropriate fields
- in the top-level Stylesheet object, and also associate classes
in the templates
- module that can be created in a generalized fashion. This makes
the validation
- object-to-class associations centralized and declarative.</P>
- <P>The schema's root class is
- <CODE><FONT face="courier,
monospaced">org.apache.xalan.processor.XSLTSchema</FONT></CODE>, and it is here
that the
- XSLT schema structure is defined. XSLTSchema uses
- <CODE><FONT face="courier,
monospaced">org.apache.xalan.processor.XSLTElementDef</FONT></CODE> to define
elements, and
- <CODE><FONT face="courier,
monospaced">org.apache.xalan.processor.XSLTAttributeDef</FONT></CODE> to define
attributes.
- Both classes hold the allowed namespace, local name, and type
of element or
- attribute. The XSLTElementDef also holds a reference to a
- <CODE><FONT face="courier,
monospaced">org.apache.xalan.processor.XSLTElementProcessor</FONT></CODE>, and
a sometimes a
- <CODE><FONT face="courier, monospaced">Class</FONT></CODE>
object, with which it can create objects that derive from
- <CODE><FONT face="courier,
monospaced">org.apache.xalan.templates.ElemTemplateElement</FONT></CODE>. In
addition, the
- XSLTElementDef instance holds a list of XSLTElementDef
instances that define
- legal elements or character events that are allowed as children
of the given
- element.</P>
- <P>The implementation of the <CODE><FONT face="courier,
monospaced">org.apache.xalan.trax.Processor</FONT></CODE>
- interface is in <CODE><FONT face="courier,
monospaced">org.apache.xalan.processor.StylesheetProcessor</FONT></CODE>,
- which creates a <CODE><FONT face="courier,
monospaced">org.apache.xalan.processor.StylesheetHandler</FONT></CODE>
- instance. This instance acts as the ContentHandler for the
parse events, and is
- handed to the <CODE><FONT face="courier,
monospaced">org.xml.sax.XMLReader</FONT></CODE>, which the StylesheetProcessor
- uses to parse the XSLT document. The StylesheetHandler then
receives the parse
- events, which maintains the state of the construction, and
passes the events on
- to the appropriate XSLTElementProcessor for the given event, as
dictated by the
- XSLTElementDef that is associated with the given event.</P>
- <P><IMG src="images/process.gif"></P>
- <A name="templates"><!--anchor--></A>
- <H2>Templates Module</H2>
- <P></P>
- <P>The <CODE><FONT face="courier,
monospaced">org.apache.xalan.templates</FONT></CODE> module implements the
- <CODE><FONT face="courier,
monospaced">org.apache.xalan.trax.Templates</FONT></CODE> interface, and
defines a set of
- classes that represent a Stylesheet. The primary purpose of
this module is to
- hold stylesheet data, not to perform procedural tasks
associated with the
- construction of the data, nor tasks associated with the
transformation itself.
- </P>
- <P>A <CODE><FONT face="courier,
monospaced">StylesheetRoot</FONT></CODE>, which implements the
- <CODE><FONT face="courier, monospaced">Templates</FONT></CODE>
interface, is a type of <CODE><FONT face="courier,
monospaced">StylesheetComposed</FONT></CODE>,
- which is a <CODE><FONT face="courier,
monospaced">Stylesheet</FONT></CODE> composed of itself and all included
- <CODE><FONT face="courier, monospaced">Stylesheet</FONT></CODE>
objects. A <CODE><FONT face="courier, monospaced">StylesheetRoot</FONT></CODE>
has a global
- imports list, which is a list of all imported <CODE><FONT
face="courier, monospaced">StylesheetComposed</FONT></CODE>
- instances. From each <CODE><FONT face="courier,
monospaced">StylesheetComposed</FONT></CODE> object, one can iterate
- through the list of directly or indirectly included <CODE><FONT
face="courier, monospaced">Stylesheet</FONT></CODE>
- objects, and one call also iterate through the list of all
- <CODE><FONT face="courier,
monospaced">StylesheetComposed</FONT></CODE> objects of lesser import
precedence.
- <CODE><FONT face="courier,
monospaced">StylesheetRoot</FONT></CODE> is a <CODE><FONT face="courier,
monospaced">StylesheetComposed</FONT></CODE>, which is a
- <CODE><FONT face="courier,
monospaced">Stylesheet</FONT></CODE>.</P>
- <P>Each stylesheet has a set of properties, which can be set by various
- means, usually either via an attribute on xsl:stylesheet, or
via a top-level
- xsl instruction (for instance, xsl:attribute-set). The get
methods for these
- properties only access the declaration within the given
<CODE><FONT face="courier, monospaced">Stylesheet</FONT></CODE>
- object, and never takes into account included or imported
stylesheets. The
- <CODE><FONT face="courier,
monospaced">StylesheetComposed</FONT></CODE> derivative object, if it is a root
- <CODE><FONT face="courier, monospaced">Stylesheet</FONT></CODE>
or imported <CODE><FONT face="courier, monospaced">Stylesheet</FONT></CODE>,
has "composed"
- getter methods that do take into account imported and included
stylesheets, for
- some of these properties. The table of Stylesheet properties,
with composed
- methods, is as follows. Note that the names of the attributes
are according to
- a formula for translating the xsl names to the Java get/set
method names.</P>
- <TABLE border="0" cellpadding="2" cellspacing="2" width="100%">
- <TR>
- <TD align="center" bgcolor="#039acc" colspan="1" rowspan="1"
valign="center"><FONT color="#ffffff" face="arial,helvetica,sanserif"
size="-1"><B>Property</B>
- </FONT></TD>
- <TD align="center" bgcolor="#039acc" colspan="1" rowspan="1"
valign="center"><FONT color="#ffffff" face="arial,helvetica,sanserif"
size="-1"><B>Type</B>
- </FONT></TD>
- <TD align="center" bgcolor="#039acc" colspan="1" rowspan="1"
valign="center"><FONT color="#ffffff" face="arial,helvetica,sanserif"
size="-1"><B>XSL Origin</B>
- </FONT></TD>
- <TD align="center" bgcolor="#039acc" colspan="1" rowspan="1"
valign="center"><FONT color="#ffffff" face="arial,helvetica,sanserif"
size="-1"><B>Composed Methods</B>
- </FONT></TD>
- <TD align="center" bgcolor="#039acc" colspan="1" rowspan="1"
valign="center"><FONT color="#ffffff" face="arial,helvetica,sanserif"
size="-1"><B>Note</B>
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">XmlnsXsl
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">String
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">xmlns:xsl
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">(none, applies to stylesheet only)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">ExtensionElementPrefixes
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StringVector
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#extension-element">extension-element-prefixes</A></FONT></CODE>
- attribute
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">(none, applies to stylesheet only)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">ExcludeResultPrefixes
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StringVector
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#literal-result-element">exclude-result-prefixes
- or xsl:exclude-result-prefixes</A></FONT></CODE>
attributes
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">(not sure about this... only from root?)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif" size="-1">I
think this should be a root method, and a single list should be
- made, like with xsl:output.
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Id
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">String
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">The <CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#section-Embedding-Stylesheets">id</A></FONT></CODE>
- attribute
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">(none, applies to stylesheet only)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Version
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">String
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">The <CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#forwards">version</A></FONT></CODE>
attribute
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">(none, applies to stylesheet only)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">XmlSpace
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">boolean
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#strip">xml:space</A></FONT></CODE>
attribute
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">(none, applies to stylesheet only)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Import
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of StylesheetComposed objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#import">xsl:import</A></FONT></CODE>
element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getImportComposed(int i) / getImportCountComposed()
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Composed list contains all imported sheets, not the importing sheet
- itself.
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Include
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of Stylesheet objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#include">xsl:include</A></FONT></CODE>
element
- </FONT></TD>
-
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getIncludeComposed(int i) / getIncludeCountComposed()
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Composed list contains all directly or indirectly included
- stylesheets.
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">DecimalFormat
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Stack (list of DecimalFormatProperties objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#format-number">xsl:decimal-format</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getDecimalFormatComposed(QName name)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StripSpaces
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Stack (list of XPath match pattern objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#strip">xsl:strip-space</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getWhiteSpaceInfo(TransformerImpl transformContext, Node
- sourceTree, Element targetElement)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">PreserveSpaces
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Stack (list of XPath match pattern objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#strip">xsl:preserve-space</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getWhiteSpaceInfo(TransformerImpl transformContext, Node
- sourceTree, Element targetElement)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Output
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">OutputFormatExtended
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#output">xsl:output</A></FONT></CODE>
element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getOutputComposed() on StylesheetRoot only
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Key
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of KeyDeclaration objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#key">xsl:key</A></FONT></CODE> element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getKeysComposed()
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">AttributeSet
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of ElemAttributeSet objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#attribute-sets">xsl:attribute-set</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif" size="-1">On
StylesheetRoot only?
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Variable
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of ElemVariable objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#top-level-variables">xsl:variable</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Param
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of ElemParam objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#top-level-variables">xsl:param</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Template
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of ElemTemplate objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#section-Defining-Template-Rules">xsl:template</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">getTemplateComposed(TransformerImpl transformContext, Node
- sourceTree, Node targetNode, QName mode) and
getTemplateComposed(QName
- qname)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">NamespaceAlias
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Vector (list of ElemTemplate objects)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1"><CODE><FONT face="courier, monospaced"><A
href="http://www.w3.org/TR/xslt#literal-result-element">xsl:namespace-alias</A></FONT></CODE>
- element
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif" size="-1">On
StylesheetRoot only?
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">NonXslTopLevel
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Hashtable (table of opaque objects keyed by QName)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Any top-level non-xslt element.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">none.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Href
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">URL
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">The location of the stylesheet, possibly set by xsl:include or
- xsl:import.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">none.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StylesheetRoot
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StylesheetRoot
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">The root of the stylesheet tree, for quick access.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">none.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StylesheetParent
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Stylesheet
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">The importing or including stylesheet.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">none.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StylesheetComposed
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">StylesheetComposed
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">The closest importing stylesheet.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">none.
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- <TR>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">NamespaceDecls
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">Linked list of NameSpace elements
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">xmlns:foo attribute map
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">(none, applies to stylesheet only)
- </FONT></TD>
- <TD align="left" bgcolor="#a0ddf0" colspan="1" rowspan="1"
valign="top"><FONT color="#000000" face="arial,helvetica,sanserif"
size="-1">
- </FONT></TD>
- </TR>
- </TABLE>
- <A name="transformer"><!--anchor--></A>
- <H2>Transformer Module</H2>
- <P></P>
- <P>The <A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/transformer/package-summary.html">Transformer</A>
module is in charge of run-time transformations. The <A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/transformer/TransformerImpl.html">TransformerImpl</A>
object, which implements the TrAX <A
href="http://trax.openxml.org/javadoc/trax/Transformer.html">Transformer</A>
interface, and has an association with a <A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/templates/StylesheetRoot.html">StylesheetRoot</A>
object, begins the processing of the source tree (or provides a <A
href="http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html">ContentHandler</A>
reference), and performs the transformation. The Transformer package does as
much of the transformation as it can, but element level operations are
generally performed in the <A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/templates/ElemTemplateElement.html#execute(org.apache.xalan.transformer.TransformerImpl,
org.w3c.dom.Node,
org.apache.xalan.utils.QName)">ElemTemplateElement.execute(...)</A>
methods.</P><P>Result Tree events are fed into a <A
href="http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/transformer/ResultTreeHandler.html">ResultTreeHandler</A>
object, which acts as a layer between the direct calls to the result
-tree content handler (often a Serializer), and the Transformer. For one
thing,
- we have to delay the call to
- startElement(name, atts) because of the
- xsl:attribute and xsl:copy calls. In other words,
- the attributes have to be fully collected before you
- can call startElement.</P><P>Other important classes in this package
are:</P><DL><DT>CountersTable and Counter</DT><DD>The Counter class does
incremental counting for support of xsl:number.
- This class stores a cache of counted nodes (m_countNodes).
- It tries to cache the counted nodes in document order...
- the node count is based on its position in the cache list. The
CountersTable class is a table of counters, keyed by ElemNumber objects, each
- of which has a list of Counter objects.</DD></DL><DL><DT>KeyIterator,
KeyManager, and KeyTable</DT><DD>These classes handle mapping of keys declared
with the xsl:key element.</DD></DL><DL><DT>TransformState</DT><DD>This
interface is meant to be used by a consumer of SAX2 events produced by Xalan,
and enables the consumer
- to get information about the state of the transform. It
- is primarily intended as a tooling interface.</DD></DL><P>Even though the
following modules are defined in the org.apache.xalan package, instead of the
transformer package, they are defined in this section as they are mostly
related to runtime transformation.</P><A name="stree"><!--anchor--></A>
- <H3>Stree Module</H3><P></P><P>The Stree module implements the default <A
href="http://www.w3.org/TR/xpath#data-model">Source Tree </A> for Xalan, that
is to be transformed. It implements read-only <A
href="http://www.w3.org/TR/DOM-Level-2/">DOM2</A> interfaces, and provides some
information needed for fast transforms, such as document order indexes. It
also attempts to allow a streaming transform by launching the transform on a
secondary thread as soon as the SAX2 <A
href="http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html#startDocument()">StartDocument</A>
event has occurred. When the transform requests a node, and node is not
present, the getFirstChild and GetNextSibling methods will wait until the child
node has arrived, or an <A
href="http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html#endElement(java.lang.String,%20java.lang.String,%20java.lang.String)">endElement</A>
event has occurred.</P><P>Note that the secondary thread is an issue. It
would be better to do the same thing as described above on a single thread, but
using the parser in 'pull' mode, or simply with a parseNext method so the parse
would occur in blocks.</P><P>This kind of streaming is not perfect because it
still requires an entire source tree to be concretely built. There have been a
lot of good discussions on the xalan-dev list about how to do static analysis
of a stylesheet, and be able to allocate only the nodes needed by the
transform, while they are needed (or not allocate source objects at
all).</P><P>Vincent-Olivier Arsenault <[EMAIL PROTECTED]> has proposed
the following design:</P><P>By looking at the stylesheet you know how
streamable it is (of course this
-needs strict adherence to the xslt recommendation). since there's a root
-template and no <xsl:apply-templates/> you can build your context list
-containing only absolute xpath which means nodes get out of context
-faster).</P>
-
-<P>The paths of the relevant nodes, for this stylesheet, are (ok this is an
-example, so I may be missing some):</P>
-<OL>
-<LI>path: "/address" context: "address" (at
</address>, you get rid of the
-whole "person/address" stuff);</LI>
-
-<LI>path: "/adn" context: "adn";</LI>
-
-<LI>path: "/medicalrecord" context: "/" (for possibly
repetitive nodes, the
-context is always the parent node).</LI>
-</OL>
-<P>And all the rest goes to trash!!!!</P>
-
-<P>Let me refine:</P>
-
-<P>you analyze the whole stylesheet like that (would be good if optimization
-and xpath list could be done simultaneously) and you end up with a list of
-expanded paths mapped to all the templates.</P>
-
-<P>An entry in the list (i would call this list the transformation stack)
would
-consist of 4 things:</P>
-<OL>
-<LI>the relevance context xpath (on which the input nodes will be tested for
-pertinence: do we keep it of not);</LI>
-
-<LI>the transformation rule to apply to the matching nodes (this can just be
a
-forwarder to another template transformation stack);</LI>
-
-<LI>a result buffer (in which the nodes that can't be streamed are
temporarily
-stored);</LI>
-
-<LI>the streaming context xpath (triggers streaming of the buffer to the
-output).</LI>
-</OL><A name="extensions"><!--anchor--></A>
-<H3>Extensions Module</H3><P></P><P>This package contains an implementation
of Xalan Extension Mechanism, which uses the <A
href="http://oss.software.ibm.com/developerworks/opensource/bsf/">Bean
Scripting Framework</A>.
-
-The Bean Scripting Framework (BSF) is an architecture for incorporating
scripting into Java applications and applets. Scripting languages such as
Netscape Rhino (Javascript), VBScript, Perl, Tcl, Python, NetRexx and Rexx can
be used to augment XSLT's functionality. In addition, the Xalan extension
mechanism allows use of Java classes. See the <A
href="http://xml.apache.org/xalan/extensions.html">Xalan-J 1 extension
documentation</A> for a description of using extensions in a stylesheet. Please
note that the W3C XSL Working Group is working on a specification for standard
extension bindings, and this module will change to follow that specification.
</P><P>[More needed... -sb]</P><A name="xpath"><!--anchor--></A>
- <H2>XPath Module</H2>
- <P></P>
- <P>This module is pulled out of the Xalan package, and put in the
org.apache package, to emphasize that the intention is that this package can be
used independently of the XSLT engine, even though it has dependencies on the
Xalan utils module.</P><P><IMG src="images/org_apache.gif"></P>
- <P>The XPath module first compiles the XPath strings into expression
trees, and then executes these expressions via a call to the XPath execute(...)
function. </P> <P>Major classes are:</P><DL><DT>XPath</DT><DD>Represents a
compiled XPath. Major function is <CODE><FONT face="courier,
monospaced">XObject execute(XPathContext xctxt, Node contextNode,
- PrefixResolver
namespaceContext).</FONT></CODE></DD></DL><DL><DT>XPathAPI</DT><DD>The methods
in this class are convenience methods into the
- low-level XPath API.</DD></DL><DL><DT>XPathContext</DT><DD>Used as the
runtime execution context for XPath.</DD></DL><DL><DT>DOMHelper</DT><DD>Used as
a helper for handling DOM issues. May be subclassed to take advantage
- of specific DOM
implementations.</DD></DL><DL><DT>SourceTreeManager</DT><DD>bottlenecks all
management of source trees. The methods
- in this class should allow easy garbage collection of source
- trees, and should centralize parsing for those source
trees.</DD></DL><DL><DT>Expression</DT><DD>The base-class of all expression
objects, allowing polymorphic behaviors.</DD></DL><P>The general architecture
of the XPath module is divided into the compiler, and categories of expression
objects.</P><P><IMG src="images/xpath.gif"></P><P>The most important module is
the axes module. This module implements the DOM2 <A
href="http://www.w3.org/TR/DOM-Level-2/traversal.html#Iterator-overview">NodeIterator</A>
interface, and is meant to allow XPath clients to either override the default
behavior or to replace this behavior.</P><P>The LocPathIterator and
UnionPathIterator classes implement the <A
href="http://www.w3.org/TR/DOM-Level-2/java-binding.html#org.w3c.dom.traversal.NodeIterator">NodeIterator</A>
interface, and polymorphically use AxesWalker derived objects to execute each
step in the path. The whole trick is to execute the LocationPath in
depth-first document order so that nodes can be found without necessarily
looking ahead or performing a breadth-first search.</P><A
name="xpathdbconn"><!--anchor--></A><H3>XPath Database
Connection</H3><P></P><P>An important part of the XPath design in both Xalan 1
and Xalan 2, is to enable database connections to be used as drivers directly
to the XPath <A
href="http://www.w3.org/TR/xpath#location-paths">LocationPath</A> handling.
This allows databases to be directly connected to the transform, and be able to
take advantage of internal indexing and the like. While in Xalan 1 this was
done via the <A
href="http://xml.apache.org/xalan/apidocs/org/apache/xalan/xpath/XLocator.html">XLocator</A>
interface, in Xalan 2 this interface is no longer used, and has been replaced
by the DOM2 <A
href="http://www.w3.org/TR/DOM-Level-2/traversal.html#Iterator-overview">NodeIterator</A>
interface. An application or extension should be able to install their own
NodeIterator for a given document.</P><P><IMG
src="images/data.gif"></P><P>[More to do]</P><A name="utils"><!--anchor--></A>
- <H2>Utils Package</H2>
- <P></P>
- <P>This package contains general utilities for use by both the xalan and
xpath packages. It is the intention that many of these utility classes (or
their equivalents) be eventually brought into the org.apache.xml package for
general use. The list of major utilities are as
follows:</P><DL><DT>AttList</DT><DD>Wraps a DOM attribute list in a SAX
Attributes.</DD></DL><DL><DT>BoolStack, IntStack, IntVector,
etc.</DT><DD>Simple stacks and vectors for primitive
values.</DD></DL><DL><DT>DefaultErrorHandler</DT><DD>Implements SAX error
handler for default reporting.</DD></DL><DL><DT>DOMBuilder</DT><DD>Takes SAX
events (in addition to some extra events
- that SAX doesn't handle yet) and adds the result to a document
- or document fragment.</DD></DL><DL><DT>Heap</DT><DD>Classic heap
implementation.</DD></DL><DL><DT>MutableAttrListImpl</DT><DD>Mutable version of
AttributesImpl.</DD></DL><DL><DT>NameSpace</DT><DD>A representation of a
namespace.</DD></DL><DL><DT>NodeVector</DT><DD>A very simple table that stores
a list of Nodes.</DD></DL><DL><DT>ObjectPool</DT><DD>Used for reuse of
objects.</DD></DL><DL><DT>PrefixResolver</DT><DD>The class that implements this
interface can resolve prefixes
- to namespaces.</DD></DL><DL><DT>PrefixResolverDefault</DT><DD>This class
implements a generic PrefixResolver for a DOM, that
- can be used to perform prefix-to-namespace lookup
- for an XPath.</DD></DL><DL><DT>QName</DT><DD>Class to represent a
qualified XML name.</DD></DL><DL><DT>StringToStringTable</DT><DD>A very simple
lookup table that stores a list of strings for lookup. Used when a hashtable
is too much overhead.</DD></DL><DL><DT>SystemIDResolver</DT><DD>Able to take a
SystemID string and try and turn it into a good absolute
URL.</DD></DL><DL><DT>TreeWalker</DT><DD>Implements a Visitor design pattern,
doing a pre-order walk of the DOM tree, calling a ContentHandler interface as
it goes. Used for DOM-to-SAX conversion.</DD></DL><DL><DT>Trie</DT><DD>A
digital search trie for 7-bit ASCII
text.</DD></DL><DL><DT>UnImplNode</DT><DD>To be subclassed by classes that wish
to act as DOM nodes, without having to implement all the methods. Widely
used.</DD></DL><A name="other"><!--anchor--></A>
- <H2>Other Packages</H2>
- <P></P>
- <DL><DT>client</DT><DD>Implementation of Xalan Applet [should we keep
this?].
-
-</DD></DL>
- <DL><DT>dtm</DT><DD>Implementation of the Document Table Model
(DTM) [Should we keep this?].</DD></DL>
- <DL><DT>extensions</DT><DD>Implementation of Xalan Extension
Mechanism, which uses the Bean Scripting Framework.</DD></DL>
- <DL><DT>lib</DT><DD>Implementation of Xalan-specific extensions
[I want to add lots more extensions to this
package!].</DD></DL><DL><DT>res</DT><DD>Contains strings that require
internationalization.</DD></DL><A name="coding"><!--anchor--></A>
- <H2>Coding Conventions</H2>
- <P></P>
- <P>This section documents the coding conventions used in the Xalan
- source.</P>
- <OL>
- <LI>Class files are arranged with constructors and possibly an
init()
- function first, public API methods second, package specific,
protected, and
- private methods following (arranged based on related
functionality), member
- variables with their getter/setter access methods last.</LI>
- <LI>Non-static member variables are prefixed with
"m_".</LI>
- <LI>static final member variables should always be upper case,
without
- the "m_" prefix. They need not have accessors.</LI>
- <LI>Private member variables that are not accessed outside the
class need
- not have getter/setter methods declared.</LI>
- <LI>Private member variables that are accessed outside the
class should
- have either package specific or public getter/setter methods
declared. All
- accessors should follow the bean design patterns.</LI>
- <LI>Package-scoped member variables, public member variables,
and
- protected member variables should not be declared.</LI>
- </OL>
- <A name="open"><!--anchor--></A>
- <H2>Open Issues</H2>
- <P></P>
- <P>This section documents architectural and design issues that I still
- consider to be open or unsolved. (This list is ongoing, and
will change over
- time... it's simply a place for me to note problems that are
ongoing and need
- to be solved.)</P>
- <DL>
- <DT>Space stripping</DT>
- <DD>In Xalan 1.x, it is clear that space stripping was a major
- performance issue. This needs to be solved in Xalan 2.0 by
stripping the
- space nodes as the document is being parsed. This is a major
problem though for
- DOM trees. This can be perhaps be solved by preprocessing the
DOM tree and
- creating a table of space-stripping parent elements, when the
nodes can't be
- pre-stripped.</DD>
- </DL>
-
-<HR><FONT color="#0086b2" size="-1"><I>
- Copyright © 2000 The Apache Software
Foundation</I></FONT></BODY></HTML>
\ No newline at end of file
+<html>
+<head>
+<title>
+</title>
+</head>
+<body>
+<meta content="0; URL=../../xalan-j/design/design2_0_0.html"
http-equiv="Refresh">
+ Redirecting to <a href="../../xalan-j/design/design2_0_0.html">Xalan-J
2.0 Design</a>
+</body>
+</html>