Return-Path:
As a rule, XSP pages are translated into Cocoon
-
-
-
@@ -293,7 +314,11 @@
- A Cocoon's
- A default implementation (
- The base class
- Programming languages may provide a
- Interface
- A default implementation (
- Class
Both of these compilers are based on
-
To circumvent standard Java class loaders limitation, Cocoon provides a
simple customized class loader
+
(
Access to protected
- Class
- A Cocoon's
A base markup language processor implementation is provided in
- class
- Logicsheets are represented in class ProgramGenerator
is not
- restricted to run in a server pages environment.
+ Despite its particular usage for XSP,
+
+ ProgramGenerator
+
+ is not restricted to run in a server pages environment.
Generator
's.
+
+ Generator
's.
+
Generator
's created by XSP are invoked exclusively through
- ServerPagesGenerator
, a proxy that uses Cocoon's
- ProgramGenerator
ServerPagesGenerator
,
+
+ a proxy that uses Cocoon's
+ ProgramGenerator
ProgramGenerator
, on the other hand, refers to a Cocoon
component responsible for building and executing programs derived from XML
documents containing dynamic markup:
- org.apache.cocoon.components.language.generator.ProgramGenerator
+
+ org.apache.cocoon.components.language.generator.ProgramGenerator
+
ServerPagesGenerator
attempts to cope with a not unlikely
+ ServerPagesGenerator
+ attempts to cope with a not unlikely
possibility: premature termination of proxied generator
execution.
"Premature" here means that the invoked generator may return after
@@ -236,16 +247,24 @@
Rhino
Javascript),
XSP pages are translated into classes extending
- AbstractServerPage
.
+
+ AbstractServerPage
.
+
This class, in turn, extends
- ComposerGenerator
,
+
+ ComposerGenerator
,
+
which gives it access to commonly used components such as
parser or cocoon itself (typically used as
EntityResolver
for request URI's).
AbstractServerPage
implements Modifiable
. This
+ AbstractServerPage
implements
+
+ Modifiable
.
+
+ This
is tested by ProgramGenerator
to assert whether the page has
been invalidated as a result of files it depends on having changed on disk.
These files are typically
@@ -258,7 +277,9 @@
will be based on
Donald Ball's
(possibly extended)
- XIncludeFilter
.
+
+ XIncludeFilter
.
+
ProgrammingLanguage
processor exposes the
+ A Cocoon's
+
+ ProgrammingLanguage
+
+ processor exposes the
following methods:
getCodeFormatter
Return an (optional) instance of
- CodeFormatter
- CodeFormatter
+
used to beautify source code written in this programming language
quoteString
@@ -326,11 +351,13 @@
AbstractProgrammingLanguage
) is
+ A default implementation (
+ AbstractProgrammingLanguage
+ ) is
provided that extends
- AbstractNamedComponent
- AbstractProgrammingLanguage
implements
+ The base class
+ AbstractProgrammingLanguage
+ implements
this method as final
to delete the unloaded
source program file and delegate actual unloading to
method doUnload
.
@@ -490,12 +519,17 @@
CodeFormatter
+ Programming languages may provide a
+
+ CodeFormatter
+
instance used by code generators to beautify source code.
CodeGenerator
exposes a single method:
+ Interface
+ CodeFormatter
+ exposes a single method:
formatCode
. formatCode
takes as
arguments a String
containing the source code to
be beautified and an encoding
to be preserved
@@ -548,7 +582,10 @@
CompiledProgrammingLanguage
)
+ A base implementation
+
+ (CompiledProgrammingLanguage
)
+
is provided that adds the following protected variables and
abstract/overridable methods:
CompilerError
exposes the following
+ Class
+
+ CompilerError
+
+ exposes the following
methods:
AbstractJavaCompiler
.
+
+ AbstractJavaCompiler
.
+
RepositoryClassLoader
)
+
that features:
RepositoryClassLoader
class
- is proxied through interface ClassLoaderManager
.
+ is proxied through interface
+
+ ClassLoaderManager
.
+
This interface exposes the following methods:
ClassLoaderManagerImpl
implements
+ Class
+
+ ClassLoaderManagerImpl
+
+ implements
ClassLoaderManager
in a singleton-like fashion that
ensures that only one instance of this class loader exists,
thus ensuring the reinstantiation mechanism works properly.
@@ -887,7 +942,12 @@
MarkupLanguage
processor exposes the
+ A Cocoon's
+
+ MarkupLanguage
+
+ processor exposes the
following methods:
AbstractMarkupLanguage
. This class extends
- AbstractNamedComponent
to set the markup language's
+ class
+
+ AbstractMarkupLanguage
.
+
+ This class extends
+
+ AbstractNamedComponent
+
+ to set the markup language's
associated namespace using the following required parameters:
Logichseet
. This
+ Logicsheets are represented in class
+
+ Logichseet
.
+
+ This
class exposes the following methods:
- Class NamedLogicsheet
extends Logicsheet
+ Class
+
+ NamedLogicsheet
+
+ extends Logicsheet
to associate it with a namespace. This class exposes the following
additional methods:
Code generation as such (i.e., the final production of a string
containing a source program written in a programming language) is
- the responsibility of class CodeGenerator
.
+ the responsibility of class LogicsheetCodeGenerator
.
- The CodeGenerator
exposes the following methods:
+ Class
+
+ LogicsheetCodeGenerator
+
+ exposes the following methods:
- Though "regular" logicsheets do not emit source code as such,
- CogeGenerator
expects its last stylesheet
- to produce a single element containing only text.
+ Though "regular" logicsheets as such do not emit source code,
+ LogicshetCodeGenerator
expects its last
+ stylesheet to produce a single element containing only
+ a text node.
@@ -1151,9 +1233,9 @@
CodeGenerator
is currently implemented as a class.
- It should be defined as an interface in order to the decouple the
- code generator abstraction from its logicsheet-based implementation.
+ LogicsheetCodeGenerator
is currently implemented as a
+ class. It should be defined as an interface in order to the decouple
+ the code generator abstraction from its logicsheet-based implementation.
This would allow for alternative code-generation strategies to
be plugged.
getEncoding
is implemented by class
- XSPMarkupLanguage
by retrieving the attribute named
+
+ XSPMarkupLanguage
+
+ by retrieving the attribute named
encoding
in the root <xsp:page>
element.
- The ProgramGenerator
interface exposes a single
+ The
+
+ ProgramGenerator
+
+ interface exposes a single
load
method that takes as arguments a File
pointing to a source XML document, as well as a markup and
programming language name pair.
@@ -1398,8 +1488,15 @@
A default implementation of ProgramGenerator
- is provided that uses a FilesystemStore
as
- repository: ProgramGeneratorImpl
.
+ is provided that uses a
+
+ FilesystemStore
+
+ as
+ repository:
+
+ ProgramGeneratorImpl
.
+
In order to support pluggable markup and programming languages,
a new abstraction was added to Cocoon's arch
- core interfaces: NamedComponent
's.
+ core interfaces:
+
+ NamedComponent
.
+
Interface NamedComponent
is simply an extension to
- Component
that exposes a getName()
+
+ Component
+
+ that exposes a getName()
method.
- A NamedComponentManager
is a component responsible
+ A
+
+ NamedComponentManager
+
+ is a component responsible
for storing and locating NamedComponent
instances.
This interface exposes the following methods:
A default implementation is provided for this interface:
- NamedComponentManagerImpl
.
+
+ NamedComponentManagerImpl
.
+
- Class AbstractNamedComponent
provides a base implementation
- for NamedComponent
that extends Configurable
.
+ Class
+
+ AbstractNamedComponent
+
+ provides a base implementation
+ for NamedComponent
that extends
+
+ Configurable
.
+
This class exposes the following methods: