Within VIAF, search for "Bertrand Russell". The list of results displays "Russell," The selector indicating the display name is pulling only the family name subfield for this record as the "name" is divided across multiple fields in the first mainHeadingEl element.
Hypothesis, the path in the following is not comprehensive enough.
("recordData > ns" + i + "\:VIAFCluster > ns" + i + "\:mainHeadings > ns" + i + "\:mainHeadingEl > ns" + i + "\:datafield > ns" + i + "\:subfield[code='" + codeSelector + "']");
Within VIAF, search for "Bertrand Russell". The list of results displays "Russell," The selector indicating the display name is pulling only the family name subfield for this record as the "name" is divided across multiple fields in the first mainHeadingEl element.
Hypothesis, the path in the following is not comprehensive enough.
("recordData > ns" + i + "\:VIAFCluster > ns" + i + "\:mainHeadings > ns" + i + "\:mainHeadingEl > ns" + i + "\:datafield > ns" + i + "\:subfield[code='" + codeSelector + "']");