def extract_primary_text(sTextualDS_node):
    """
    extracts the primary text from an STextualDS node.

    NOTE: In most corpora only one primary text will be linked to a document,
    but this might not always be the case (e.g. in corpora of parallel texts).
    """
    text_element = sTextualDS_node.find('labels[@name="SDATA"]')
    return text_element.xpath('@valueString')[0]