System.Xml.Xsl.XsltOld.OutputScopeManager.PushScope C# (CSharp) Method

PushScope() private method

private PushScope ( string name, string nspace, string prefix ) : void
name string
nspace string
prefix string
return void
        internal void PushScope(string name, string nspace, string prefix) {
            Debug.Assert(name != null);
            Debug.Assert(nspace != null);
            Debug.Assert(prefix != null);
            OutputScope parentScope  = CurrentElementScope;
            OutputScope elementScope = (OutputScope) this.elementScopesStack.Push();

            if (elementScope == null) {
                elementScope = new OutputScope();
                this.elementScopesStack.AddToTop(elementScope);
            }

            Debug.Assert(elementScope != null);
            elementScope.Init(name, nspace, prefix, parentScope.Space, parentScope.Lang, parentScope.Mixed);
        }

Usage Example

Ejemplo n.º 1
0
        private void BeginElement(string prefix, string name, string nspace, bool empty)
        {
            Debug.Assert(_attributeCount == 0);

            _currentInfo !.NodeType   = XmlNodeType.Element;
            _currentInfo.Prefix       = prefix;
            _currentInfo.LocalName    = name;
            _currentInfo.NamespaceURI = nspace;
            _currentInfo.Depth        = _recordDepth;
            _currentInfo.IsEmptyTag   = empty;

            _scopeManager.PushScope(name, nspace, prefix);
        }