System.Xml.Xsl.XsltOld.Compiler.AddQuery C# (CSharp) Method

AddQuery() private method

private AddQuery ( string xpathQuery ) : int
xpathQuery string
return int
        internal int AddQuery(string xpathQuery)
        {
            return AddQuery(xpathQuery, /*allowVars:*/true, /*allowKey*/true, false);
        }

Same methods

Compiler::AddQuery ( string xpathQuery, bool allowVar, bool allowKey, bool isPattern ) : int

Usage Example

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

            if (Ref.Equal(name, compiler.Atoms.Level))
            {
                if (value != "any" && value != "multiple" && value != "single")
                {
                    throw XsltException.Create(SR.Xslt_InvalidAttrValue, "level", value);
                }
                _level = value;
            }
            else if (Ref.Equal(name, compiler.Atoms.Count))
            {
                _countPattern = value;
                _countKey     = compiler.AddQuery(value, /*allowVars:*/ true, /*allowKey:*/ true, /*pattern*/ true);
            }
            else if (Ref.Equal(name, compiler.Atoms.From))
            {
                _from    = value;
                _fromKey = compiler.AddQuery(value, /*allowVars:*/ true, /*allowKey:*/ true, /*pattern*/ true);
            }
            else if (Ref.Equal(name, compiler.Atoms.Value))
            {
                _value    = value;
                _valueKey = compiler.AddQuery(value);
            }
            else if (Ref.Equal(name, compiler.Atoms.Format))
            {
                _formatAvt = Avt.CompileAvt(compiler, value);
            }
            else if (Ref.Equal(name, compiler.Atoms.Lang))
            {
                _langAvt = Avt.CompileAvt(compiler, value);
            }
            else if (Ref.Equal(name, compiler.Atoms.LetterValue))
            {
                _letterAvt = Avt.CompileAvt(compiler, value);
            }
            else if (Ref.Equal(name, compiler.Atoms.GroupingSeparator))
            {
                _groupingSepAvt = Avt.CompileAvt(compiler, value);
            }
            else if (Ref.Equal(name, compiler.Atoms.GroupingSize))
            {
                _groupingSizeAvt = Avt.CompileAvt(compiler, value);
            }
            else
            {
                return(false);
            }
            return(true);
        }
All Usage Examples Of System.Xml.Xsl.XsltOld.Compiler::AddQuery