public override object Invoke(XsltContext xsltContext, object[] args, XPathNavigator docContext)
            {
                XsltCompileContext xsltCompileContext = (XsltCompileContext)xsltContext;
                ArrayList          ResultList = new ArrayList();
                string             local, prefix;

                PrefixQName.ParseQualifiedName(ToString(args[0]), out prefix, out local);
                string            ns = xsltContext.LookupNamespace(prefix);
                XmlQualifiedName  qname = new XmlQualifiedName(local, ns);
                XPathNodeIterator it = args[1] as XPathNodeIterator;

                if (it != null)
                {
                    while (it.MoveNext())
                    {
                        xsltCompileContext.FindKeyMatch(qname, it.Current.Value, ResultList, docContext);
                    }
                }
                else
                {
                    xsltCompileContext.FindKeyMatch(qname, ToString(args[1]), ResultList, docContext);
                }

                return(new XPathArrayIterator(ResultList));
            }
Ejemplo n.º 2
0
        internal XPathExpression GetValueQuery(int key)
        {
            Debug.Assert(key != Compiler.InvalidQueryKey);
            Debug.Assert(this.queryStore[key] is TheQuery);
            TheQuery           theQuery = (TheQuery)this.queryStore[key];
            XPathExpression    expr     = this.queryList[key];
            XsltCompileContext context  = new XsltCompileContext(theQuery._ScopeManager, this);

            expr.SetContext(context);
            return(expr);
        }
Ejemplo n.º 3
0
 internal XPathExpression GetValueQuery(int key) {
     Debug.Assert(key != Compiler.InvalidQueryKey);
     Debug.Assert(this.queryStore[key] is TheQuery);
     TheQuery theQuery = (TheQuery)this.queryStore[key];
     XPathExpression expr =  this.queryList[key];
     XsltCompileContext context = new XsltCompileContext(theQuery._ScopeManager, this);
     expr.SetContext(context);
     return expr;
 }