System.Xml.Xsl.XsltOld.OutputScopeManager.ResolveNamespace C# (CSharp) 메소드

ResolveNamespace() 개인적인 메소드

private ResolveNamespace ( string prefix ) : string
prefix string
리턴 string
        internal string ResolveNamespace(string prefix) {
            bool thisScope;
            return ResolveNamespace(prefix, out thisScope);
        }

Same methods

OutputScopeManager::ResolveNamespace ( string prefix, bool &thisScope ) : string

Usage Example

예제 #1
0
        private void BeginNamespace(string name, string nspace)
        {
            bool thisScope = false;

            if (Ref.Equal(name, _atoms.Empty))
            {
                if (Ref.Equal(nspace, _scopeManager.DefaultNamespace))
                {
                    // Main Node is OK
                }
                else if (Ref.Equal(_mainNode.NamespaceURI, _atoms.Empty))
                {
                    // http://www.w3.org/1999/11/REC-xslt-19991116-errata/ E25
                    // Should throw an error but ingnoring it in Everett.
                    // Would be a breaking change
                }
                else
                {
                    DeclareNamespace(nspace, name);
                }
            }
            else
            {
                string?nspaceDeclared = _scopeManager.ResolveNamespace(name, out thisScope);
                if (nspaceDeclared != null)
                {
                    if (!Ref.Equal(nspace, nspaceDeclared))
                    {
                        if (!thisScope)
                        {
                            DeclareNamespace(nspace, name);
                        }
                    }
                }
                else
                {
                    DeclareNamespace(nspace, name);
                }
            }
            _currentInfo          = _dummy;
            _currentInfo.NodeType = XmlNodeType.Attribute;
        }