org.mmbase.module
Class XSLConvert
java.lang.Object
|
+--org.mmbase.module.Module
|
+--org.mmbase.module.ProcessorModule
|
+--org.mmbase.module.XSLConvert
- All Implemented Interfaces:
- ProcessorInterface
- public class XSLConvert
- extends ProcessorModule
- Author:
- Case Roole, cjr@dds.nl
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.
$Id: XSLConvert.java,v 1.6 2001/07/16 10:08:08 jaco Exp $
$Log: XSLConvert.java,v $
Revision 1.6 2001/07/16 10:08:08 jaco
jaco: Moved all configuration stuff to MMBaseContext.
If needed params not found or incorrect a ServletException with a description isthrown.
It's now again possible to not redirect System.out and System.err to a file.
Parameters are searched in the webapp (using context-param parameters) when started using a servlet.
If htmlroot is not specified MMBaseContext will try to set it to the webapp root directory.
Revision 1.5 2001/07/09 12:30:02 jaco
jaco: Changed old method for retrieving mmbase.config and mmbase.htmlroot with new method.
Revision 1.4 2001/04/11 10:06:55 michiel
michiel: new logging system
Revision 1.3 2000/08/22 09:34:30 daniel
small fix for mmdemo
Revision 1.2 2000/08/10 20:06:04 case
cjr: removed some debug and added description of module
Revision 1.1 2000/08/10 15:08:17 case
cjr: XSL conversion module - call as $MOD-XSLCONVERT-xmlpath-xslfile
|
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. |
void |
onload()
|
boolean |
process(scanpage sp,
java.util.Hashtable cmds,
java.util.Hashtable vars)
Execute the commands provided in the form values |
void |
reload()
|
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()
|
java.lang.String |
transform(java.lang.String xmlPath,
java.lang.String xslPath)
Transform XML file using an XSL file |
void |
unload()
|
| Methods inherited from class org.mmbase.module.Module |
getClassName, getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setClassName, setInitParameter, setMaintainer, setName, setVersion, startModule, startModules, state |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSLConvert
public XSLConvert()
- CALC, a support module for servscan.
init
public void init()
- Description copied from class:
Module
- Initializes the module.
Init can 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()
- Overrides:
reload in class ProcessorModule
onload
public void onload()
- Overrides:
onload in class ProcessorModule
unload
public void unload()
- Overrides:
unload in class ProcessorModule
shutdown
public void shutdown()
- Overrides:
shutdown in class ProcessorModule
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
- Overrides:
getList in class ProcessorModule
- Following copied from class:
org.mmbase.module.ProcessorModule
- Parameters:
sp - the page contextparams - contains the attributes for the listcommand - the list command to execute.
process
public boolean process(scanpage sp,
java.util.Hashtable cmds,
java.util.Hashtable vars)
- Execute the commands provided in the form values
- 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.
- 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 filexslPath - 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 2001