How would I create a collapsed xml structure from of an inconsistent list of xpaths? xslt 3.0 / 2.0 is preferred.
Input xml