Example #1
0
        private IContainer DoIf(If tag, IContainer parent, XmlNode node, ValueStack.ValueStack stack)
        {
            bool value = stack.BooleanExpression(tag.Test);

            if (value)
                ProcessChildren(parent, node, stack);
            else
            {
                XmlNode ifNode = node.NextSibling;
                if (ifNode != null)
                {
                    Type t = TypeFromNode(ifNode);
                    if (t == typeof(Else))
                        ProcessChildren(parent, ifNode, stack);
                }
            }

            return parent;
        }
Example #2
0
 private void DoIf(If tag, ValueStack stack, System.Xml.XmlNode node, System.Xml.XmlWriter w)
 {
     bool value = stack.BooleanExpression(tag.Test);
     if (value)
     {
         ProcessChildren(stack, node, w);
     }
     else
     {
         System.Xml.XmlNode ifNode = node.NextSibling;
         if (ifNode != null)
         {
             Type t = GetType(ifNode);
             if (t == typeof(BitMobile.ValueStack.Else))
                 ProcessChildren(stack, ifNode, w);
         }
     }
 }