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

◆ GetLiteralAttributes()

ContextInfo System.Xml.Xsl.Xslt.XsltInput.GetLiteralAttributes ( bool asStylesheet)
inline

Definition at line 874 of file XsltInput.cs.

875 {
876 int num = 0;
877 int attExPrefixes = 0;
878 int attExPrefixes2 = 0;
879 int xPathDefaultNamespace = 0;
880 int defaultCollation = 0;
881 int num2 = 0;
882 for (int i = 1; MoveToLiteralAttribute(i); i++)
883 {
884 if (IsXsltNamespace())
885 {
886 string localName = LocalName;
887 if (Ref.Equal(localName, _atoms.Version))
888 {
889 num = i;
890 }
891 else if (Ref.Equal(localName, _atoms.ExtensionElementPrefixes))
892 {
894 }
895 else if (Ref.Equal(localName, _atoms.ExcludeResultPrefixes))
896 {
898 }
899 else if (Ref.Equal(localName, _atoms.XPathDefaultNamespace))
900 {
902 }
903 else if (Ref.Equal(localName, _atoms.DefaultCollation))
904 {
906 }
907 else if (Ref.Equal(localName, _atoms.UseWhen))
908 {
909 num2 = i;
910 }
911 }
912 }
913 _attributesRead = true;
915 if (num != 0)
916 {
917 SetVersion(num);
918 }
919 else if (asStylesheet)
920 {
921 ReportError((Ref.Equal(NamespaceUri, _atoms.UriWdXsl) && Ref.Equal(LocalName, _atoms.Stylesheet)) ? System.SR.Xslt_WdXslNamespace : System.SR.Xslt_WrongStylesheetElement);
922 SetVersion(1.0);
923 }
925 if (!IsExtensionNamespace(_records[0].nsUri))
926 {
927 if (_compiler.Version == 2)
928 {
931 if (num2 != 0)
932 {
934 }
935 }
937 }
938 return _ctxInfo;
939 }
static string Xslt_WdXslNamespace
Definition SR.cs:1868
Definition SR.cs:7
void SetVersion(int attVersion)
Definition XsltInput.cs:731
readonly KeywordsTable _atoms
Definition XsltInput.cs:148
void InsertExNamespaces(int attExPrefixes, ContextInfo ctxInfo, bool extensions)
Definition XsltInput.cs:957
void SetDefaultCollation(int attCollation)
void ReportError(string res, params string[] args)
void SetXPathDefaultNamespace(int attNamespace)
readonly Compiler _compiler
Definition XsltInput.cs:150
bool MoveToLiteralAttribute(int attNum)
Definition XsltInput.cs:670
bool IsExtensionNamespace(string uri)
Definition XsltInput.cs:726

References System.Xml.Xsl.Xslt.XsltInput._atoms, System.Xml.Xsl.Xslt.XsltInput._attributesRead, System.Xml.Xsl.Xslt.XsltInput._compiler, System.Xml.Xsl.Xslt.XsltInput._ctxInfo, System.Xml.Xsl.Xslt.XsltInput._records, System.Xml.Xsl.Xslt.KeywordsTable.DefaultCollation, System.Xml.Ref.Equal(), System.Xml.Xsl.Xslt.KeywordsTable.ExcludeResultPrefixes, System.Xml.Xsl.Xslt.KeywordsTable.ExtensionElementPrefixes, System.Xml.Xsl.Xslt.XsltInput.InsertExNamespaces(), System.Xml.Xsl.Xslt.XsltInput.IsExtensionNamespace(), System.Xml.Xsl.Xslt.XsltInput.IsXsltNamespace(), System.Xml.Xsl.Xslt.XsltInput.LocalName, System.Xml.Xsl.Xslt.XsltInput.MoveToElement(), System.Xml.Xsl.Xslt.XsltInput.MoveToLiteralAttribute(), System.Xml.Xsl.Xslt.XsltInput.NamespaceUri, System.Xml.Xsl.Xslt.XsltInput.ReportError(), System.Xml.Xsl.Xslt.XsltInput.ReportNYI(), System.Xml.Xsl.Xslt.XsltInput.SetDefaultCollation(), System.Xml.Xsl.Xslt.XsltInput.SetVersion(), System.Xml.Xsl.Xslt.XsltInput.SetXPathDefaultNamespace(), System.Xml.Xsl.Xslt.KeywordsTable.Stylesheet, System.Xml.Xsl.Xslt.KeywordsTable.UriWdXsl, System.Xml.Xsl.Xslt.KeywordsTable.UseWhen, System.Xml.Xsl.Xslt.Compiler.Version, System.Xml.Xsl.Xslt.KeywordsTable.Version, System.Xml.Xsl.Xslt.KeywordsTable.XPathDefaultNamespace, System.SR.Xslt_WdXslNamespace, and System.SR.Xslt_WrongStylesheetElement.

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