blob: 38e659d575c6ea5d0f2fc7e578f32f26288ba64d [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "../../style/dtd/document.dtd">
<!--
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xalan" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 2001, Sun
* Microsystems., http://www.sun.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
-->
<s1 title="XSLTC Documentation">
<s2 title="User Documentation">
<p>The following user documentation is currently available:</p>
<ul>
<li>Command-line <jump href="README.xsltc">compiler</jump> and
<jump href="README.xslt">runtime</jump> man pages.</li>
<li><link idref="xsltc_native_api">XSLTC Native API reference</link></li>
<li><link idref="xsltc_trax_api">XSLTC TrAX API reference</link></li>
<li><link idref="xsltc_performance">XSLTC Performance Hints</link></li>
</ul>
</s2>
<s2 title="Design Documents">
<p>The following design documents are currently available:</p>
<ul>
<li><link anchor="overall">XSLTC overall design</link></li>
<li><link anchor="compiler">XSLTC compiler design</link></li>
<li><link anchor="runtime">XSLTC runtime library design</link></li>
<li><link anchor="runtime">XSLTC internal DOM design</link></li>
<li><link anchor="trax">XSLTC TrAX implementation design</link></li>
</ul>
<!--========================= OVERALL DESIGN ==========================-->
<anchor name="overall"/>
<s3 title="XSLTC overall design">
<p>The figure below describes the overall design of XSLTC's compiler:</p>
<p><img src="overall_design.gif" alt="overall_design.gif"/></p>
<p><ref>Figure 1: Architectural overview of XSLTC</ref></p>
<p>A client application can use XSLTC either through its
<link idref="xsltc_native_api">native API</link> or through or
implementation of the <link idref="xsltc_trax_api">TrAX API</link>. The
<link anchor="compiler">compiler</link> generates one or more Java classes
(we have chosen to call them 'translets').
The <link anchor="runtime">runtime library</link> contains classes that
can load these translets and use them to transform XML documents to some
markup language or plain text. There is also a detailed document describing
<link idref="xsltc_namespace">namespace handling</link> in all parts of
XSLTC (compiler, internal DOM, and output handler).</p>
</s3>
<!--========================= COMPILER DESIGN =========================-->
<anchor name="compiler"/>
<s3 title="XSLTC compiler design">
<p>The figure below describes the overall design of XSLTC's compiler:</p>
<p><img src="compiler_design.gif" alt="compiler_design.gif"/></p>
<p><ref>Figure 2: Compiler architecture overview</ref></p>
<p>There is also a <link idref="xsltc_compiler">high-level design</link>
document for XSLTC's compiler. Apart from that you can also find separate
design documents for some XSL elements and XPath expressions, patterns
and functions:</p>
<s4 title="XSL elements">
<ul>
<li><link idref="xsl_sort_design">&lt;xsl:sort&gt;</link></li>
<li><link idref="xsl_key_design">&lt;xsl:key&gt;</link></li>
<li><link idref="xsl_whitespace_design">&lt;xsl:preserve-space&gt;</link></li>
<li><link idref="xsl_whitespace_design">&lt;xsl:strip-space&gt;</link></li>
<li><link idref="xsl_comment_design">&lt;xsl:comment&gt;</link></li>
<li><link idref="xsl_comment_design">&lt;xsl:message&gt;</link></li>
<li><link idref="xsl_if_design">&lt;xsl:if&gt;</link></li>
<li><link idref="xsl_choose_design">&lt;xsl:choose&gt;</link></li>
<li><link idref="xsl_variable_design">&lt;xsl:variable&gt;</link></li>
<li><link idref="xsl_variable_design">&lt;xsl:param&gt;</link></li>
<li><link idref="xsl_include_design">&lt;xsl:include&gt;</link></li>
<li><link idref="xsl_include_design">&lt;xsl:import&gt;</link></li>
<li><link idref="xsl_imports_design">&lt;xsl:apply-imports&gt;</link></li>
</ul>
</s4>
<s4 title="XPath functions">
<ul>
<li><link idref="xsl_key_design">key()</link></li>
<li><link idref="xsl_lang_design">lang()</link></li>
<li><link idref="xsl_unparsed_design">unparsed-entity-uri()</link></li>
</ul>
</s4>
<s4 title="XPath expressons">
<ul>
<li><link idref="xsltc_predicates">Predicates</link></li>
</ul>
</s4>
<s4 title="XPath patterns">
<ul>
<li><jump href="xsltc_predicates.html#step-pattern">StepPattern</jump></li>
<li><jump href="xsl_key_design.html#patterns">IdPattern</jump></li>
<li><jump href="xsl_key_design.html#patterns">KeyPattern</jump></li>
</ul>
</s4>
</s3>
<!--========================= RUNTIME DESIGN ==========================-->
<anchor name="runtime"/>
<s3 title="XSLTC runtime library design">
<p>The runtime portion of XSLTC has four main components; the internal DOM
implementation (not W3C), the translet class(es), the runtime
library and the output processor:</p>
<p><img src="runtime_design.gif" alt="runtime_design.gif"/></p>
<p><ref>Figure 3: Runtime library architecture overview</ref></p>
<p>The <link idref="xsltc_runtime">runtime library design</link> document
describes the structure of the compiled translet as well as the translet
runtime library.</p>
<p>The <link idref="xsltc_dom">Internal DOM design</link> document
describes the components and structure of the internal DOM, support for
DOM2 navigation, the DOM adapter, DOM multiplexer, and DOM builder.</p>
<p>The <link idref="xsltc_iterators">iterator design</link> document
describes the general design of the internal DOM iterators and describes
some of the more complicated iterators in detail.</p>
</s3>
<!--========================== TRAX DESIGN ===========================-->
<anchor name="trax"/>
<s3 title="XSLTC TrAX Implementation">
<p>An implementation of the JAXP/ TrAX interface was added on to XSLTC
at a late stage. Special care was taken to preserve the small footprint
and high performance of XSLTC. The following design was used to wrap
XSLTC behind a lightweight (but complete) TrAX implementation:</p>
<p><img src="trax_translet_wrapping.gif" alt="trax_translet_wrapping.gif"/></p>
<p><ref>Figure 4: XSLTC TrAX interface implementation</ref></p>
<p>The <link idref="xsltc_trax">TrAX design</link> document contains
details of XSLTC's TrAX implementation.</p>
<p>XSLTC also has a 'smart' TrAX <code>TransformerFactory</code> class
that will alternate between using XSLTC and Xalan for transformations.
This factory class will make its choices based on usage patterns. This will
be described in a separate design document.</p>
</s3>
</s2>
<p><ref>Design documents by <jump href="mailto:morten@xml.apache.org">Morten J&oslash;rgensen</jump> - updated 13.12.2001</ref></p>
</s1>