An XPath predicate filters the nodes retrieved by a given step

Predicates are expressed after the node test in square brackets

The following are based on

XPath selects
//listPlace/place[1] the first place of each listPlace (of which there only happens to be one)
//*[@cRef] all elements that have a cRef attribute
//title[@level='m'] all monographic titles
/TEI/text//name[ not( @key ) ] name elements that are missing their key attributes
//lg[@type='song']/l[1] list first line of each song (16 nodes)
(//lg[@type='song']/l)[1] returns first line of all songs (1 node)
Navigating the XML Tree, slide 16 of 18