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

◆ WriteStartElement()

void System.Xml.Xsl.XsltOld.SequentialOutput.WriteStartElement ( RecordBuilder record)
inlineprivateinherited

Definition at line 72 of file SequentialOutput.cs.

73 {
74 BuilderInfo mainNode = record.MainNode;
75 HtmlElementProps htmlElementProps = null;
76 if (_isHtmlOutput)
77 {
78 if (mainNode.Prefix.Length == 0)
79 {
80 htmlElementProps = mainNode.htmlProps;
81 if (htmlElementProps == null && mainNode.search)
82 {
83 htmlElementProps = HtmlElementProps.GetProps(mainNode.LocalName);
84 }
86 mainNode.IsEmptyTag = false;
87 }
88 }
89 else if (_isXmlOutput && mainNode.Depth == 0)
90 {
92 {
93 throw XsltException.Create(System.SR.Xslt_MultipleRoots);
94 }
95 _secondRoot = true;
96 }
98 {
100 _outputDoctype = false;
101 }
102 if (_cdataElements != null && _cdataElements.Contains(new XmlQualifiedName(mainNode.LocalName, mainNode.NamespaceURI)) && _isXmlOutput)
103 {
105 }
106 Indent(record);
107 Write('<');
108 WriteName(mainNode.Prefix, mainNode.LocalName);
109 WriteAttributes(record.AttributeList, record.AttributeCount, htmlElementProps);
110 if (mainNode.IsEmptyTag)
111 {
112 Write(" />");
113 }
114 else
115 {
116 Write('>');
117 }
118 if (htmlElementProps != null && htmlElementProps.Head)
119 {
120 mainNode.Depth++;
121 Indent(record);
122 mainNode.Depth--;
123 Write("<META http-equiv=\"Content-Type\" content=\"");
125 Write("; charset=");
127 Write("\">");
128 }
129 }
virtual bool Contains(object key)
Definition Hashtable.cs:719
static string Xslt_MultipleRoots
Definition SR.cs:2128
Definition SR.cs:7
virtual string WebName
Definition Encoding.cs:386
void WriteDoctype(BuilderInfo mainNode)
void WriteAttributes(ArrayList list, int count, HtmlElementProps htmlElementsProps)
void WriteName(string prefix, string name)

References System.Xml.Xsl.XsltOld.SequentialOutput._cdataElements, System.Xml.Xsl.XsltOld.SequentialOutput._isHtmlOutput, System.Xml.Xsl.XsltOld.SequentialOutput._isXmlOutput, System.Xml.Xsl.XsltOld.SequentialOutput._output, System.Xml.Xsl.XsltOld.SequentialOutput._outputDoctype, System.Xml.Xsl.XsltOld.SequentialOutput._secondRoot, System.Collections.Hashtable.Contains(), System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.Xml.Xsl.XsltOld.XsltOutput.DoctypeSystem, System.Xml.Xsl.XsltOld.SequentialOutput.encoding, System.Xml.Xsl.XsltOld.HtmlElementProps.GetProps(), System.Xml.Xsl.XsltOld.SequentialOutput.Indent(), System.Xml.Xsl.XsltOld.XsltOutput.MediaType, System.Xml.Xsl.XsltOld.XsltOutput.Standalone, System.Text.Encoding.WebName, System.Xml.Xsl.XsltOld.SequentialOutput.Write(), System.Xml.Xsl.XsltOld.SequentialOutput.WriteAttributes(), System.Xml.Xsl.XsltOld.SequentialOutput.WriteDoctype(), System.Xml.Xsl.XsltOld.SequentialOutput.WriteName(), and System.SR.Xslt_MultipleRoots.

Referenced by System.Xml.Xsl.XsltOld.SequentialOutput.OutputRecord().