The old parsing mechanism operated primarily on large string chunks,
which were re‐parsed into lines potentially multiple times. This
refactor changes the parsing to use lines and ranges, which is a little
more verbose/complicated from an X·Path perspective (it requires a lot
of `generate-id()` comparisons) but hopefully, on the whole, better.