ropensci / RNeXML

Implementing semantically rich NeXML I/O in R
https://docs.ropensci.org/RNeXML
Other
13 stars 9 forks source link

Refactors extraction of metadata by property #216

Closed hlapp closed 5 years ago

hlapp commented 5 years ago

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.

cboettig commented 5 years ago

Oh nice, that's brilliant, a much cleaner way of going about this.

Code looks ready to merge.