Add the layer attribute to a node element