CompileAvt() private method

private CompileAvt ( string avtText ) : ArrayList
avtText string
return System.Collections.ArrayList
Ejemplo n.º 1
0
        internal static Avt CompileAvt(Compiler compiler, string avtText) {
            Debug.Assert(compiler != null);
            Debug.Assert(avtText != null);

            bool constant;
            ArrayList list = compiler.CompileAvt(avtText, out constant);
            return constant ? new Avt(avtText) : new Avt(list);
        }
Ejemplo n.º 2
0
        internal static Avt CompileAvt(Compiler compiler, string avtText)
        {
            Debug.Assert(compiler != null);
            Debug.Assert(avtText != null);

            bool      constant;
            ArrayList list = compiler.CompileAvt(avtText, out constant);

            return(constant ? new Avt(avtText) : new Avt(list));
        }
Ejemplo n.º 3
0
        private void CompileLiteralAttributesAndNamespaces(Compiler compiler)
        {
            NavigatorInput input = compiler.Input;

            if (input.Navigator.MoveToAttribute("use-attribute-sets", input.Atoms.UriXsl))
            {
                AddAction(compiler.CreateUseAttributeSetsAction());
                input.Navigator.MoveToParent();
            }
            compiler.InsertExcludedNamespace();

            if (input.MoveToFirstNamespace())
            {
                do
                {
                    string uri = input.Value;

                    if (uri == XmlReservedNs.NsXslt)
                    {
                        continue;
                    }
                    if (
                        compiler.IsExcludedNamespace(uri) ||
                        compiler.IsExtensionNamespace(uri) ||
                        compiler.IsNamespaceAlias(uri)
                        )
                    {
                        continue;
                    }
                    this.AddEvent(new NamespaceEvent(input));
                }while (input.MoveToNextNamespace());
                input.ToParent();
            }

            if (input.MoveToFirstAttribute())
            {
                do
                {
                    // Skip everything from Xslt namespace
                    if (Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl))
                    {
                        continue;
                    }

                    // Add attribute events
                    this.AddEvent(compiler.CreateBeginEvent());
                    this.AddEvents(compiler.CompileAvt(input.Value));
                    this.AddEvent(new EndEvent(XPathNodeType.Attribute));
                }while (input.MoveToNextAttribute());
                input.ToParent();
            }
        }
        void CompileLiteralAttributesAndNamespaces(Compiler compiler) {
            NavigatorInput input = compiler.Input;

            if (input.Navigator.MoveToAttribute("use-attribute-sets", input.Atoms.UriXsl)) {
                AddAction(compiler.CreateUseAttributeSetsAction());
                input.Navigator.MoveToParent();
            }
            compiler.InsertExcludedNamespace();

            if (input.MoveToFirstNamespace()) {
                do {
                    string uri = input.Value;

                    if (uri == XmlReservedNs.NsXslt) {
                        continue;
                    }
                    if (
                        compiler.IsExcludedNamespace(uri) ||
                        compiler.IsExtensionNamespace(uri) ||
                        compiler.IsNamespaceAlias(uri)
                    ) {
                            continue;
                    }
                    this.AddEvent(new NamespaceEvent(input));
                }
                while (input.MoveToNextNamespace());
                input.ToParent();
            }

            if (input.MoveToFirstAttribute()) {
                do {

                    // Skip everything from Xslt namespace
                    if (Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl)) {
                        continue;
                    }

                    // Add attribute events
                    this.AddEvent (compiler.CreateBeginEvent());
                    this.AddEvents(compiler.CompileAvt(input.Value));
                    this.AddEvent (new EndEvent(XPathNodeType.Attribute));
                }
                while (input.MoveToNextAttribute());
                input.ToParent();
            }
        }