org.mmbase.module
Class XSLConvert

java.lang.Object
  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.8 2003/03/10 11:50:13 pierre Exp $
Author:
Case Roole, cjr@dds.nl

Constructor Summary
XSLConvert()
          CALC, a support module for servscan.
 
Method Summary
 java.util.Vector getList(scanpage sp, StringTagger tagger, java.lang.String value)
          Generate a list of values from a command to the processor NOT IMPLEMENTED FOR XSLConvert
 java.lang.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.
 void onload()
          prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules(). You should not call onload() directly.
 boolean process(scanpage sp, java.util.Hashtable cmds, java.util.Hashtable vars)
          Execute the commands provided in the form values
 void reload()
          What should this do, when is this called? (MM)
 java.lang.String replace(scanpage sp, java.lang.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.
 void shutdown()
          Shuts down the module.
 java.lang.String transform(java.lang.String xmlPath, java.lang.String xslPath)
          Transform XML file using an XSL file
 void unload()
          What should this do, when is this called? (MM)
 
Methods inherited from class org.mmbase.module.ProcessorModule
cacheCheck, getListBuilder, getNodeList, replace
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdownModules, startModule, startModules, state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLConvert

public XSLConvert()
CALC, a support module for servscan.

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

reload

public void reload()
Description copied from class: ProcessorModule
What should this do, when is this called? (MM)

Overrides:
reload in class ProcessorModule

onload

public void onload()
Description copied from class: ProcessorModule
prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules(). You should not call onload() directly.

Overrides:
onload in class ProcessorModule

unload

public void unload()
Description copied from class: ProcessorModule
What should this do, when is this called? (MM)

Overrides:
unload in class ProcessorModule

shutdown

public void shutdown()
Description copied from class: Module
Shuts down the module. This method is called by shutdownModules.

Overrides:
shutdown in class Module

getList

public java.util.Vector getList(scanpage sp,
                                StringTagger tagger,
                                java.lang.String value)
                         throws ParseException
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
Throws:
ParseException

process

public boolean process(scanpage sp,
                       java.util.Hashtable cmds,
                       java.util.Hashtable vars)
Execute the commands provided in the form values

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

replace

public java.lang.String replace(scanpage sp,
                                java.lang.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 java.lang.String transform(java.lang.String xmlPath,
                                  java.lang.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 java.lang.String getModuleInfo()
Description copied from class: Module
provide some info on the module

Overrides:
getModuleInfo in class Module


MMBase build 1.7.1.20041002