Completes: U4-6186 Remove all support for legacy xml schema
This commit is contained in:
@@ -374,15 +374,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
if (_xmlNode.Attributes.GetNamedItem("writerID") != null)
|
||||
_writerId = int.Parse(_xmlNode.Attributes.GetNamedItem("writerID").Value);
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
|
||||
{
|
||||
if (_xmlNode.Attributes.GetNamedItem("nodeTypeAlias") != null)
|
||||
_docTypeAlias = _xmlNode.Attributes.GetNamedItem("nodeTypeAlias").Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
_docTypeAlias = _xmlNode.Name;
|
||||
}
|
||||
_docTypeAlias = _xmlNode.Name;
|
||||
|
||||
if (_xmlNode.Attributes.GetNamedItem("nodeType") != null)
|
||||
_docTypeId = int.Parse(_xmlNode.Attributes.GetNamedItem("nodeType").Value);
|
||||
@@ -401,7 +393,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
}
|
||||
|
||||
// load data
|
||||
var dataXPath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "data" : "* [not(@isDoc)]";
|
||||
var dataXPath = "* [not(@isDoc)]";
|
||||
var nodes = _xmlNode.SelectNodes(dataXPath);
|
||||
|
||||
_contentType = PublishedContentType.Get(PublishedItemType.Content, _docTypeAlias);
|
||||
@@ -410,9 +402,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
if (nodes != null)
|
||||
foreach (XmlNode n in nodes)
|
||||
{
|
||||
var alias = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema
|
||||
? n.Attributes.GetNamedItem("alias").Value
|
||||
: n.Name;
|
||||
var alias = n.Name;
|
||||
propertyNodes[alias.ToLowerInvariant()] = n;
|
||||
}
|
||||
|
||||
@@ -433,7 +423,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
if (_xmlNode == null) return;
|
||||
|
||||
// load children
|
||||
var childXPath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "node" : "* [@isDoc]";
|
||||
var childXPath = "* [@isDoc]";
|
||||
var nav = _xmlNode.CreateNavigator();
|
||||
var expr = nav.Compile(childXPath);
|
||||
expr.AddSort("@sortOrder", XmlSortOrder.Ascending, XmlCaseOrder.None, "", XmlDataType.Number);
|
||||
|
||||
Reference in New Issue
Block a user