XPath for later
Posted by gregster on 27 Jun 2012 in Activity log
I want to build a "browse by text" widget that provides a categorized list of stuff within the fragment a user chooses. For example, clicking on "browse by text -> Apollodorus -> Places" will display a list of all places mentioned by Apollodorus, and choosing Characters or Events or Groups will show a list of all characters, events and groups mentioned by Apollodorus.
The XPath for showing all unique places in Apollodorus:
//p/placeName[not(@corresp=preceding::placeName/@corresp)]/@corresp
This should only provide placeNames that are direct children of p elements - meaning it will ignore placeNames nested in notes, bibls and cits.