System.Xml.Xsl.XsltOld.BeginEvent.ReplaceNamespaceAlias C# (CSharp) Method

ReplaceNamespaceAlias() public method

public ReplaceNamespaceAlias ( Compiler compiler ) : void
compiler Compiler
return void
        public override void ReplaceNamespaceAlias(Compiler compiler){
#if DEBUG
            Debug.Assert(! replaceNSAliasesDone, "Second attempt to replace NS aliases!. This bad.");
            replaceNSAliasesDone = true;
#endif
            if (this.nodeType == XPathNodeType.Attribute && this.namespaceUri.Length == 0) {
                return ; // '#default' aren't apply to attributes.
            }
            NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri);
            if (ResultURIInfo != null) {
                this.namespaceUri = ResultURIInfo.nameSpace;
                if (ResultURIInfo.prefix != null) {
                    this.prefix = ResultURIInfo.prefix; 
                }
            }
        }