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

◆ LoadOutput()

void System.Xml.Xsl.Xslt.XsltLoader.LoadOutput ( )
inlineprivate

Definition at line 684 of file XsltLoader.cs.

685 {
688 XmlWriterSettings settings = output.Settings;
691 if (qilName != null)
692 {
693 ReportNYI("xsl:output/@name");
694 }
695 if (_input.MoveToXsltAttribute(1, "method") && output.MethodPrec <= currentPrecedence)
696 {
698 XmlOutputMethod method;
701 {
702 if (currentPrecedence == output.MethodPrec && !output.Method.Equals(xmlQualifiedName))
703 {
705 }
709 }
710 }
711 TriState triState = ParseYesNoAttribute(2, "byte-order-mark");
712 if (triState != TriState.Unknown)
713 {
714 ReportNYI("xsl:output/@byte-order-mark");
715 }
716 if (_input.MoveToXsltAttribute(3, "cdata-section-elements"))
717 {
719 string[] array = XmlConvert.SplitString(_input.Value);
721 for (int i = 0; i < array.Length; i++)
722 {
724 }
726 {
727 settings.CDataSectionElements.AddRange(list);
728 }
729 }
730 if (_input.MoveToXsltAttribute(4, "doctype-public") && output.DocTypePublicPrec <= currentPrecedence)
731 {
732 if (currentPrecedence == output.DocTypePublicPrec && settings.DocTypePublic != _input.Value)
733 {
735 }
738 }
739 if (_input.MoveToXsltAttribute(5, "doctype-system") && output.DocTypeSystemPrec <= currentPrecedence)
740 {
741 if (currentPrecedence == output.DocTypeSystemPrec && settings.DocTypeSystem != _input.Value)
742 {
744 }
747 }
748 if (_input.MoveToXsltAttribute(6, "encoding") && output.EncodingPrec <= currentPrecedence)
749 {
750 try
751 {
753 if (currentPrecedence == output.EncodingPrec && output.Encoding != _input.Value)
754 {
756 }
757 settings.Encoding = encoding;
760 }
761 catch (ArgumentException)
762 {
764 {
766 }
767 }
768 }
769 if (ParseYesNoAttribute(7, "escape-uri-attributes") == TriState.False)
770 {
771 ReportNYI("xsl:output/@escape-uri-attributes == flase()");
772 }
773 if (ParseYesNoAttribute(8, "include-content-type") == TriState.False)
774 {
775 ReportNYI("xsl:output/@include-content-type == flase()");
776 }
777 TriState triState2 = ParseYesNoAttribute(9, "indent");
778 if (triState2 != TriState.Unknown && output.IndentPrec <= currentPrecedence)
779 {
780 bool flag = triState2 == TriState.True;
781 if (currentPrecedence == output.IndentPrec && settings.Indent != flag)
782 {
784 }
785 settings.Indent = flag;
787 }
788 if (_input.MoveToXsltAttribute(10, "media-type") && output.MediaTypePrec <= currentPrecedence)
789 {
790 if (currentPrecedence == output.MediaTypePrec && settings.MediaType != _input.Value)
791 {
793 }
796 }
797 if (_input.MoveToXsltAttribute(11, "normalization-form"))
798 {
799 ReportNYI("xsl:output/@normalization-form");
800 }
801 triState2 = ParseYesNoAttribute(12, "omit-xml-declaration");
802 if (triState2 != TriState.Unknown && output.OmitXmlDeclarationPrec <= currentPrecedence)
803 {
804 bool flag2 = triState2 == TriState.True;
805 if (currentPrecedence == output.OmitXmlDeclarationPrec && settings.OmitXmlDeclaration != flag2)
806 {
807 ReportWarning(System.SR.Xslt_AttributeRedefinition, "omit-xml-declaration");
808 }
811 }
812 triState2 = ParseYesNoAttribute(13, "standalone");
813 if (triState2 != TriState.Unknown && output.StandalonePrec <= currentPrecedence)
814 {
815 XmlStandalone xmlStandalone = ((triState2 == TriState.True) ? XmlStandalone.Yes : XmlStandalone.No);
816 if (currentPrecedence == output.StandalonePrec && settings.Standalone != xmlStandalone)
817 {
819 }
822 }
823 if (ParseYesNoAttribute(14, "undeclare-prefixes") == TriState.True)
824 {
825 ReportNYI("xsl:output/@undeclare-prefixes == true()");
826 }
828 if (list2.Count != 0)
829 {
830 ReportNYI("xsl:output/@use-character-maps");
831 }
832 if (_input.MoveToXsltAttribute(16, "version") && output.VersionPrec <= currentPrecedence)
833 {
834 if (currentPrecedence == output.VersionPrec && output.Version != _input.Value)
835 {
837 }
840 }
842 }
static string Xslt_AttributeRedefinition
Definition SR.cs:1968
static string Xslt_InvalidEncoding
Definition SR.cs:1972
Definition SR.cs:7
static Encoding GetEncoding(int codepage)
Definition Encoding.cs:593
bool ExitForwardsCompatible(bool fwdCompat)
Definition Compiler.cs:315
bool MoveToXsltAttribute(int attNum, string attName)
Definition XsltInput.cs:681
void ReportWarning(string res, params string[] args)
List< QilName > ParseUseCharacterMaps(int attNum)
XmlQualifiedName ParseOutputMethod(string attValue, out XmlOutputMethod method)
TriState ParseYesNoAttribute(int attNum, string attName)
QilName ParseQNameAttribute(int attNum)
bool ResolveQName(bool ignoreDefaultNs, string qname, out string localName, out string namespaceName, out string prefix)
readonly XsltInput.XsltAttribute[] _outputAttributes
Definition XsltLoader.cs:64

