internal Action?BuiltInTemplate(XPathNavigator node)
{
Debug.Assert(node != null);
Action?action = null;
switch (node.NodeType)
{
// <xsl:template match="*|/" [mode="?"]>
// <xsl:apply-templates [mode="?"]/>
// </xsl:template>
case XPathNodeType.Element:
case XPathNodeType.Root:
action = ApplyTemplatesAction.BuiltInRule(this.mode);
break;
// <xsl:template match="text()|@*">
// <xsl:value-of select="."/>
// </xsl:template>
case XPathNodeType.Attribute:
case XPathNodeType.Whitespace:
case XPathNodeType.SignificantWhitespace:
case XPathNodeType.Text:
action = ValueOfAction.BuiltInRule();
break;
// <xsl:template match="processing-instruction()|comment()"/>
case XPathNodeType.ProcessingInstruction:
case XPathNodeType.Comment:
// Empty action;
break;
case XPathNodeType.All:
// Ignore the rest
break;
}
return(action);
}