I wonder if there's a way to make two containers: (1) law contents; and (2) law annotations. That way, it's easier to traverse the XML. Don't know whether this is a bad idea for other reasons, but it would be nice to be able to just select the contents of the law and not have to worry about children, siblings, etc.
I'm not sure, but it seems like having an XML->seamlesslyinto->HTML format might be problematic for parsing - I wonder if text contents should usually/aways be wrapped in CDATA blocks?
Since links to internal references to other Code sections are generated through (I assume) regular expressions, some sections get left unlinked... see, e.g. 50-1501.02(c)(5)(B)(vii).