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

◆ CompileNamespaceAlias()

void System.Xml.Xsl.XsltOld.ContainerAction.CompileNamespaceAlias ( Compiler compiler)
inlinepackageinherited

Definition at line 205 of file ContainerAction.cs.

206 {
207 NavigatorInput input = compiler.Input;
208 string localName = input.LocalName;
209 string text = null;
210 string text2 = null;
211 string text3 = null;
212 string prefix = null;
213 if (input.MoveToFirstAttribute())
214 {
215 do
216 {
217 string namespaceURI = input.NamespaceURI;
218 string localName2 = input.LocalName;
219 if (namespaceURI.Length == 0)
220 {
221 if (Ref.Equal(localName2, input.Atoms.StylesheetPrefix))
222 {
223 text3 = input.Value;
224 text = compiler.GetNsAlias(ref text3);
225 }
226 else if (Ref.Equal(localName2, input.Atoms.ResultPrefix))
227 {
228 prefix = input.Value;
229 text2 = compiler.GetNsAlias(ref prefix);
230 }
231 else if (!compiler.ForwardCompatibility)
232 {
233 throw XsltException.Create(System.SR.Xslt_InvalidAttribute, localName2, localName);
234 }
235 }
236 }
237 while (input.MoveToNextAttribute());
238 input.ToParent();
239 }
240 CheckRequiredAttribute(compiler, text, "stylesheet-prefix");
241 CheckRequiredAttribute(compiler, text2, "result-prefix");
243 compiler.AddNamespaceAlias(text, new NamespaceInfo(prefix, text2, compiler.Stylesheetid));
244 }
static string Xslt_InvalidAttribute
Definition SR.cs:1880
Definition SR.cs:7
void CheckRequiredAttribute(Compiler compiler, object attrValue, string attrName)

References System.Xml.Xsl.XsltOld.CompiledAction.CheckEmpty(), System.Xml.Xsl.XsltOld.CompiledAction.CheckRequiredAttribute(), System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.Xml.Ref.Equal(), System.input, System.Xml.Xsl.XsltOld.NavigatorInput.LocalName, System.prefix, System.text, and System.SR.Xslt_InvalidAttribute.

Referenced by System.Xml.Xsl.XsltOld.ContainerAction.CompileTopLevelElements().