Example #1
0
        internal static Avt CompileAvt(Compiler compiler, string avtText) {
            Debug.Assert(compiler != null);
            Debug.Assert(avtText != null);
            new ArrayList();

            bool constant;
            ArrayList list = compiler.CompileAvt(avtText, out constant);
            return constant ? new Avt(avtText) : new Avt(list);
        }
Example #2
0
File: avt.cs Project: ydunk/masters
        internal static Avt CompileAvt(Compiler compiler, string avtText)
        {
            Debug.Assert(compiler != null);
            Debug.Assert(avtText != null);
            new ArrayList();

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

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

            if (input.Navigator.MoveToAttribute(Keywords.s_UseAttributeSets, input.Atoms.XsltNamespace))
            {
                AddAction(compiler.CreateUseAttributeSetsAction());
                input.Navigator.MoveToParent();
            }
            compiler.InsertExcludedNamespace();

            if (input.MoveToFirstAttribute())
            {
                do
                {
                    // Skip everything from Xslt namespace
                    if (Keywords.Equals(input.NamespaceURI, input.Atoms.XsltNamespace))
                    {
                        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();
            }

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

                    if (Keywords.Compare(uri, input.Atoms.XsltNamespace))
                    {
                        continue;
                    }
                    if (
                        compiler.IsExcludedNamespace(uri) ||
                        compiler.IsExtensionNamespace(uri) ||
                        compiler.IsNamespaceAlias(uri)
                        )
                    {
                        continue;
                    }
                    this.AddEvent(new NamespaceEvent(input));
                }while (input.MoveToNextNamespace());
                input.ToParent();
            }
        }
Example #4
0
        void CompileLiteralAttributesAndNamespaces(Compiler compiler) {
            NavigatorInput input = compiler.Input;

            if (input.Navigator.MoveToAttribute(Keywords.s_UseAttributeSets, input.Atoms.XsltNamespace)) {
                AddAction(compiler.CreateUseAttributeSetsAction());
                input.Navigator.MoveToParent();
            }
            compiler.InsertExcludedNamespace();

            if (input.MoveToFirstAttribute()) {
                do {

                    // Skip everything from Xslt namespace
                    if (Keywords.Equals(input.NamespaceURI, input.Atoms.XsltNamespace)) {
                        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();
            }

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

                    if (Keywords.Compare(uri, input.Atoms.XsltNamespace)) {
                        continue;
                    }
                    if ( 
                        compiler.IsExcludedNamespace(uri) ||
                        compiler.IsExtensionNamespace(uri) ||
                        compiler.IsNamespaceAlias(uri)
                    ) {
                            continue;
                    }
                    this.AddEvent(new NamespaceEvent(input));
                }
                while (input.MoveToNextNamespace());
                input.ToParent();
            }
        }