Project

Profile

Help

How to connect?
Download (2.05 KB) Statistics
| Branch: | Tag: | Revision:

he / latest9.3 / hej / net / sf / saxon / style / package.html @ 9acaa097

1
<html>
2

    
3
<head>
4
<title>Package overview: net.sf.saxon.style</title>
5

    
6
</head>
7

    
8

    
9
<body>
10

    
11
<p>This package provides classes used during the compilation of an XSLT stylesheet.
12
The instances of these classes are discarded once compilation is complete, and they play no role
13
in executing the transformation at run-time, except when tracing and debugging are invoked.</p>
14

    
15
<p>The class <b>StyleElement</b> represents an element node on the stylesheet tree. Subclasses
16
of StyleElement represent individual stylesheet elements, and are generally named according to
17
the XSLT element name, for example XSLApplyTemplates, XSLChoose. The class <b>XSLStylesheet</b>
18
is used for the <code>xsl:stylesheet</code> element in each stylesheet module, and in particular for the
19
<code>xsl:stylesheet</code> element in the principal stylesheet module.</p>
20

    
21
<p>During construction of the stylesheet tree, the class <b>StyleNodeFactory</b> is nominated to
22
the <b>Builder</b> as the factory class responsible for creating element nodes on the tree. It is
23
this class that decides which subclass of StyleElement to use for each element appearing in the
24
stylesheet. For extension elements, the decision is delegated to a user-created 
25
<b>ExtensionElementFactory</b>.</p>
26

    
27
<p>Each class provides a number of methods supporting the various phases of processing. The sequence
28
of events sometimes varies slightly, but in general the first phase is done by <code>prepareAttributes</code>,
29
which performs local validation of the attributes of each instruction. The second phase is represented
30
by the <code>validate</code> method, which does global validation, fixup of references, and type checking.
31
The third phase is done by the <code>compile</code> method, which generates <code>Instruction</code> and
32
<code>Expression</code> objects. Further processing (local and global optimization) is then done on these
33
Instruction objects, and is no longer the responsibility of this package.</p>
34

    
35
<hr>
36

    
37
<p align="center"><i>Michael H. Kay<br/>
38
Saxonica Limited<br/>
39
9 February 2005</i></p>
40
</body>
41
</html>
(69-69/69)