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

◆ LoadStylesheet() [2/2]

Stylesheet System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet ( XmlReader reader,
bool include )
inlineprivate

Definition at line 416 of file XsltLoader.cs.

417 {
418 string baseURI = reader.BaseURI;
419 _documentUriInUse.Add(baseURI, null);
420 _compiler.AddModule(baseURI);
421 Stylesheet curStylesheet = _curStylesheet;
422 XsltInput input = _input;
423 Stylesheet stylesheet = (include ? _curStylesheet : _compiler.CreateStylesheet());
424 _input = new XsltInput(reader, _compiler, _atoms);
425 _curStylesheet = stylesheet;
426 try
427 {
428 LoadDocument();
429 if (!include)
430 {
433 _curStylesheet.Imports = new Stylesheet[importHrefs.Count];
434 int num = importHrefs.Count;
435 while (0 <= --num)
436 {
438 }
439 }
440 }
441 catch (XslLoadException)
442 {
443 throw;
444 }
445 catch (Exception ex2)
446 {
447 if (!XmlException.IsCatchableException(ex2))
448 {
449 throw;
450 }
451 ISourceLineInfo sourceLineInfo;
452 if (!(ex2 is XmlException { SourceUri: not null } ex3))
453 {
455 }
456 else
457 {
458 ISourceLineInfo sourceLineInfo2 = new SourceLineInfo(ex3.SourceUri, ex3.LineNumber, ex3.LinePosition, ex3.LineNumber, ex3.LinePosition);
460 }
461 ISourceLineInfo lineInfo = sourceLineInfo;
462 throw new XslLoadException(ex2, lineInfo);
463 }
464 finally
465 {
466 _documentUriInUse.Remove(baseURI);
467 _input = input;
469 }
470 return stylesheet;
471 }
void MergeWithStylesheet(Stylesheet sheet)
Definition Compiler.cs:226
Stylesheet CreateStylesheet()
Definition Compiler.cs:143
void AddModule(string baseUri)
Definition Compiler.cs:153
ISourceLineInfo BuildReaderLineInfo()
Stylesheet LoadStylesheet(Uri uri, bool include)
readonly HybridDictionary _documentUriInUse
Definition XsltLoader.cs:44

References System.Xml.Xsl.Xslt.XsltLoader._atoms, System.Xml.Xsl.Xslt.XsltLoader._compiler, System.Xml.Xsl.Xslt.XsltLoader._curStylesheet, System.Xml.Xsl.Xslt.XsltLoader._documentUriInUse, System.Xml.Xsl.Xslt.XsltLoader._input, System.Collections.Specialized.HybridDictionary.Add(), System.Xml.Xsl.Xslt.Compiler.AddModule(), System.Xml.XmlReader.BaseURI, System.Xml.Xsl.Xslt.XsltInput.BuildReaderLineInfo(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Xsl.Xslt.Compiler.CreateStylesheet(), System.Xml.Dictionary, System.Xml.Xsl.Xslt.Stylesheet.ImportHrefs, System.Xml.Xsl.Xslt.StylesheetLevel.Imports, System.input, System.Xml.XmlException.IsCatchableException(), System.Xml.Xsl.Xslt.XsltLoader.LoadDocument(), System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(), System.Xml.Xsl.Xslt.Compiler.MergeWithStylesheet(), and System.Collections.Specialized.HybridDictionary.Remove().