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

◆ FindStylesheetElement()

bool System.Xml.Xsl.Xslt.XsltInput.FindStylesheetElement ( )
inline

Definition at line 275 of file XsltInput.cs.

276 {
277 if (!_topLevelReader && _reader.ReadState != ReadState.Interactive)
278 {
279 return false;
280 }
282 if (_reader.ReadState == ReadState.Interactive && _reader is IXmlNamespaceResolver xmlNamespaceResolver)
283 {
284 dictionary = xmlNamespaceResolver.GetNamespacesInScope(XmlNamespaceScope.ExcludeXml);
285 }
286 while (MoveToNextSibling() && _nodeType == XmlNodeType.Whitespace)
287 {
288 }
289 if (_nodeType == XmlNodeType.Element)
290 {
291 if (dictionary != null)
292 {
294 {
295 if (_scopeManager.LookupNamespace(item.Key) == null)
296 {
297 string nsUri = _atoms.NameTable.Add(item.Value);
298 _scopeManager.AddNsDeclaration(item.Key, nsUri);
299 _ctxInfo.AddNamespace(item.Key, nsUri);
300 }
301 }
302 }
303 return true;
304 }
305 return false;
306 }
string Add(char[] array, int offset, int length)
void AddNamespace(string prefix, string nsUri)
Definition XsltInput.cs:85
readonly XmlReader _reader
Definition XsltInput.cs:140
readonly KeywordsTable _atoms
Definition XsltInput.cs:148
readonly CompilerScopeManager< VarPar > _scopeManager
Definition XsltInput.cs:146

References System.Xml.Xsl.Xslt.XsltInput._atoms, System.Xml.Xsl.Xslt.XsltInput._ctxInfo, System.Xml.Xsl.Xslt.XsltInput._nodeType, System.Xml.Xsl.Xslt.XsltInput._reader, System.Xml.Xsl.Xslt.XsltInput._scopeManager, System.Xml.Xsl.Xslt.XsltInput._topLevelReader, System.Xml.XmlNameTable.Add(), System.Xml.Xsl.Xslt.XsltInput.ContextInfo.AddNamespace(), System.dictionary, System.item, System.Xml.Xsl.Xslt.XsltInput.MoveToNextSibling(), System.Xml.Xsl.Xslt.KeywordsTable.NameTable, and System.Xml.XmlReader.ReadState.

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