Using the more robust facility for expanding prefixed property names so matching takes place at the level of absolute URIs, this refactors the extraction of metadata at different levels of the DOM by property. Because this in essence is obtaining then filtering a flat list, it should be considerably quicker than first building up a matrix in the way get_metadata() does, and now no longer needs converting to a potentially huge XML DOM just to do a minor XPATH query.
Using the more robust facility for expanding prefixed property names so matching takes place at the level of absolute URIs, this refactors the extraction of metadata at different levels of the DOM by property. Because this in essence is obtaining then filtering a flat list, it should be considerably quicker than first building up a matrix in the way get_metadata() does, and now no longer needs converting to a potentially huge XML DOM just to do a minor XPATH query.
Includes tests.