lxd - finish XAXB core algorithm