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

InsertKey() private method

private InsertKey ( XmlQualifiedName name, int MatchKey, int UseKey ) : void
name XmlQualifiedName
MatchKey int
UseKey int
return void
        internal void InsertKey(XmlQualifiedName name, int MatchKey, int UseKey)
        {
            _rootAction.InsertKey(name, MatchKey, UseKey);
        }

Usage Example

Ejemplo n.º 1
0
        internal void CompileKey(Compiler compiler)
        {
            NavigatorInput input    = compiler.Input;
            string         element  = input.LocalName;
            int            MatchKey = Compiler.InvalidQueryKey;
            int            UseKey   = Compiler.InvalidQueryKey;

            XmlQualifiedName Name = null;

            if (input.MoveToFirstAttribute())
            {
                do
                {
                    string nspace = input.NamespaceURI;
                    string name   = input.LocalName;
                    string value  = input.Value;

                    if (nspace.Length != 0)
                    {
                        continue;
                    }

                    if (Ref.Equal(name, input.Atoms.Name))
                    {
                        Name = compiler.CreateXPathQName(value);
                    }
                    else if (Ref.Equal(name, input.Atoms.Match))
                    {
                        MatchKey = compiler.AddQuery(value, /*allowVars:*/ false, /*allowKey*/ false, /*pattern*/ true);
                    }
                    else if (Ref.Equal(name, input.Atoms.Use))
                    {
                        UseKey = compiler.AddQuery(value, /*allowVars:*/ false, /*allowKey*/ false, /*pattern*/ false);
                    }
                    else
                    {
                        if (!compiler.ForwardCompatibility)
                        {
                            throw XsltException.Create(SR.Xslt_InvalidAttribute, name, element);
                        }
                    }
                }while (input.MoveToNextAttribute());
                input.ToParent();
            }

            CheckRequiredAttribute(compiler, MatchKey != Compiler.InvalidQueryKey, "match");
            CheckRequiredAttribute(compiler, UseKey != Compiler.InvalidQueryKey, "use");
            CheckRequiredAttribute(compiler, Name != null, "name");
            // It is a breaking change to check for emptiness, SQLBUDT 324364
            //CheckEmpty(compiler);

            compiler.InsertKey(Name, MatchKey, UseKey);
        }
All Usage Examples Of System.Xml.Xsl.XsltOld.Compiler::InsertKey