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

All Superinterfaces:
Component
All Known Implementing Classes:
AbstractMarkupLanguage, CocoonMarkupLanguage, XSPMarkupLanguage

public interface MarkupLanguage
extends Component

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.html 1304258 2012-03-23 10:09:27Z ilgrosso $
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

static final String ROLE
Method Detail

getEncoding

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

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-2010 The Apache Software Foundation. All Rights Reserved.