Example #1
0
 static ValueOfAction()
 {
     s_BuiltInRule = new ValueOfAction(); {
         s_BuiltInRule.select    = Compiler.SelfQuery;
         s_BuiltInRule.selectKey = Compiler.SelfQueryKey;
     }
 }
Example #2
0
        public virtual ValueOfAction CreateValueOfAction()
        {
            ValueOfAction action = new ValueOfAction();

            action.Compile(this);
            return(action);
        }
Example #3
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:
                Debug.WriteLine("->->->->-> Picking built-in rule for element (mode == \"" + this.mode + "\") <-<-<-<-<-");
                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:
                Debug.WriteLine("->->->->-> Picking built-in rule for text or attribute <-<-<-<-<-");
                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);
        }
Example #4
0
 public virtual ValueOfAction CreateValueOfAction() {
     ValueOfAction action = new ValueOfAction();
     action.Compile(this);
     return action;
 }
Example #5
0
 static ValueOfAction() {
     s_BuiltInRule = new ValueOfAction(); {
         s_BuiltInRule.select    = Compiler.SelfQuery;
         s_BuiltInRule.selectKey = Compiler.SelfQueryKey;
     }
 }