internal void Init(InputScope parent) { this.scopes = null; this.parent = parent; if (this.parent != null) { this.forwardCompatibility = this.parent.forwardCompatibility; this.canHaveApplyImports = this.parent.canHaveApplyImports; } }
internal void Init(InputScope parent) { this.scopes = null; _parent = parent; if (_parent != null) { _forwardCompatibility = _parent._forwardCompatibility; _canHaveApplyImports = _parent._canHaveApplyImports; } }
internal void PopScope() { Debug.Assert(this.scopeStack != null, "Push/Pop disbalance"); if (this.scopeStack == null) { return; } for (NamespaceDecl scope = this.scopeStack.Scopes; scope != null; scope = scope.Next) { this.defaultNS = scope.PrevDefaultNsUri; } this.scopeStack = this.scopeStack.Parent; }
// // The World of Compile // internal void Compile(NavigatorInput input, XmlResolver xmlResolver) { Debug.Assert(input != null); Debug.Assert(xmlResolver != null); // Debug.Assert(evidence != null); -- default evidence is null now Debug.Assert(_input == null && _atoms == null); _xmlResolver = xmlResolver; PushInputDocument(input); _rootScope = _scopeManager.PushScope(); _queryStore = new List<TheQuery>(); try { this.rootStylesheet = new Stylesheet(); PushStylesheet(this.rootStylesheet); Debug.Assert(_input != null && _atoms != null); try { this.CreateRootAction(); } catch (XsltCompileException) { throw; } catch (Exception e) { throw new XsltCompileException(e, this.Input.BaseURI, this.Input.LineNumber, this.Input.LinePosition); } this.stylesheet.ProcessTemplates(); _rootAction.PorcessAttributeSets(this.rootStylesheet); this.stylesheet.SortWhiteSpace(); if (_globalNamespaceAliasTable != null) { this.stylesheet.ReplaceNamespaceAlias(this); _rootAction.ReplaceNamespaceAlias(this); } } finally { PopInputDocument(); } Debug.Assert(_rootAction != null); Debug.Assert(this.stylesheet != null); Debug.Assert(_queryStore != null); Debug.Assert(_input == null && _atoms == null); }
// // Constructor // internal NavigatorInput(XPathNavigator navigator, string baseUri, InputScope rootScope) { if (navigator == null) { throw new ArgumentNullException(nameof(navigator)); } if (baseUri == null) { throw new ArgumentNullException(nameof(baseUri)); } Debug.Assert(navigator.NameTable != null); _Next = null; _Href = baseUri; _Atoms = new KeywordsTable(navigator.NameTable); _Navigator = navigator; _Manager = new InputScopeManager(_Navigator, rootScope); _PositionInfo = PositionInfo.GetPositionInfo(_Navigator); /*BeginReading:*/ AssertInput(); if (NodeType == XPathNodeType.Root) { _Navigator.MoveToFirstChild(); } }
internal InputScope PushScope() { this.scopeStack = new InputScope(this.scopeStack); return this.scopeStack; }
private XPathNavigator navigator; // We need this nsvigator for document() function implementation public InputScopeManager(XPathNavigator navigator, InputScope rootScope) { this.navigator = navigator; this.scopeStack = rootScope; }
internal InputScope PushScope() { _scopeStack = new InputScope(_scopeStack); return _scopeStack; }
private XPathNavigator _navigator; // We need this nsvigator for document() function implementation public InputScopeManager(XPathNavigator navigator, InputScope rootScope) { _navigator = navigator; _scopeStack = rootScope; }
// // The World of Compile // internal void Compile(NavigatorInput input, XmlResolver xmlResolver, Evidence evidence) { #if DISABLE_CAS_USE evidence = null; #endif Debug.Assert(input != null); Debug.Assert(xmlResolver != null); // Debug.Assert(evidence != null); -- default evidence is null now Debug.Assert(this.input == null && this.atoms == null); this.xmlResolver = xmlResolver; PushInputDocument(input); this.rootScope = this.scopeManager.PushScope(); this.queryStore = new List<TheQuery>(); try { this.rootStylesheet = new Stylesheet(); PushStylesheet(this.rootStylesheet); Debug.Assert(this.input != null && this.atoms != null); try { this.CreateRootAction(); } catch (XsltCompileException) { throw; } catch (Exception e) { throw new XsltCompileException(e, this.Input.BaseURI, this.Input.LineNumber, this.Input.LinePosition); } this.stylesheet.ProcessTemplates(); this.rootAction.PorcessAttributeSets(this.rootStylesheet); this.stylesheet.SortWhiteSpace(); #if !DISABLE_XSLT_SCRIPT CompileScript(evidence); #endif if (evidence != null) { this.rootAction.permissions = SecurityManager.GetStandardSandbox(evidence); } if (this.globalNamespaceAliasTable != null) { this.stylesheet.ReplaceNamespaceAlias(this); this.rootAction.ReplaceNamespaceAlias(this); } } finally { PopInputDocument(); } Debug.Assert(this.rootAction != null); Debug.Assert(this.stylesheet != null); Debug.Assert(this.queryStore != null); Debug.Assert(this.input == null && this.atoms == null); }
internal InputScope(InputScope parent) { Init(parent); }
internal InputScope PushScope() { _scopeStack = new InputScope(_scopeStack); return(_scopeStack); }
internal InputScope PushScope() { this.scopeStack = new InputScope(this.scopeStack); return(this.scopeStack); }