public override object Invoke(XsltContext xsltContext, object[] args, XPathNavigator docContext) { XsltCompileContext xsltCompileContext = (XsltCompileContext)xsltContext; string local, prefix; PrefixQName.ParseQualifiedName(ToString(args[0]), out prefix, out local); string? ns = xsltContext.LookupNamespace(prefix); XmlQualifiedName keyName = new XmlQualifiedName(local, ns); XPathNavigator root = docContext.Clone(); root.MoveToRoot(); ArrayList?resultCollection = null; foreach (Key key in xsltCompileContext._processor !.KeyList !) { if (key.Name == keyName) { Hashtable?keyTable = key.GetKeys(root); if (keyTable == null) { keyTable = xsltCompileContext.BuildKeyTable(key, root); key.AddKey(root, keyTable); } XPathNodeIterator?it = args[1] as XPathNodeIterator; if (it != null) { it = it.Clone(); while (it.MoveNext()) { resultCollection = AddToList(resultCollection, (ArrayList?)keyTable[it.Current !.Value]);
private XsltCompileContext GetMatchesContext() { if (this.matchesContext == null) { this.matchesContext = new XsltCompileContext(); } return(this.matchesContext); }
private XsltCompileContext GetValueOfContext() { if (this.valueOfContext == null) { this.valueOfContext = new XsltCompileContext(); } return(this.valueOfContext); }
internal Query GetValueQuery(int key, XsltCompileContext context) { Debug.Assert(key != Compiler.InvalidQueryKey); TheQuery theQuery = this.queryStore[key]; theQuery.CompiledQuery.CheckErrors(); Query expr = this.queryList[key]; if (context == null) { context = new XsltCompileContext(theQuery._ScopeManager, this); } else { context.Reinitialize(theQuery._ScopeManager, this); } expr.SetXsltContext(context); return(expr); }
private XsltCompileContext GetMatchesContext() { if (this.matchesContext == null) { this.matchesContext = new XsltCompileContext(); } return this.matchesContext; }
private XsltCompileContext GetValueOfContext() { if (this.valueOfContext == null) { this.valueOfContext = new XsltCompileContext(); } return this.valueOfContext; }
internal Query GetValueQuery(int key, XsltCompileContext context) { Debug.Assert(key != Compiler.InvalidQueryKey); TheQuery theQuery = this.queryStore[key]; theQuery.CompiledQuery.CheckErrors(); Query expr = this.queryList[key]; if (context == null) { context = new XsltCompileContext(theQuery._ScopeManager, this); } else { context.Reinitialize(theQuery._ScopeManager, this); } expr.SetXsltContext(context); return expr; }
private XsltCompileContext GetMatchesContext() { if (_matchesContext == null) { _matchesContext = new XsltCompileContext(); } return _matchesContext; }
private XsltCompileContext GetValueOfContext() { if (_valueOfContext == null) { _valueOfContext = new XsltCompileContext(); } return _valueOfContext; }