def add_relation(self, relation):
        """
        Parameters
        ----------
        relation : etree.Element
            etree representation of a <relation> element
            A <relation> always has a type attribute and inherits
            its ID from its parent element. In the case of a non-expletive
            relation, it also has a target attribute.

        Example
        -------

          <node xml:id="s29_501" cat="NX" func="ON" parent="s29_523">
           <relation type="expletive"/>
           <word xml:id="s29_2" form="es" pos="PPER" morph="nsn3" lemma="es"
                 func="HD" parent="s29_501" dephead="s29_14" deprel="SUBJ"/>
          </node>

          ...

         <node xml:id="s4_507" cat="NX" func="ON" parent="s4_513">
          <relation type="coreferential" target="s1_502"/>
          <node xml:id="s4_505" cat="NX" func="HD" parent="s4_507">
          ...
          </node>
         </node>
        """
        if self.ignore_relations is False:
            parent_node_id = self.get_parent_id(relation)
            reltype = relation.attrib['type']
            # add relation type information to parent node
            self.node[parent_node_id].update({'relation': reltype})
            self.add_layer(parent_node_id, self.ns+':'+reltype)
            if 'target' in relation.attrib:
                # if the relation has no target, it is either 'expletive' or
                # 'inherent_reflexive', both of which should not be part of the
                # 'markable' layer
                self.add_layer(parent_node_id, self.ns+':markable')
                target_id = relation.attrib['target']
                self.add_edge(parent_node_id, target_id,
                              layers={self.ns, self.ns+':'+reltype,
                                      self.ns+':coreference'},
                              label=reltype,
                              edge_type=dg.EdgeTypes.pointing_relation)
                self.add_layer(target_id, self.ns+':markable')