/// <summary> initializes the document. init() is not longer
/// dependant upon context, but we need to let the
/// init() carry the template name down throught for VM
/// namespace features
/// </summary>
public virtual void InitDocument()
{
/*
* send an empty InternalContextAdapter down into the AST to initialize it
*/
InternalContextAdapterImpl ica = new InternalContextAdapterImpl(new VelocityContext());
try {
/*
* put the current template name on the stack
*/
ica.PushCurrentTemplateName(name);
/*
* init the AST
*/
((SimpleNode)data).init(ica, rsvc);
} finally {
/*
* in case something blows up...
* pull it off for completeness
*/
ica.PopCurrentTemplateName();
}
}