/// <summary>
/// Implements the following function
/// node-set distinct(node-set)
/// </summary>
/// <param name="nodeset">The input nodeset</param>
/// <returns>Returns the nodes in the nodeset whose string value is
/// distinct</returns>
public XPathNodeIterator distinct(XPathNodeIterator nodeset)
{
if (nodeset.Count > 15)
return distinct2(nodeset);
//else
XPathNavigatorIterator nodelist = new XPathNavigatorIterator();
while (nodeset.MoveNext())
{
if (!nodelist.ContainsValue(nodeset.Current.Value))
{
nodelist.Add(nodeset.Current.Clone());
}
}
nodelist.Reset();
return nodelist;
}