code: def setRules( self, rules ):
          
          if ( type(rules) in (list, tuple) ):
              self._rules = dict([(x.term(), x) for x in rules])
              self.updateRules()
              return True
              
          elif ( type(rules) == dict ):
              self._rules = rules.copy()
              self.updateRules()
              return True
              
          else:
              return False
docs: Sets all the rules for this builder.
          
          :param      rules | [<XQueryRule>, ..]