private void CompileLiteral(Compiler compiler)
{
NavigatorInput input = compiler.Input;
switch (input.NodeType)
{
case XPathNodeType.Element:
this.AddEvent(compiler.CreateBeginEvent());
CompileLiteralAttributesAndNamespaces(compiler);
if (compiler.Recurse())
{
CompileTemplate(compiler);
compiler.ToParent();
}
this.AddEvent(new EndEvent(XPathNodeType.Element));
break;
case XPathNodeType.Text:
case XPathNodeType.SignificantWhitespace:
this.AddEvent(compiler.CreateTextEvent());
break;
case XPathNodeType.Whitespace:
case XPathNodeType.ProcessingInstruction:
case XPathNodeType.Comment:
break;
default:
Debug.Fail("Unexpected node type.");
break;
}
}