def update_link_rewrite(self, old_rel, old_text, new_text, single_link=False):
links = self.metadata.xpath('<STR_LIT>'.format(old_rel, old_text))<EOL>if len(links) < <NUM_LIT:1>:<EOL><INDENT>log.warning('<STR_LIT>'.format(str(old_rel), str(old_text)))<EOL>return False<EOL><DEDENT>for link in links:<EOL><INDENT>link.text = new_text<EOL>if single_link:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return True<EOL>
Rewrite the text() value of a link based on the link/@rel and link/text() value.

This is similar to update_link_rel_based but users link/@rel AND link/text() values
to determine which links have their link/@text() values updated.

:param old_rel: The link/@rel value used to select link nodes to update.
:param old_text: The link/text() value used to select link nodes to update.
:param new_text: The new link/text() value to set on link nodes.
:param single_link: Determine if only the first, or multiple, linkes are modified.
:return: True, unless there are no links with link/[@rel='old_rel' and text()='old_text']