xmltooling::TemplateEngine Class Reference

Simple template replacement engine. More...

#include <xmltooling/util/TemplateEngine.h>

List of all members.

Public Member Functions

void setTagPrefix (const char *tagPrefix)
 Sets the tag name to use when locating template replacement tags.
virtual void run (std::istream &is, std::ostream &os, const TemplateParameters &parameters, const XMLToolingException *e=NULL) const
 Processes template from an input stream and executes replacements and conditional logic based on parameters.

Static Public Attributes

static std::string unsafe_chars
 List of non-built-in characters considered "unsafe" and requiring HTML encoding.

Classes

class  TemplateParameters
 Interface to parameters to plug into templates. More...


Detailed Description

Simple template replacement engine.

Supports the following:

The default tag prefix is "mlp". This can be overridden for compatibility.


Member Function Documentation

virtual void xmltooling::TemplateEngine::run ( std::istream &  is,
std::ostream &  os,
const TemplateParameters parameters,
const XMLToolingException e = NULL 
) const [virtual]

Processes template from an input stream and executes replacements and conditional logic based on parameters.

Parameters:
is input stream providing template
os output stream to send results of executing template
parameters parameters to plug into template
e optional exception to extract parameters from

void xmltooling::TemplateEngine::setTagPrefix ( const char *  tagPrefix  ) 

Sets the tag name to use when locating template replacement tags.

Parameters:
tagPrefix base prefix for tags


Member Data Documentation

std::string xmltooling::TemplateEngine::unsafe_chars [static]

List of non-built-in characters considered "unsafe" and requiring HTML encoding.

The default set is #%&():[]\`{}


The documentation for this class was generated from the following file:
Generated on Mon Oct 19 14:18:35 2009 for xmltooling by  doxygen 1.4.7