Apple Health XML data with XSLT

Before I go hacking an XSLT file of my own wondering if anyone else has tackled this task? My latest export of data from the Apple Health app is 1GB of XML but as Apple users will know this includes every data item from the first use of the app (in my case sometime in 2014). I want to extract only the most recent records and output put them in a CSV file for analysis. And then subsequent;y every month following. Whether I use the UNIX/Linux/macOS command line tool xsltproc or saxon depends on the former being able to cope with files over 1Gb otherwise it will be saxon.