コード例 #1
0
            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));
            }
コード例 #2
0
ファイル: processor.cs プロジェクト: ydunk/masters
        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);
        }
コード例 #3
0
ファイル: processor.cs プロジェクト: ArildF/masters
 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;
 }