internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
switch(frame.State) {
case Initialized :
processor.ResetParams();
if (this.containedActions != null && this.containedActions.Count > 0) {
processor.PushActionFrame(frame);
frame.State = ProcessedChildren;
break;
}
goto case ProcessedChildren;
case ProcessedChildren:
TemplateAction action = processor.Stylesheet.FindTemplate(this.name);
if (action != null) {
frame.State = ProcessedTemplate;
processor.PushActionFrame(action, frame.NodeSet);
break;
}
else {
throw XsltException.Create(Res.Xslt_InvalidCallTemplate, this.name.ToString());
}
case ProcessedTemplate:
frame.Finished();
break;
default:
Debug.Fail("Invalid CallTemplateAction execution state");
break;
}
}
}