simplify doc id normalization, make more robust
fixup XML regex
fixup testparse unittests