org.mmbase.module
Class XSLConvert

java.lang.Object
  extended byorg.mmbase.util.functions.FunctionProvider
      extended byorg.mmbase.module.Module
          extended byorg.mmbase.module.ProcessorModule
              extended byorg.mmbase.module.XSLConvert
All Implemented Interfaces:
ProcessorInterface

public class XSLConvert
extends ProcessorModule

XSL conversion module Right now, only the replace() method is defined. It is called as: $MOD-XSLCONVERT-xmlPath-xslFile where xmlPath is the path relative to mmbase.config and xslFile is and xsl file located in the subdirectory xslt of mmbase.config.

Version:
$Id: XSLConvert.java,v 1.12 2004/10/25 08:08:36 pierre Exp $
Author:
Case Roole, cjr@dds.nl
Warning: Will be moved to:
org.mmbase.util.xml
Class for Application :
XSL or Tools

Nested Class Summary
 
Nested classes inherited from class org.mmbase.module.ProcessorModule
ProcessorModule.GetNodeListFunction, ProcessorModule.ProcessFunction, ProcessorModule.ReplaceFunction
 
Field Summary
 
Fields inherited from class org.mmbase.module.ProcessorModule
PARAM_PAGEINFO, PARAMS_PAGEINFO
 
Fields inherited from class org.mmbase.module.Module
getMaintainerFunction, getVersionFunction
 
Fields inherited from class org.mmbase.util.functions.FunctionProvider
functions, getFunctions
 
Constructor Summary
XSLConvert()
           
 
Method Summary
 Vector getList(PageInfo sp, StringTagger tagger, String value)
          Generate a list of values from a command to the processor NOT IMPLEMENTED FOR XSLConvert
 String getModuleInfo()
          provide some info on the module
 void init()
          Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.
 boolean process(PageInfo sp, Hashtable cmds, Hashtable vars)
          Execute the commands provided in the form values
 String replace(PageInfo sp, String cmds)
          Handle a $MOD command It is called as: $MOD-XSLCONVERT-xmlPath-xslFile where: - xmlPath is the path relative to mmbase.config and, - xslFile is xsl file located in the subdirectory xslt of mmbase.config.
 String transform(String xmlPath, String xslPath)
          Transform XML file using an XSL file
 
Methods inherited from class org.mmbase.module.ProcessorModule
cacheCheck, getListBuilder, getNodeList, onload, reload, replace, unload
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getModule, getModule, getModuleLoader, getModuleReader, getModules, getName, getProperties, getProperty, getVersion, hasStarted, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdown, shutdownModules, startModule, startModules, state
 
Methods inherited from class org.mmbase.util.functions.FunctionProvider
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLConvert

public XSLConvert()
Method Detail

init

public void init()
Description copied from class: ProcessorModule
Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.

Overrides:
init in class ProcessorModule

getList

public Vector getList(PageInfo sp,
                      StringTagger tagger,
                      String value)
Generate a list of values from a command to the processor NOT IMPLEMENTED FOR XSLConvert

Specified by:
getList in interface ProcessorInterface
Overrides:
getList in class ProcessorModule

process

public boolean process(PageInfo sp,
                       Hashtable cmds,
                       Hashtable vars)
Execute the commands provided in the form values

Specified by:
process in interface ProcessorInterface
Overrides:
process in class ProcessorModule

replace

public String replace(PageInfo sp,
                      String cmds)
Handle a $MOD command It is called as: $MOD-XSLCONVERT-xmlPath-xslFile where: - xmlPath is the path relative to mmbase.config and, - xslFile is xsl file located in the subdirectory xslt of mmbase.config.

Specified by:
replace in interface ProcessorInterface
Overrides:
replace in class ProcessorModule

transform

public String transform(String xmlPath,
                        String xslPath)
Transform XML file using an XSL file

Parameters:
xmlPath - Path to XML file
xslPath - Path to XSL file
Returns:
Converted document

getModuleInfo

public String getModuleInfo()
Description copied from class: Module
provide some info on the module

Overrides:
getModuleInfo in class Module


MMBase build 1.8.1.20060716