Some fixes to editLib for xpath editing.

Should cherry pick to upstream/develop
Some fixes for schematron validation.

Should carefully merge with upstream because there is more than just the schematron part