docs: def _update_refs(self, root, bearers, attribute, ref_text, xml_id):
          """Change `ref_text` on `bearers` to xml:id references.
  
          :param root: root of TEI document
          :type root: `etree._Element`
          :param bearers: elements bearing `attribute`
          :param attribute: attribute to update
          :type attribute: `str`
          :param ref_text: text to replace
          :type ref_text: `str`
          :param xml_id: xml:id
          :type xml_id: `str`
  
          """
          ref = ' #{} '.format(xml_id)
          for bearer in bearers:
              attribute_text = bearer.get(attribute).replace(ref_text, ref)
              refs = ' '.join(sorted(attribute_text.strip().split()))
              bearer.set(attribute, refs)