/// <summary>
        /// Converts the intermediate value into the XPath value.
        /// </summary>
        /// <param name="owner">The published element owning the property.</param>
        /// <param name="referenceCacheLevel">The reference cache level.</param>
        /// <param name="inter">The intermediate value.</param>
        /// <param name="preview">A value indicating whether content should be considered draft.</param>
        /// <returns>The XPath value.</returns>
        /// <remarks>
        /// <para>The XPath value can be either a string or an XPathNavigator.</para>
        /// </remarks>
        public object ConvertInterToXPath(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
        {
            if (!_initialized)
            {
                Initialize();
            }

            // use the converter if any
            if (_converter != null)
            {
                return(_converter.ConvertIntermediateToXPath(owner, this, referenceCacheLevel, inter, preview));
            }

            // else just return the inter value as a string or an XPathNavigator
            if (inter == null)
            {
                return(null);
            }
            if (inter is XElement xElement)
            {
                return(xElement.CreateNavigator());
            }
            return(inter.ToString().Trim());
        }
 public override object ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
 {
     return(_baseValueConverter.ConvertIntermediateToXPath(owner, propertyType, referenceCacheLevel, inter, preview));
 }