diff --git a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs
index 415240e017..e5424fb636 100644
--- a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs
+++ b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs
@@ -24,6 +24,8 @@ public class ContentErrorPage : ValidatableEntryBase
///
/// Gets or sets a value for the content XPath.
///
+
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public string? ContentXPath { get; set; }
///
@@ -39,6 +41,7 @@ public class ContentErrorPage : ValidatableEntryBase
///
/// Gets a value indicating whether the field is populated.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public bool HasContentXPath => !string.IsNullOrEmpty(ContentXPath);
///
diff --git a/src/Umbraco.Core/Extensions/XmlExtensions.cs b/src/Umbraco.Core/Extensions/XmlExtensions.cs
index 34e2b7b2aa..bb9e6c69b5 100644
--- a/src/Umbraco.Core/Extensions/XmlExtensions.cs
+++ b/src/Umbraco.Core/Extensions/XmlExtensions.cs
@@ -34,6 +34,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNodeList? SelectNodes(this XmlNode source, string expression, IEnumerable? variables)
{
XPathVariable[]? av = variables?.ToArray();
@@ -56,6 +57,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNodeList? SelectNodes(this XmlNode source, XPathExpression expression, IEnumerable? variables)
{
XPathVariable[]? av = variables?.ToArray();
@@ -78,6 +80,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNodeList? SelectNodes(this XmlNode source, string? expression, params XPathVariable[]? variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
@@ -105,6 +108,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNodeList SelectNodes(this XmlNode source, XPathExpression expression, params XPathVariable[]? variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
@@ -132,6 +136,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNode? SelectSingleNode(this XmlNode source, string expression, IEnumerable? variables)
{
XPathVariable[]? av = variables?.ToArray();
@@ -154,6 +159,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNode? SelectSingleNode(this XmlNode source, XPathExpression expression, IEnumerable? variables)
{
XPathVariable[]? av = variables?.ToArray();
@@ -176,6 +182,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNode? SelectSingleNode(this XmlNode source, string expression, params XPathVariable[]? variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
@@ -202,6 +209,7 @@ public static class XmlExtensions
///
/// The XPath expression should reference variables as $var.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNode? SelectSingleNode(this XmlNode source, XPathExpression expression, params XPathVariable[]? variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
diff --git a/src/Umbraco.Core/Models/ContentEditing/Language.cs b/src/Umbraco.Core/Models/ContentEditing/Language.cs
index 112aeb5aac..99c011d608 100644
--- a/src/Umbraco.Core/Models/ContentEditing/Language.cs
+++ b/src/Umbraco.Core/Models/ContentEditing/Language.cs
@@ -22,7 +22,7 @@ public class Language
[DataMember(Name = "isMandatory")]
public bool IsMandatory { get; set; }
- [Obsolete("This will be replaced by fallback language ISO code in V13.")]
+ [Obsolete("This will be replaced by fallback language ISO code in V14.")]
[DataMember(Name = "fallbackLanguageId")]
public int? FallbackLanguageId { get; set; }
}
diff --git a/src/Umbraco.Core/Models/DictionaryItem.cs b/src/Umbraco.Core/Models/DictionaryItem.cs
index 90576a85e3..b0e787de02 100644
--- a/src/Umbraco.Core/Models/DictionaryItem.cs
+++ b/src/Umbraco.Core/Models/DictionaryItem.cs
@@ -34,7 +34,7 @@ public class DictionaryItem : EntityBase, IDictionaryItem
_translations = new List();
}
- [Obsolete("This will be removed in V13.")]
+ [Obsolete("This will be removed in V14.")]
public Func? GetLanguage { get; set; }
///
diff --git a/src/Umbraco.Core/Models/DictionaryItemExtensions.cs b/src/Umbraco.Core/Models/DictionaryItemExtensions.cs
index 09654d5137..341f185ff9 100644
--- a/src/Umbraco.Core/Models/DictionaryItemExtensions.cs
+++ b/src/Umbraco.Core/Models/DictionaryItemExtensions.cs
@@ -10,7 +10,7 @@ public static class DictionaryItemExtensions
///
///
///
- [Obsolete("This will be replaced in V13 by a corresponding method accepting language ISO code instead of language ID.")]
+ [Obsolete("This will be replaced in V14 by a corresponding method accepting language ISO code instead of language ID.")]
public static string? GetTranslatedValue(this IDictionaryItem d, int languageId)
{
IDictionaryTranslation? trans = d.Translations.FirstOrDefault(x => x.LanguageId == languageId);
@@ -22,7 +22,7 @@ public static class DictionaryItemExtensions
///
///
///
- [Obsolete("Warning: This method ONLY works in very specific scenarios. It will be removed in V13.")]
+ [Obsolete("Warning: This method ONLY works in very specific scenarios. It will be removed in V14.")]
public static string? GetDefaultValue(this IDictionaryItem d)
{
IDictionaryTranslation? defaultTranslation = d.Translations.FirstOrDefault(x => x.Language?.Id == 1);
diff --git a/src/Umbraco.Core/Models/DictionaryTranslation.cs b/src/Umbraco.Core/Models/DictionaryTranslation.cs
index ab79b77e44..7f4471785c 100644
--- a/src/Umbraco.Core/Models/DictionaryTranslation.cs
+++ b/src/Umbraco.Core/Models/DictionaryTranslation.cs
@@ -1,5 +1,8 @@
using System.Runtime.Serialization;
+using Microsoft.Extensions.DependencyInjection;
+using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.Entities;
+using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Core.Models;
@@ -11,6 +14,7 @@ namespace Umbraco.Cms.Core.Models;
public class DictionaryTranslation : EntityBase, IDictionaryTranslation
{
private ILanguage? _language;
+ private string? _languageIsoCode;
// note: this will be memberwise cloned
private string _value;
@@ -20,6 +24,7 @@ public class DictionaryTranslation : EntityBase, IDictionaryTranslation
_language = language ?? throw new ArgumentNullException("language");
LanguageId = _language.Id;
_value = value;
+ LanguageIsoCode = language.IsoCode;
}
public DictionaryTranslation(ILanguage language, string value, Guid uniqueId)
@@ -27,17 +32,18 @@ public class DictionaryTranslation : EntityBase, IDictionaryTranslation
_language = language ?? throw new ArgumentNullException("language");
LanguageId = _language.Id;
_value = value;
+ LanguageIsoCode = language.IsoCode;
Key = uniqueId;
}
- [Obsolete("Please use constructor that accepts ILanguage. This will be removed in V13.")]
+ [Obsolete("Please use constructor that accepts ILanguage. This will be removed in V14.")]
public DictionaryTranslation(int languageId, string value)
{
LanguageId = languageId;
_value = value;
}
- [Obsolete("Please use constructor that accepts ILanguage. This will be removed in V13.")]
+ [Obsolete("Please use constructor that accepts ILanguage. This will be removed in V14.")]
public DictionaryTranslation(int languageId, string value, Guid uniqueId)
{
LanguageId = languageId;
@@ -58,7 +64,7 @@ public class DictionaryTranslation : EntityBase, IDictionaryTranslation
/// returned
/// on a callback.
///
- [Obsolete("This will be removed in V13. From V13 onwards you should get languages by ISO code from ILanguageService.")]
+ [Obsolete("This will be removed in V14. From V14 onwards you should get languages by ISO code from ILanguageService.")]
[DataMember]
[DoNotClone]
public ILanguage? Language
@@ -86,7 +92,7 @@ public class DictionaryTranslation : EntityBase, IDictionaryTranslation
}
}
- [Obsolete("This will be replaced by language ISO code in V13.")]
+ [Obsolete("This will be replaced by language ISO code in V14.")]
public int LanguageId { get; private set; }
///
@@ -99,6 +105,24 @@ public class DictionaryTranslation : EntityBase, IDictionaryTranslation
set => SetPropertyValueAndDetectChanges(value, ref _value!, nameof(Value));
}
+ ///
+ public string LanguageIsoCode
+ {
+ get
+ {
+ // TODO: this won't be necessary after obsoleted ctors are removed in v14.
+ if (_languageIsoCode is null)
+ {
+ var _languageService = StaticServiceProvider.Instance.GetRequiredService();
+ _languageIsoCode = _languageService.GetLanguageById(LanguageId)?.IsoCode ?? string.Empty;
+ }
+
+ return _languageIsoCode;
+ }
+
+ private set => SetPropertyValueAndDetectChanges(value, ref _languageIsoCode!, nameof(LanguageIsoCode));
+ }
+
protected override void PerformDeepClone(object clone)
{
base.PerformDeepClone(clone);
diff --git a/src/Umbraco.Core/Models/IDictionaryTranslation.cs b/src/Umbraco.Core/Models/IDictionaryTranslation.cs
index 45d71e3f9b..8f8d9ffaa4 100644
--- a/src/Umbraco.Core/Models/IDictionaryTranslation.cs
+++ b/src/Umbraco.Core/Models/IDictionaryTranslation.cs
@@ -6,18 +6,24 @@ namespace Umbraco.Cms.Core.Models;
public interface IDictionaryTranslation : IEntity, IRememberBeingDirty
{
///
- /// Gets or sets the for the translation
+ /// Gets or sets the for the translation.
///
- [Obsolete("This will be removed in V13. From V13 onwards you should get languages by ISO code from ILanguageService.")]
+ [Obsolete("This will be removed in V14. From V14 onwards you should get languages by ISO code from ILanguageService.")]
[DataMember]
ILanguage? Language { get; set; }
- [Obsolete("This will be replaced by language ISO code in V13.")]
+ [Obsolete("This will be replaced by language ISO code in V14.")]
int LanguageId { get; }
///
- /// Gets or sets the translated text
+ /// Gets or sets the translated text.
///
[DataMember]
string Value { get; set; }
+
+ ///
+ /// Gets the ISO code of the language.
+ ///
+ [DataMember]
+ string LanguageIsoCode => Language?.IsoCode ?? string.Empty;
}
diff --git a/src/Umbraco.Core/Models/ILanguage.cs b/src/Umbraco.Core/Models/ILanguage.cs
index 88c76ae7b0..885833cd5c 100644
--- a/src/Umbraco.Core/Models/ILanguage.cs
+++ b/src/Umbraco.Core/Models/ILanguage.cs
@@ -55,7 +55,24 @@ public interface ILanguage : IEntity, IRememberBeingDirty
/// define fallback strategies when a value does not exist for a requested language.
///
///
- [Obsolete("This will be replaced by fallback language ISO code in V13.")]
+ [Obsolete("This will be replaced by fallback language ISO code in V14.")]
[DataMember]
int? FallbackLanguageId { get; set; }
+
+
+ ///
+ /// Gets or sets the ISO code of a fallback language.
+ ///
+ ///
+ ///
+ /// The fallback language can be used in multi-lingual scenarios, to help
+ /// define fallback strategies when a value does not exist for a requested language.
+ ///
+ ///
+ [DataMember]
+ string? FallbackIsoCode
+ {
+ get => null;
+ set { }
+ }
}
diff --git a/src/Umbraco.Core/Models/Language.cs b/src/Umbraco.Core/Models/Language.cs
index 9871cf3eed..62a65f086b 100644
--- a/src/Umbraco.Core/Models/Language.cs
+++ b/src/Umbraco.Core/Models/Language.cs
@@ -1,6 +1,5 @@
using System.Globalization;
using System.Runtime.Serialization;
-using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Models.Entities;
namespace Umbraco.Cms.Core.Models;
@@ -14,6 +13,7 @@ public class Language : EntityBase, ILanguage
{
private string _cultureName;
private int? _fallbackLanguageId;
+ private string? _fallbackLanguageIsoCode;
private bool _isDefaultVariantLanguage;
private string _isoCode;
private bool _mandatory;
@@ -74,10 +74,17 @@ public class Language : EntityBase, ILanguage
}
///
- [Obsolete("This will be replaced by fallback language ISO code in V13.")]
+ [Obsolete("This will be replaced by fallback language ISO code in V14.")]
public int? FallbackLanguageId
{
get => _fallbackLanguageId;
set => SetPropertyValueAndDetectChanges(value, ref _fallbackLanguageId, nameof(FallbackLanguageId));
}
+
+ ///
+ public string? FallbackIsoCode
+ {
+ get => _fallbackLanguageIsoCode;
+ set => SetPropertyValueAndDetectChanges(value, ref _fallbackLanguageIsoCode, nameof(FallbackIsoCode));
+ }
}
diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
index a7bff33ba4..ed175e418d 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
@@ -69,6 +69,8 @@ public interface IPublishedProperty
/// It must be either null, or a string, or an XPathNavigator.
/// It has been fully prepared and processed by the appropriate converter.
///
+
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
object? GetXPathValue(string? culture = null, string? segment = null);
///
diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs
index 83ca0c49df..45d36abb6a 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs
@@ -113,6 +113,7 @@ public interface IPublishedPropertyType
///
/// The XPath value can be either a string or an XPathNavigator.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
object? ConvertInterToXPath(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview);
///
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs
index a06d2006ba..c36809600b 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs
@@ -46,6 +46,7 @@ public abstract class PublishedPropertyBase : IPublishedProperty
public abstract object? GetValue(string? culture = null, string? segment = null);
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract object? GetXPathValue(string? culture = null, string? segment = null);
///
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
index 0efa4e7653..848e961d0b 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
@@ -273,6 +273,7 @@ namespace Umbraco.Cms.Core.Models.PublishedContent
}
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public object? ConvertInterToXPath(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview)
{
if (!_initialized)
diff --git a/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs b/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs
index 3d29744bac..013f969805 100644
--- a/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs
@@ -58,6 +58,7 @@ public class RawValueProperty : PublishedPropertyBase
public override object? GetValue(string? culture = null, string? segment = null)
=> string.IsNullOrEmpty(culture) & string.IsNullOrEmpty(segment) ? _objectValue.Value : null;
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object? GetXPathValue(string? culture = null, string? segment = null)
=> string.IsNullOrEmpty(culture) & string.IsNullOrEmpty(segment) ? _xpathValue.Value : null;
diff --git a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs
index 37d6b82475..74dbeaebae 100644
--- a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs
@@ -128,5 +128,6 @@ public interface IPropertyValueConverter : IDiscoverable
/// the cache levels of property values. It is not meant to be used by the converter.
///
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview);
}
diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs
index 3066086e7b..33c86f3ef4 100644
--- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs
+++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs
@@ -49,6 +49,7 @@ public abstract class PropertyValueConverterBase : IPropertyValueConverter
=> inter;
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public virtual object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview)
{
var d = new XmlDocument();
diff --git a/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs
index 6c9c80ce81..fc7651b801 100644
--- a/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs
@@ -51,6 +51,7 @@ public class TextStringValueConverter : PropertyValueConverterBase, IDeliveryApi
// source should come from ConvertSource and be a string (or null) already
inter ?? string.Empty;
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) =>
// source should come from ConvertSource and be a string (or null) already
diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs
index 06bfd1b1f2..94f2533548 100644
--- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs
@@ -86,6 +86,7 @@ public class ContentPickerValueConverter : PropertyValueConverterBase, IDelivery
return content ?? inter;
}
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview)
{
if (inter == null)
diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs
index 7941946964..73ef424ba4 100644
--- a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs
@@ -39,6 +39,7 @@ public class DatePickerValueConverter : PropertyValueConverterBase
}
// default ConvertSourceToObject just returns source ie a DateTime value
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object? ConvertIntermediateToXPath(
IPublishedElement owner,
IPublishedPropertyType propertyType,
diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs
index 3d631afead..e3dcd6ae78 100644
--- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs
@@ -57,6 +57,7 @@ public class MultipleTextStringValueConverter : PropertyValueConverterBase
: values.ToArray();
}
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview)
{
var d = new XmlDocument();
diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs
index 7503e6711f..8e0aa50acf 100644
--- a/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs
@@ -31,6 +31,7 @@ public class SimpleTinyMceValueConverter : PropertyValueConverterBase
// source should come from ConvertSource and be a string (or null) already
new HtmlEncodedString(inter == null ? string.Empty : (string)inter);
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) =>
// source should come from ConvertSource and be a string (or null) already
diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs
index ab7f99e7f8..7bc940f90f 100644
--- a/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs
@@ -56,6 +56,7 @@ public class YesNoValueConverter : PropertyValueConverterBase
}
// default ConvertSourceToObject just returns source ie a boolean value
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) =>
// source should come from ConvertSource and be a boolean already
diff --git a/src/Umbraco.Core/PublishedCache/IPublishedCache.cs b/src/Umbraco.Core/PublishedCache/IPublishedCache.cs
index 0ee2ca38ed..78ebd19d6a 100644
--- a/src/Umbraco.Core/PublishedCache/IPublishedCache.cs
+++ b/src/Umbraco.Core/PublishedCache/IPublishedCache.cs
@@ -102,6 +102,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The content, or null.
/// The value of overrides defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IPublishedContent? GetSingleByXPath(bool preview, string xpath, params XPathVariable[] vars);
///
@@ -111,6 +112,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The content, or null.
/// Considers published or unpublished content depending on defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IPublishedContent? GetSingleByXPath(string xpath, params XPathVariable[] vars);
///
@@ -121,6 +123,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The content, or null.
/// The value of overrides defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IPublishedContent? GetSingleByXPath(bool preview, XPathExpression xpath, params XPathVariable[] vars);
///
@@ -130,6 +133,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The content, or null.
/// Considers published or unpublished content depending on defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IPublishedContent? GetSingleByXPath(XPathExpression xpath, params XPathVariable[] vars);
///
@@ -140,6 +144,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The contents.
/// The value of overrides defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IEnumerable GetByXPath(bool preview, string xpath, params XPathVariable[] vars);
///
@@ -149,6 +154,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The contents.
/// Considers published or unpublished content depending on defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IEnumerable GetByXPath(string xpath, params XPathVariable[] vars);
///
@@ -159,6 +165,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The contents.
/// The value of overrides defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IEnumerable GetByXPath(bool preview, XPathExpression xpath, params XPathVariable[] vars);
///
@@ -168,6 +175,7 @@ public interface IPublishedCache : IXPathNavigable
/// Optional XPath variables.
/// The contents.
/// Considers published or unpublished content depending on defaults.
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IEnumerable GetByXPath(XPathExpression xpath, params XPathVariable[] vars);
///
@@ -179,6 +187,7 @@ public interface IPublishedCache : IXPathNavigable
/// The value of overrides the context.
/// The navigator is already a safe clone (no need to clone it again).
///
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
XPathNavigator CreateNavigator(bool preview);
///
@@ -196,6 +205,7 @@ public interface IPublishedCache : IXPathNavigable
///
/// If the node does not exist, returns null.
///
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
XPathNavigator? CreateNodeNavigator(int id, bool preview);
///
diff --git a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs
index e4e9010f5b..315136612a 100644
--- a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs
+++ b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs
@@ -38,20 +38,26 @@ public sealed class InternalPublishedContentCache : PublishedCacheBase, IPublish
public override IEnumerable GetAtRoot(bool preview, string? culture = null) =>
_content.Values.Where(x => x.Parent == null);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override IPublishedContent GetSingleByXPath(bool preview, string xpath, XPathVariable[] vars) =>
throw new NotImplementedException();
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override IPublishedContent GetSingleByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars) =>
throw new NotImplementedException();
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override IEnumerable GetByXPath(bool preview, string xpath, XPathVariable[] vars) =>
throw new NotImplementedException();
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override IEnumerable
GetByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars) => throw new NotImplementedException();
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override XPathNavigator CreateNavigator(bool preview) => throw new NotImplementedException();
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override XPathNavigator CreateNodeNavigator(int id, bool preview) => throw new NotImplementedException();
public override bool HasContent(bool preview) => _content.Count > 0;
diff --git a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs
index a90897e221..c0d76aceb8 100644
--- a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs
+++ b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs
@@ -13,6 +13,7 @@ public class InternalPublishedProperty : IPublishedProperty
public bool SolidHasValue { get; set; }
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public object? SolidXPathValue { get; set; }
public object? SolidDeliveryApiValue { get; set; }
@@ -25,6 +26,7 @@ public class InternalPublishedProperty : IPublishedProperty
public virtual object? GetValue(string? culture = null, string? segment = null) => SolidValue;
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public virtual object? GetXPathValue(string? culture = null, string? segment = null) => SolidXPathValue;
public virtual object? GetDeliveryApiValue(bool expanding, string? culture = null, string? segment = null) => SolidDeliveryApiValue;
diff --git a/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs b/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs
index 3e961ce434..c20ebf9284 100644
--- a/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs
+++ b/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs
@@ -40,31 +40,42 @@ public abstract class PublishedCacheBase : IPublishedCache
public IEnumerable GetAtRoot(string? culture = null) => GetAtRoot(PreviewDefault, culture);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract IPublishedContent? GetSingleByXPath(bool preview, string xpath, XPathVariable[] vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public IPublishedContent? GetSingleByXPath(string xpath, XPathVariable[] vars) =>
GetSingleByXPath(PreviewDefault, xpath, vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract IPublishedContent? GetSingleByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public IPublishedContent? GetSingleByXPath(XPathExpression xpath, XPathVariable[] vars) =>
GetSingleByXPath(PreviewDefault, xpath, vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract IEnumerable GetByXPath(bool preview, string xpath, XPathVariable[] vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public IEnumerable GetByXPath(string xpath, XPathVariable[] vars) =>
GetByXPath(PreviewDefault, xpath, vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract IEnumerable
GetByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public IEnumerable GetByXPath(XPathExpression xpath, XPathVariable[] vars) =>
GetByXPath(PreviewDefault, xpath, vars);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract XPathNavigator CreateNavigator(bool preview);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public XPathNavigator CreateNavigator() => CreateNavigator(PreviewDefault);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public abstract XPathNavigator? CreateNodeNavigator(int id, bool preview);
public abstract bool HasContent(bool preview);
diff --git a/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs b/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs
index b4e56897a7..05348a138c 100644
--- a/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs
+++ b/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs
@@ -201,6 +201,7 @@ internal class PublishedElementPropertyBase : PublishedPropertyBase
}
}
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override object? GetXPathValue(string? culture = null, string? segment = null)
{
GetCacheLevels(out PropertyCacheLevel cacheLevel, out PropertyCacheLevel referenceCacheLevel);
diff --git a/src/Umbraco.Core/Xml/DynamicContext.cs b/src/Umbraco.Core/Xml/DynamicContext.cs
index fd86866348..321024f486 100644
--- a/src/Umbraco.Core/Xml/DynamicContext.cs
+++ b/src/Umbraco.Core/Xml/DynamicContext.cs
@@ -118,6 +118,7 @@ namespace Umbraco.Cms.Core.Xml
///
/// Same as .
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override bool PreserveWhitespace(XPathNavigator node)
{
return true;
@@ -140,6 +141,7 @@ namespace Umbraco.Cms.Core.Xml
///
/// The expression to compile
/// A compiled .
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XPathExpression? Compile(string xpath)
{
return new XmlDocument().CreateNavigator()?.Compile(xpath);
@@ -203,6 +205,7 @@ namespace Umbraco.Cms.Core.Xml
///
/// See . Not used in our implementation.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public override IXsltContextFunction ResolveFunction(string prefix, string name, XPathResultType[] argTypes) => throw new NotImplementedException();
///
diff --git a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs
index 2a01d42dc7..87d4d459fa 100644
--- a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs
+++ b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs
@@ -6,6 +6,7 @@ namespace Umbraco.Cms.Core.Xml;
/// This is used to parse our customize Umbraco XPath expressions (i.e. that include special tokens like $site) into
/// a real XPath statement
///
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public class UmbracoXPathPathSyntaxParser
{
[Obsolete("This will be removed in Umbraco 13. Use ParseXPathQuery which accepts a parentId instead")]
diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs
index b9359b4fef..8d9d48a0a0 100644
--- a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs
+++ b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs
@@ -3,6 +3,7 @@ namespace Umbraco.Cms.Core.Xml.XPath;
///
/// Represents a content that can be navigated via XPath.
///
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public interface INavigableContent
{
///
diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs b/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs
index 08a7c1a0f6..eeb775e07b 100644
--- a/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs
+++ b/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs
@@ -3,6 +3,7 @@ namespace Umbraco.Cms.Core.Xml.XPath;
///
/// Represents the type of a content that can be navigated via XPath.
///
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public interface INavigableContentType
{
///
diff --git a/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs b/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs
index 28fa46e84b..faaa612474 100644
--- a/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs
+++ b/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs
@@ -4,6 +4,7 @@ namespace Umbraco.Cms.Core.Xml.XPath;
/// Represents the type of a field of a content that can be navigated via XPath.
///
/// A field can be an attribute or a property.
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public interface INavigableFieldType
{
///
diff --git a/src/Umbraco.Core/Xml/XPath/INavigableSource.cs b/src/Umbraco.Core/Xml/XPath/INavigableSource.cs
index 1f8500725b..459f1bf606 100644
--- a/src/Umbraco.Core/Xml/XPath/INavigableSource.cs
+++ b/src/Umbraco.Core/Xml/XPath/INavigableSource.cs
@@ -3,6 +3,7 @@ namespace Umbraco.Cms.Core.Xml.XPath;
///
/// Represents a source of content that can be navigated via XPath.
///
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public interface INavigableSource
{
///
diff --git a/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs b/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs
index dd27e6124c..3d706eed80 100644
--- a/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs
+++ b/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs
@@ -7,6 +7,7 @@ namespace Umbraco.Cms.Core.Xml.XPath
///
/// Provides a cursor model for navigating {macro /} as if it were XML.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public class MacroNavigator : XPathNavigator
{
private readonly XmlNameTable _nameTable;
diff --git a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs
index 3529f55922..020f753165 100644
--- a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs
+++ b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs
@@ -21,6 +21,8 @@ namespace Umbraco.Cms.Core.Xml.XPath;
///
/// Provides a cursor model for navigating Umbraco data as if it were XML.
///
+
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public class NavigableNavigator : XPathNavigator
{
// "The XmlNameTable stores atomized strings of any local name, namespace URI,
diff --git a/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs b/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs
index 1b710c8db5..63fa9ef263 100644
--- a/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs
+++ b/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs
@@ -3,6 +3,7 @@ using System.Xml.XPath;
namespace Umbraco.Cms.Core.Xml.XPath;
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public class RenamedRootNavigator : XPathNavigator
{
private readonly XPathNavigator _navigator;
diff --git a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs
index 44cda2c691..09bd34f692 100644
--- a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs
+++ b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs
@@ -18,6 +18,7 @@ public static class XPathNavigatorExtensions
/// An XPath expression.
/// A set of XPathVariables.
/// An iterator over the nodes matching the specified expression.
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XPathNodeIterator Select(this XPathNavigator navigator, string expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
@@ -50,6 +51,7 @@ public static class XPathNavigatorExtensions
/// An XPath expression.
/// A set of XPathVariables.
/// An iterator over the nodes matching the specified expression.
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XPathNodeIterator Select(this XPathNavigator navigator, XPathExpression expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
diff --git a/src/Umbraco.Core/Xml/XPathVariable.cs b/src/Umbraco.Core/Xml/XPathVariable.cs
index 4c2d2d0f4e..675485e551 100644
--- a/src/Umbraco.Core/Xml/XPathVariable.cs
+++ b/src/Umbraco.Core/Xml/XPathVariable.cs
@@ -6,6 +6,7 @@ namespace Umbraco.Cms.Core.Xml;
/// Represents a variable in an XPath query.
///
/// The name must be foo in the constructor and $foo in the XPath query.
+[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public class XPathVariable
{
///
diff --git a/src/Umbraco.Core/Xml/XmlHelper.cs b/src/Umbraco.Core/Xml/XmlHelper.cs
index ad97120c93..a2165fdd39 100644
--- a/src/Umbraco.Core/Xml/XmlHelper.cs
+++ b/src/Umbraco.Core/Xml/XmlHelper.cs
@@ -76,6 +76,7 @@ public class XmlHelper
///
/// The xml string.
/// An XPathDocument created from the xml string.
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XPathDocument CreateXPathDocument(string xml) =>
new XPathDocument(new XmlTextReader(new StringReader(xml)));
@@ -85,6 +86,7 @@ public class XmlHelper
/// The xml string.
/// The XPath document.
/// A value indicating whether it has been possible to create the document.
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static bool TryCreateXPathDocument(string xml, out XPathDocument? doc)
{
try
@@ -106,6 +108,7 @@ public class XmlHelper
/// The XPath document.
/// A value indicating whether it has been possible to create the document.
/// The value can be anything... Performance-wise, this is bad.
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static bool TryCreateXPathDocumentFromPropertyValue(object value, out XPathDocument? doc)
{
// DynamicNode.ConvertPropertyValueByDataType first cleans the value by calling
@@ -155,6 +158,7 @@ public class XmlHelper
/// The parent node.
/// An XPath expression to select children of to sort.
/// A function returning the value to order the nodes by.
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static void SortNodes(
XmlNode parentNode,
string childNodesXPath,
@@ -187,6 +191,7 @@ public class XmlHelper
/// Assuming all nodes but are sorted, this will move the node to
/// the right position without moving all the nodes (as SortNodes would do) - should improve perfs.
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static bool SortNode(
XmlNode parentNode,
string childNodesXPath,
diff --git a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs
index 17c2f41843..8031ca0bf0 100644
--- a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs
+++ b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs
@@ -27,6 +27,7 @@ public class XmlNodeListFactory
/// an object inheriting , such as
/// .
///
+ [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
public static XmlNodeList CreateNodeList(XPathNodeIterator? iterator) => new XmlNodeListIterator(iterator);
#endregion Public members
diff --git a/src/Umbraco.Infrastructure/IPublishedContentQuery.cs b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs
index cc034e5768..6e82239dac 100644
--- a/src/Umbraco.Infrastructure/IPublishedContentQuery.cs
+++ b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs
@@ -18,6 +18,7 @@ public interface IPublishedContentQuery
IPublishedContent? Content(object id);
+ [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")]
IPublishedContent? ContentSingleAtXPath(string xpath, params XPathVariable[] vars);
IEnumerable Content(IEnumerable ids);
@@ -26,8 +27,10 @@ public interface IPublishedContentQuery
IEnumerable Content(IEnumerable