Inheritance: CompiledAction
Exemple #1
0
        public virtual ValueOfAction CreateValueOfAction()
        {
            ValueOfAction action = new ValueOfAction();

            action.Compile(this);
            return(action);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public virtual ValueOfAction CreateValueOfAction()
 {
     ValueOfAction action = new ValueOfAction();
     action.Compile(this);
     return action;
 }