TPAC: Handle multiple matches for an XPath expression
Per LP
1009980, "If a record has multiple subfield b's in the 260 field,
tpac will not display the publisher or publication date in the record
details page and will not display the publisher on the search results
page".
This is because we're calling textContent on a nodeset, rather than an
individual node, and therefore get null back rather than any content.
To avoid this, always expect a nodeset and iterate over it to populate a
list of the strings. To maintain the same semantics of expecting a
single text string back for, say, args.pubdate, we define the list as
args.pubdates (plural name), and then grab the first item from the list
and populate that as args.pubdate (singular name).
Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Ben Shum <bshum@biblio.org>