|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.language.markup.AbstractMarkupLanguage org.apache.cocoon.components.language.markup.CocoonMarkupLanguage
public abstract class CocoonMarkupLanguage
Base implementation of MarkupLanguage
. This class uses
logicsheets as the only means of code generation. Code generation
should be decoupled from this context!!!
Nested Class Summary | |
---|---|
class |
CocoonMarkupLanguage.CocoonTransformerChainBuilderFilter
This filter builds on the fly a chain of transformers. |
class |
CocoonMarkupLanguage.PreProcessFilter
Preprocess filter for Cocoon Markup languages. |
Nested classes/interfaces inherited from class org.apache.cocoon.components.language.markup.AbstractMarkupLanguage |
---|
AbstractMarkupLanguage.LanguageDescriptor, AbstractMarkupLanguage.TransformerChainBuilderFilter |
Field Summary |
---|
Fields inherited from class org.apache.cocoon.components.language.markup.AbstractMarkupLanguage |
---|
ATTR_INTERPOLATION, languages, logicsheetCache, manager, name, TEXT_INTERPOLATION |
Fields inherited from interface org.apache.cocoon.components.language.markup.MarkupLanguage |
---|
ROLE |
Constructor Summary | |
---|---|
CocoonMarkupLanguage()
The default constructor. |
Method Summary | |
---|---|
protected void |
addDependency(String location)
Add a dependency on an external file to the document for inclusion in generated code. |
protected void |
addLogicsheetToList(AbstractMarkupLanguage.LanguageDescriptor language,
String logicsheetLocation)
Add a logicsheet to the code generator. |
protected AbstractXMLPipe |
getPreprocessFilter(String filename,
AbstractXMLPipe filter,
ProgrammingLanguage language)
Prepare the input source for logicsheet processing and code generation with a preprocess filter. |
abstract String |
getRootElement()
Returns the root element for this language. |
protected AbstractMarkupLanguage.TransformerChainBuilderFilter |
getTransformerChainBuilder(LogicsheetCodeGenerator logicsheetMarkupGenerator)
Returns a filter that chain on the fly the requested transformers for source code generation. |
void |
recycle()
Recycle this component: clear logic sheet list and dependencies. |
Methods inherited from class org.apache.cocoon.components.language.markup.AbstractMarkupLanguage |
---|
addLogicsheetsToGenerator, configure, dispose, generateCode, getEncoding, getLogicsheetFilter, getName, getPrefix, getURI, hasAttrInterpolation, hasTextInterpolation, service |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CocoonMarkupLanguage()
Method Detail |
---|
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractMarkupLanguage
protected AbstractXMLPipe getPreprocessFilter(String filename, AbstractXMLPipe filter, ProgrammingLanguage language)
XMLFilter
object is the first filter on the
transformer chain.
The markup language preprocess filter adds information on the root element
such as creation-date, file-name and file-path, plus it use the the passed
programming language to quote Strings
on PCDATA node.
getPreprocessFilter
in class AbstractMarkupLanguage
filename
- The source filenamelanguage
- The target programming language
CocoonMarkupLanguage.PreProcessFilter
protected AbstractMarkupLanguage.TransformerChainBuilderFilter getTransformerChainBuilder(LogicsheetCodeGenerator logicsheetMarkupGenerator)
getTransformerChainBuilder
in class AbstractMarkupLanguage
logicsheetMarkupGenerator
- the logicsheet markup generator
protected void addLogicsheetToList(AbstractMarkupLanguage.LanguageDescriptor language, String logicsheetLocation) throws IOException, SAXException, ProcessingException
AbstractMarkupLanguage
addLogicsheetToList
in class AbstractMarkupLanguage
language
- Target programming language of the logicsheetlogicsheetLocation
- Location of the logicsheet to be added
MalformedURLException
- If location is invalid
IOException
- IO Error
SAXException
- Logicsheet parse error
ProcessingException
protected void addDependency(String location)
File
's
tested for change on each invocation; this information is used to assert
whether regeneration is necessary. XSP uses <xsp:dependency>
elements for this purpose.
addDependency
in class AbstractMarkupLanguage
location
- The file path of the dependent fileAbstractMarkupLanguage
,
ServerPagesGenerator
,
AbstractServerPage
public abstract String getRootElement()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |