System.Xml.Xsl.XsltOld.XsltCompileContext.SystemProperty C# (CSharp) Method

SystemProperty() private method

private SystemProperty ( string qname ) : String
qname string
return String
        private String SystemProperty(string qname) {
            String result = string.Empty;

            string prefix;
            string local;
            PrefixQName.ParseQualifiedName(qname, out prefix, out local);

            // verify the prefix corresponds to the Xslt namespace
            string urn = LookupNamespace(prefix);

            if(urn == Keywords.s_XsltNamespace) {
                if(local == "version") {
                    result = "1";
                } else if(local == "vendor") {
                    result = "Microsoft";
                } else if(local == "vendor-url") {
                    result = "http://www.microsoft.com";
                }
            } else {
                if(urn == null && prefix != null) {
                // if prefix exist it has to be mapped to namespace.
                // Can it be "" here ?
                    throw XsltException.Create(Res.Xslt_InvalidPrefix, prefix);
                }
                return string.Empty;
            }

            return result;
        }