| 
On Nov 16, 2017, at 1:56 PM, Brian Sheppard <[log in to unmask]> wrote:
> Yeah, those affiliations really want to be within the person element, but ...
Yes, Brian’s solution works quite well:
  <xsl:call-template name="affiliation">
    <xsl:with-param name="person">
      <xsl:value-of select="."/>
    </xsl:with-param>
  </xsl:call-template>
  <xsl:text>	</xsl:text> 
 <xsl:template name="affiliation">
    <xsl:param name="person"/>
    <xsl:for-each select="following-sibling::affiliation[preceding-sibling::person[1] = $person]">
      <xsl:value-of select="normalize-space(.)"/>
      <xsl:if test="position() != last()">
        <xsl:value-of select="'|'"/>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>
And I’m seriously thinking about changing my DTD so affiliations reside inside a person element. 
Thank you.  code4lib++
—
Eric Morgan |