System.Xml.Schema.Asttree.SetURN C# (CSharp) Method

SetURN() private method

private SetURN ( Axis axis, XmlNamespaceManager nsmgr ) : void
axis Axis
nsmgr XmlNamespaceManager
return void
        private void SetURN (Axis axis, XmlNamespaceManager nsmgr) {
            if (axis.Prefix.Length != 0) {      // (1) (4)
                axis.Urn = nsmgr.LookupNamespace(axis.Prefix);

                if (axis.Urn == null) {
                    throw new XmlSchemaException(Res.Sch_UnresolvedPrefix, axis.Prefix);
                }
            } else if (axis.Name.Length != 0) { // (2)
                axis.Urn = null;
            } else {                            // (3)
                axis.Urn = "";
            }
        }
    }// Asttree