Example #1
0
        internal void PushInputDocument(NavigatorInput newInput, string inputUri) {
            Debug.Assert(newInput != null);
            Debug.WriteLine("Pushing document \"" + inputUri + "\"");

            AddDocumentURI(inputUri);

            newInput.Next     = this.input;
            this.input        = newInput;
            this.atoms        = this.input.Atoms;
            this.scopeManager = this.input.InputScopeManager;
        }
Example #2
0
        internal void PopInputDocument() {
            Debug.Assert(this.input != null);
            Debug.Assert(this.input.Atoms == this.atoms);

            NavigatorInput lastInput = this.input;

            this.input     = lastInput.Next;
            lastInput.Next = null;

            if (this.input != null) {
                this.atoms        = this.input.Atoms;
                this.scopeManager = this.input.InputScopeManager;
            }
            else {
                this.atoms        = null;
                this.scopeManager = null;
            }

            RemoveDocumentURI(lastInput.Href);
            lastInput.Close();
        }
Example #3
0
        //
        // Constructor
        //
        internal NavigatorInput(XPathNavigator navigator, string baseUri, InputScope rootScope) {
            if (navigator == null) {
                throw new ArgumentNullException("navigator");
            }
            if (baseUri == null) {
                throw new ArgumentNullException("baseUri");
            }
            Debug.Assert(navigator.NameTable != null);
            _Next  = null;
            _Href  = baseUri;
            _Atoms = new Keywords(navigator.NameTable);
            _Atoms.LookupKeywords();
            _Navigator = navigator;
            _Manager   = new InputScopeManager(_Navigator, rootScope);
            _PositionInfo = PositionInfo.GetPositionInfo(_Navigator);

            /*BeginReading:*/
            AssertInput();
            if (NodeType == XPathNodeType.Root) {
                _Navigator.MoveToFirstChild();
            }
        }