<xsl:template name="person-name">
<xsl:param name="file" select="''"/>
+ <xsl:param name="form" select="'full'"/>
<xsl:variable name="person" select="document(concat('../xml/people/',$file,'.xml'))/person"/>
- <xsl:if test="$person/qualification">
+ <xsl:if test="$person/qualification and $form = 'full'">
<xsl:value-of select="$person/qualification"/>
<xsl:value-of select="' '"/>
</xsl:if>
- <xsl:value-of select="$person/name"/>
+ <xsl:choose>
+ <xsl:when test="$form = 'full'">
+ <xsl:value-of select="$person/name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Bug: just the first name is abbreviated. The others are ignored. -->
+ <xsl:value-of select="substring($person/name,1,1)"/>
+ <xsl:text>.</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:value-of select="' '"/>
<xsl:value-of select="$person/surname"/>
</xsl:template>