org.apache.cocoon.components.language.markup
Interface MarkupLanguage

All Known Implementing Classes:
AbstractMarkupLanguage

public interface MarkupLanguage

This interface defines a markup language whose SAX producer's instance are to be translated into an executable program capable or transforming the original document augmenting it with dynamic content

Version:
CVS $Id: MarkupLanguage.java 55257 2004-10-21 20:36:33Z cziegeler $
Author:
Ricardo Rocha, Vadim Gritsenko

Field Summary
static String ROLE
           
 
Method Summary
 String generateCode(Source source, String filename, ProgrammingLanguage programmingLanguage)
          Generate source code from the input source for the target ProgrammingLanguage.
 String getEncoding()
          Return the input document's encoding or null if it is the platform's default encoding.
 

Field Detail

ROLE

public static final String ROLE
Method Detail

getEncoding

public String getEncoding()
Return the input document's encoding or null if it is the platform's default encoding. This method should be called after generateCode method.

Returns:
The input document's encoding

generateCode

public String generateCode(Source source,
                           String filename,
                           ProgrammingLanguage programmingLanguage)
                    throws Exception
Generate source code from the input source for the target ProgrammingLanguage.

Parameters:
source - The source document
filename - The input document's original filename
programmingLanguage - The target programming language
Returns:
The generated source code
Throws:
Exception - If an error occurs during code generation


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.