Exemple #1
0
        internal override bool CompileAttribute(Compiler compiler)
        {
            string name  = compiler.Input.LocalName;
            string value = compiler.Input.Value;

            if (Keywords.Equals(name, compiler.Atoms.Select))
            {
                this.selectKey = compiler.AddQuery(value);
            }
            else if (Keywords.Equals(name, compiler.Atoms.Lang))
            {
                this.langAvt = Avt.CompileAvt(compiler, value);
            }
            else if (Keywords.Equals(name, compiler.Atoms.DataType))
            {
                this.dataTypeAvt = Avt.CompileAvt(compiler, value);
            }
            else if (Keywords.Equals(name, compiler.Atoms.Order))
            {
                this.orderAvt = Avt.CompileAvt(compiler, value);
            }
            else if (Keywords.Equals(name, compiler.Atoms.CaseOrder))
            {
                this.caseOrderAvt = Avt.CompileAvt(compiler, value);
            }
            else
            {
                return(false);
            }
            return(true);
        }
        internal override bool CompileAttribute(Compiler compiler)
        {
            string name  = compiler.Input.LocalName;
            string value = compiler.Input.Value;

            if (Keywords.Equals(name, compiler.Atoms.Name))
            {
                this.nameAvt = Avt.CompileAvt(compiler, value);
                Debug.WriteLine("name = \"" + value + "\"");
            }
            else if (Keywords.Equals(name, compiler.Atoms.Namespace))
            {
                this.nsAvt = Avt.CompileAvt(compiler, value);
                Debug.WriteLine("namespace = \"" + value + "\"");
            }
            else if (Keywords.Equals(name, compiler.Atoms.UseAttributeSets))
            {
                AddAction(compiler.CreateUseAttributeSetsAction());
            }
            else
            {
                return(false);
            }

            return(true);
        }
Exemple #3
0
        internal override bool CompileAttribute(Compiler compiler)
        {
            string name  = compiler.Input.LocalName;
            string value = compiler.Input.Value;

            if (Keywords.Equals(name, compiler.Atoms.Level))
            {
                if (value != s_any && value != s_multiple && value != s_single)
                {
                    throw XsltException.InvalidAttrValue(Keywords.s_Level, value);
                }
                this.level = value;
            }
            else if (Keywords.Equals(name, compiler.Atoms.Count))
            {
                this.countPattern = value;
                this.countKey     = compiler.AddPatternQuery(value, /*allowVars:*/ true, /*allowKey:*/ true);
            }
            else if (Keywords.Equals(name, compiler.Atoms.From))
            {
                this.from    = value;
                this.fromKey = compiler.AddPatternQuery(value, /*allowVars:*/ true, /*allowKey:*/ true);
            }
            else if (Keywords.Equals(name, compiler.Atoms.Value))
            {
                this.value    = value;
                this.valueKey = compiler.AddQuery(value);
            }
            else if (Keywords.Equals(name, compiler.Atoms.Format))
            {
                this.formatAvt = Avt.CompileAvt(compiler, value);
                Debug.WriteLine("name = \"" + value + "\"");
            }
            else if (Keywords.Equals(name, compiler.Atoms.Lang))
            {
                this.langAvt = Avt.CompileAvt(compiler, value);
                Debug.WriteLine("name = \"" + value + "\"");
            }
            else if (Keywords.Equals(name, compiler.Atoms.LetterValue))
            {
                this.letterAvt = Avt.CompileAvt(compiler, value);
                Debug.WriteLine("name = \"" + value + "\"");
            }
            else if (Keywords.Equals(name, compiler.Atoms.GroupingSeparator))
            {
                this.groupingSepAvt = Avt.CompileAvt(compiler, value);
                Debug.WriteLine("name = \"" + value + "\"");
            }
            else if (Keywords.Equals(name, compiler.Atoms.GroupingSize))
            {
                this.groupingSizeAvt = Avt.CompileAvt(compiler, value);
                Debug.WriteLine("name = \"" + value + "\"");
            }
            else
            {
                return(false);
            }
            return(true);
        }