Encoding the law into digital libraries