Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ParseModeListAttribute()

QilName System.Xml.Xsl.Xslt.XsltLoader.ParseModeListAttribute ( int attNum)
inlineprivate

Definition at line 1929 of file XsltLoader.cs.

1930 {
1931 if (!_input.MoveToXsltAttribute(attNum, "mode"))
1932 {
1933 return nullMode;
1934 }
1935 string value = _input.Value;
1936 if (value == "#all")
1937 {
1938 ReportNYI("xsl:template[@mode='#all']");
1939 return nullMode;
1940 }
1941 string[] array = XmlConvert.SplitString(value);
1942 List<QilName> list = new List<QilName>(array.Length);
1944 if (array.Length == 0)
1945 {
1947 }
1948 else
1949 {
1950 string[] array2 = array;
1951 foreach (string text in array2)
1952 {
1954 bool flag;
1955 switch (text)
1956 {
1957 case "#default":
1958 qilName = nullMode;
1959 goto IL_00e6;
1960 case "#current":
1961 ReportNYI("xsl:apply-templates[@mode='#current']");
1962 break;
1963 case "#all":
1965 break;
1966 default:
1967 {
1969 goto IL_00e6;
1970 }
1971 IL_00e6:
1972 flag = false;
1973 foreach (QilName item in list)
1974 {
1975 flag |= item.Equals(qilName);
1976 }
1977 if (flag)
1978 {
1980 }
1981 else
1982 {
1983 list.Add(qilName);
1984 }
1985 continue;
1986 }
1987 break;
1988 }
1989 }
1991 {
1992 list.Clear();
1993 list.Add(nullMode);
1994 }
1995 if (1 < list.Count)
1996 {
1997 ReportNYI("Multipe modes");
1998 return nullMode;
1999 }
2000 if (list.Count == 0)
2001 {
2002 return nullMode;
2003 }
2004 return list[0];
2005 }
static string Xslt_ModeListDup
Definition SR.cs:1948
static string Xslt_ModeListAll
Definition SR.cs:1950
static string Xslt_ModeListEmpty
Definition SR.cs:1946
Definition SR.cs:7
bool ExitForwardsCompatible(bool fwdCompat)
Definition Compiler.cs:315
bool MoveToXsltAttribute(int attNum, string attName)
Definition XsltInput.cs:681
void ReportError(string res, params string[] args)
QilName CreateXPathQName(string qname)

References System.Xml.Xsl.Xslt.XsltLoader._compiler, System.Xml.Xsl.Xslt.XsltLoader._input, System.array, System.Xml.Xsl.Xslt.XsltLoader.CreateXPathQName(), System.Xml.Dictionary, System.Xml.Xsl.Xslt.Compiler.EnterForwardsCompatible(), System.Xml.Xsl.Xslt.Compiler.ExitForwardsCompatible(), System.Xml.Xsl.Xslt.XsltInput.ForwardCompatibility, System.item, System.list, System.Xml.Xsl.Xslt.XsltInput.MoveToXsltAttribute(), System.Xml.Xsl.Xslt.XsltLoader.nullMode, System.Xml.Xsl.Xslt.XsltLoader.ReportError(), System.Xml.Xsl.Xslt.XsltLoader.ReportNYI(), System.Xml.XmlConvert.SplitString(), System.text, System.value, System.Xml.Xsl.Xslt.XsltInput.Value, System.SR.Xslt_ModeListAll, System.SR.Xslt_ModeListDup, and System.SR.Xslt_ModeListEmpty.

Referenced by System.Xml.Xsl.Xslt.XsltLoader.LoadTemplate().