System.Xml.Xsl.XsltOld.Compiler.ResolvePrefixes C# (CSharp) Method

ResolvePrefixes() private method

private ResolvePrefixes ( string tokens ) : string[]
tokens string
return string[]
        private string[] ResolvePrefixes(string tokens)
        {
            if (tokens == null || tokens.Length == 0)
            {
                return null;
            }
            string[] nsList = XmlConvert.SplitString(tokens);

            try
            {
                for (int idx = 0; idx < nsList.Length; idx++)
                {
                    string prefix = nsList[idx];
                    nsList[idx] = _scopeManager.ResolveXmlNamespace(prefix == "#default" ? string.Empty : prefix);
                }
            }
            catch (XsltException)
            {
                // The only exception here might be SR.Xslt_InvalidPrefix
                if (!ForwardCompatibility)
                {
                    // Rethrow the exception if we're not in forwards-compatible mode
                    throw;
                }
                // Ignore the whole list in forwards-compatible mode
                return null;
            }
            return nsList;
        }