Court rules in favour of child anonymity