示例#1
0
        protected void CompileSortElements(Compiler compiler)
        {
            NavigatorInput input = compiler.Input;

            do
            {
                switch (input.NodeType)
                {
                case XPathNodeType.Element:
                    if (Keywords.Equals(input.NamespaceURI, input.Atoms.XsltNamespace) &&
                        Keywords.Equals(input.LocalName, input.Atoms.Sort))
                    {
                        if (sortContainer == null)
                        {
                            sortContainer = new ContainerAction();
                        }
                        sortContainer.AddAction(compiler.CreateSortAction());
                        continue;
                    }
                    return;

                case XPathNodeType.Text:
                    return;

                case XPathNodeType.SignificantWhitespace:
                    this.AddEvent(compiler.CreateTextEvent());
                    continue;

                default:
                    continue;
                }
            }while (input.Advance());
        }
示例#2
0
 private void CheckAttributeSets_RecurceInContainer(Hashtable markTable, ContainerAction container)
 {
     if (container.containedActions == null)
     {
         return;
     }
     foreach (Action action in container.containedActions)
     {
         if (action is UseAttributeSetsAction)
         {
             CheckAttributeSets_RecurceInList(markTable, ((UseAttributeSetsAction)action).UsedSets);
         }
         else if (action is ContainerAction)
         {
             CheckAttributeSets_RecurceInContainer(markTable, (ContainerAction)action);
         }
     }
 }
示例#3
0
 protected void CompileSortElements(Compiler compiler) {
     NavigatorInput input = compiler.Input;            
     do {
         switch(input.NodeType) {
         case XPathNodeType.Element:
             if (Keywords.Equals(input.NamespaceURI, input.Atoms.XsltNamespace) &&
                 Keywords.Equals(input.LocalName, input.Atoms.Sort)) {
                 if (sortContainer == null) {
                     sortContainer = new ContainerAction();
                     sort = true;
                 }
                 sortContainer.AddAction(compiler.CreateSortAction());
                 continue;
             }
             return;
         case XPathNodeType.Text:
             return;
         case XPathNodeType.SignificantWhitespace:
             this.AddEvent(compiler.CreateTextEvent());
             continue;
         default :
             continue;
         }
     }
     while (input.Advance());
 }
示例#4
0
 private void CheckAttributeSets_RecurceInContainer(Hashtable markTable, ContainerAction container) {
     if (container.containedActions == null) {
         return;
     }
     foreach(Action action in container.containedActions) {
         if(action is UseAttributeSetsAction) {
             CheckAttributeSets_RecurceInList(markTable, ((UseAttributeSetsAction)action).UsedSets);
         }
         else if(action is ContainerAction) {
             CheckAttributeSets_RecurceInContainer(markTable, (ContainerAction)action);
         }
     }
 }