| java.lang.Object org.apache.dvsl.DVSL
All known Subclasses: org.apache.tools.dvsl.DVSL,
Constructor Summary | |
public | DVSL() |
Method Summary | |
public Object | getAppValue(Object key) | public static void | main(String[] args)
Allows command-line access. | protected void | makeReady() | public Object | putAppValue(Object key, Object value) | public void | setClassLoader(ClassLoader classLoader)
Specify a classloader for loading the Toolbox classes. | public void | setLogChute(LogChute logger)
lets the user specify a class instance for logging. | public void | setLogFile(File logFile)
lets the user specify a filename for logging. | public void | setLogSystem(LogSystem logger)
lets the user specify a class instance for logging. | public void | setStylesheet(String stylesheet) Convenience function. | public void | setStylesheet(File stylesheet) Convenience function. | public void | setStylesheet(File stylesheet, String stylesheetEncoding) Convenience function. | public void | setStylesheet(Reader styleReader)
Sets the stylesheet for this transformation set
Note that don't need this for each document you want
to transform. | public void | setToolbox(Properties p)
Loads the toolbox from the input Properties.
Currently supports specification of the Toolbox
name in the context, creating classes, and string
and integer values. | public void | setUserContext(Context ctx)
Sets the user context. | public void | setValidatingParser(boolean validate) | public void | setVelocityConfig(Map map) | public long | transform(File f, Writer writer) | public long | transform(Reader reader, Writer writer) | public long | transform(InputStream is, Writer writer) | public long | transform(Document dom4jdoc, Writer writer) Transforms the given dom4j Document into the writer. | public long | transform(String infile, Writer writer) | protected long | xform(Reader reader, Writer writer) | protected long | xform(Document dom4jdoc, Writer writer) |
validate | boolean validate(Code) | | |
getAppValue | public Object getAppValue(Object key)(Code) | | Gets the application value for the specified key
Parameters: key - key to use to retrieve value value if found, null otherwise |
main | public static void main(String[] args) throws Exception(Code) | |
Allows command-line access.
Usage : java -jar dvsl.jar -STYLE stylesheeet [-IN infile] [-OUT outfile] [-TOOL toolboxname]
|
makeReady | protected void makeReady()(Code) | | sets up all the context goodies
|
putAppValue | public Object putAppValue(Object key, Object value)(Code) | | Sets the application value for the specified key
Parameters: key - key to use to store value Parameters: value - value to be stored old value if any, null otherwise |
setClassLoader | public void setClassLoader(ClassLoader classLoader)(Code) | |
Specify a classloader for loading the Toolbox classes. Setting to null
resets to the default ClassLoader.
Parameters: classLoader - ClassLoader or null for default ClassLoader |
setLogChute | public void setLogChute(LogChute logger)(Code) | |
lets the user specify a class instance for logging.
|
setLogFile | public void setLogFile(File logFile)(Code) | |
lets the user specify a filename for logging.
|
setLogSystem | public void setLogSystem(LogSystem logger)(Code) | |
lets the user specify a class instance for logging.
|
setStylesheet | public void setStylesheet(String stylesheet) throws Exception(Code) | | Convenience function. See...
|
setStylesheet | public void setStylesheet(File stylesheet) throws Exception(Code) | | Convenience function. See...
|
setStylesheet | public void setStylesheet(File stylesheet, String stylesheetEncoding) throws Exception(Code) | | Convenience function. See...
|
setStylesheet | public void setStylesheet(Reader styleReader) throws Exception(Code) | |
Sets the stylesheet for this transformation set
Note that don't need this for each document you want
to transform. Just do it once, and transform away...
Parameters: styleReader - Reader with stylesheet char stream |
setToolbox | public void setToolbox(Properties p) throws ClassNotFoundException, InstantiationException, IllegalAccessException(Code) | |
Loads the toolbox from the input Properties.
Currently supports specification of the Toolbox
name in the context, creating classes, and string
and integer values. Ex :
toolbox.contextname = floyd
toolbox.tool.footool = Footool
toolbox.string.mystring = Hello there!
toolbox.integer.myint = 7
toolbox.string.sourcebase = ./xdocs/
So in template, this toolbox and it's values would
be accessed as :
$context.floyd.footool.getFoo()
$context.floyd.mystring
$context.floyd.myint
|
setUserContext | public void setUserContext(Context ctx)(Code) | |
Sets the user context. The user context is
a Velocity Context containing user-supplied
objects and data that are to be made available
in the template
Parameters: ctx - User context of data |
setValidatingParser | public void setValidatingParser(boolean validate)(Code) | |
Uses a validating parser on all input documents
Parameters: validate - |
setVelocityConfig | public void setVelocityConfig(Map map)(Code) | |
lets the user pass a java.util.Properties containing
properties for the configuration of the VelocityEngine
used by DVSL
|
transform | public long transform(Document dom4jdoc, Writer writer) throws Exception(Code) | | Transforms the given dom4j Document into the writer.
Parameters: dom4jdoc - dom4j Document object Parameters: writer - Writer for output |
xform | protected long xform(Reader reader, Writer writer) throws Exception(Code) | | does the transformation of the inputstream into
the output writer
|
|
|