On Sat, 2014-03-22 at 20:44 -0500, Charles Duffy wrote:
I'd guess:
let $speaker := $line/../SPEAKER/text()[1]
A list of all text nodes that are the fist child of SPEAKER elements?
Try ($line/../SPEAKER/text())[1] if you want the first text node in the list.
Maybe you have a SPEAKER element with comments, processing instructions or other elements inside, or maybe the container of $line has more than one SPEAKER element sometimes.
Yes, <SPEECH> <SPEAKER>CORNELIUS</SPEAKER> <SPEAKER>VOLTIMAND</SPEAKER> <LINE>In that and all things will we show our duty.</LINE> </SPEECH>