'Convert one <rule> element.
@param: etree <rule>Element'

def __init__(self, ruleElem):

    attrs = ruleElem.attrib
    self.fromPattern = attrs['from']
    self.toPattern = regex.sub('\\$(\\d)', '\\\\g<\\1>', attrs['to'])
    self.fromRe = regex.compile(self.fromPattern)
    self.tests = []
