move buildfromxml implementation to ksana-document