References System.Xml.Xsl.Xslt.XsltLoader._compiler, System.Xml.Xsl.Xslt.XsltLoader._input, System.Xml.Xsl.Xslt.XsltLoader._outputAttributes, System.Collections.Generic.Dictionary< TKey, TValue >.AddRange(), System.array, System.Xml.XmlWriterSettings.CDataSectionElements, System.Xml.Xsl.Xslt.XsltLoader.CheckNoContent(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Xsl.Xslt.Compiler.CurrentPrecedence, System.Xml.Dictionary, System.Xml.XmlWriterSettings.DocTypePublic, System.Xml.XmlWriterSettings.DocTypeSystem, System.Xml.Xsl.Xslt.Compiler.EnterForwardsCompatible(), System.Xml.Xsl.Xslt.Compiler.ExitForwardsCompatible(), System.Xml.Xsl.Xslt.XsltInput.ForwardCompatibility, System.Xml.Xsl.Xslt.XsltInput.GetAttributes(), System.Text.Encoding.GetEncoding(), System.Xml.XmlWriterSettings.Indent, System.list, System.Xml.XmlWriterSettings.MediaType, System.Xml.Xsl.Xslt.XsltInput.MoveToXsltAttribute(), System.Xml.XmlWriterSettings.OmitXmlDeclaration, System.Xml.Xsl.Xslt.Compiler.Output, System.Xml.Xsl.Xslt.XsltLoader.ParseOutputMethod(), System.Xml.Xsl.Xslt.XsltLoader.ParseQNameAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ParseUseCharacterMaps(), System.Xml.Xsl.Xslt.XsltLoader.ParseYesNoAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ReportNYI(), System.Xml.Xsl.Xslt.XsltLoader.ReportWarning(), System.Xml.Xsl.Xslt.XsltLoader.ResolveQName(), System.Xml.XmlConvert.SplitString(), System.Xml.XmlWriterSettings.Standalone, System.Xml.Xsl.Xslt.XsltInput.Value, System.SR.Xslt_AttributeRedefinition, and System.SR.Xslt_InvalidEncoding.

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