@staticmethod
def ordered_first(nodeset):
    """
        Returns the node ordered earliest in the document from a given nodeset

        :param list[expatriate.Node] nodeset: The nodeset
        :rtype: expatriate.Node
        """
    if len(nodeset) == 0:
        raise ValueError('Cannot determine the first node of an empty nodeset')
    first = nodeset[0]
    for n in nodeset[1:]:
        if n.get_document_order() < first.get_document_order():
            first = n
    return first
