rule 1 : tags are computed from the innermost towards the outermost. d