NVelocity.Dvsl
Class Dvsl

Main DVSL class - use this as the helper class for apps

Constructor Summary
Dvsl()
        Initializes a new instance of the Dvsl class.

Property Summary
System.IO.FileInfo LogFile
         lets the user specify a filename for logging.
NVelocity.Runtime.Log.LogSystem LogSystem
         lets the user specify a class instance for logging.
Commons.Collections.ExtendedProperties Toolbox
        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
NVelocity.Context.IContext UserContext
         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
bool ValidatingParser
         Uses a validating parser on all input documents
System.Collections.Hashtable VelocityConfig
         lets the user pass a java.util.Properties containing properties for the configuration of the VelocityEngine used by DVSL

Method Summary
object GetAppValue(object key)
         Gets the application value for the specified key
void Main(string[] args)
         Allows command-line access. Usage : Dvsl.exe -STYLE stylesheeet [-IN infile] [-OUT outfile] [-TOOL toolboxname]
void MakeReady()
         sets up all the context goodies
object PutAppValue(object key, object value)
         Sets the application value for the specified key
void SetStylesheet(System.IO.TextReader value)
         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...
void SetStylesheet(System.IO.FileInfo value)
         Convenience function. See...
void SetStylesheet(string value)
         Convenience function. See...
long Transform(string infile, System.IO.TextWriter writer)
long Transform(System.Xml.XmlDocument dom4jdoc, System.IO.TextWriter writer)
         Transforms the given dom4j Document into the writer.
long Transform(System.IO.Stream stream, System.IO.TextWriter writer)
long Transform(System.IO.TextReader reader, System.IO.TextWriter writer)
long Transform(System.IO.FileInfo f, System.IO.TextWriter writer)
long XForm(System.Xml.XmlDocument dom4jdoc, System.IO.TextWriter writer)
long XForm(System.IO.TextReader reader, System.IO.TextWriter writer)
         does the transformation of the inputstream into the output writer

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Constructor Detail

Dvsl

public Dvsl()

Initializes a new instance of the Dvsl class.

Property Detail

LogFile

public System.IO.FileInfo LogFile

lets the user specify a filename for logging.


LogSystem

public NVelocity.Runtime.Log.LogSystem LogSystem

lets the user specify a class instance for logging.


Toolbox

public Commons.Collections.ExtendedProperties Toolbox

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


UserContext

public NVelocity.Context.IContext UserContext

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

ValidatingParser

public bool ValidatingParser

Uses a validating parser on all input documents

Parameters:
- validate

VelocityConfig

public System.Collections.Hashtable VelocityConfig

lets the user pass a java.util.Properties containing properties for the configuration of the VelocityEngine used by DVSL

Method Detail

GetAppValue

public object GetAppValue(object key)

Gets the application value for the specified key

Parameters:
key - key to use to retrieve value
Returns:
value if found, null otherwise

Main

public void Main(string[] args)

Allows command-line access. Usage : Dvsl.exe -STYLE stylesheeet [-IN infile] [-OUT outfile] [-TOOL toolboxname]


MakeReady

protected internal void MakeReady()

sets up all the context goodies


PutAppValue

public object PutAppValue(object key,
                          object value)

Sets the application value for the specified key

Parameters:
key - key to use to store value
value - value to be stored
Returns:
old value if any, null otherwise

SetStylesheet

public void SetStylesheet(System.IO.TextReader value)

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

SetStylesheet

public void SetStylesheet(System.IO.FileInfo value)

Convenience function. See...


SetStylesheet

public void SetStylesheet(string value)

Convenience function. See...


Transform

public long Transform(string infile,
                      System.IO.TextWriter writer)


Transform

public long Transform(System.Xml.XmlDocument dom4jdoc,
                      System.IO.TextWriter writer)

Transforms the given dom4j Document into the writer.

Parameters:
dom4jdoc - dom4j Document object
writer - Writer for output

Transform

public long Transform(System.IO.Stream stream,
                      System.IO.TextWriter writer)


Transform

public long Transform(System.IO.TextReader reader,
                      System.IO.TextWriter writer)


Transform

public long Transform(System.IO.FileInfo f,
                      System.IO.TextWriter writer)


XForm

protected internal long XForm(System.Xml.XmlDocument dom4jdoc,
                              System.IO.TextWriter writer)


XForm

protected internal long XForm(System.IO.TextReader reader,
                              System.IO.TextWriter writer)

does the transformation of the inputstream into the output writer