/// <summary>Determines if the element with the specified name represents a type slice for the current (choice) element.</summary>
 /// <returns><c>true</c> if the element name represents a type slice of the current element, <c>false</c> otherwise.</returns>
 public static bool IsCandidateTypeSlice(this BaseElementNavigator nav, string diffName)
 {
     if (nav == null)
     {
         throw Error.ArgumentNull("nav");
     }
     return(NamedNavigation.IsRenamedChoiceElement(nav.PathName, diffName));
 }
        // [WMR 20160802] NEW

        /// <summary>Move the navigator to the next type slice of the (choice) element with the specified name, if it exists.</summary>
        /// <returns><c>true</c> if succesful, <c>false</c> otherwise.</returns>
        public static bool MoveToNextTypeSlice(this BaseElementNavigator nav, string name)
        {
            if (nav == null)
            {
                throw Error.ArgumentNull("nav");
            }
            var bm = nav.Bookmark();

            while (nav.MoveToNext())
            {
                if (NamedNavigation.IsRenamedChoiceElement(name, nav.PathName))
                {
                    return(true);
                }
            }

            nav.ReturnToBookmark(bm);
            return(false);
        }