|  | Stylesheet |
<xsl:stylesheet version="1.0">
<xsl:key name="author" match="//c:author" use="@id"/>
<xsl:template match="c:author" name="c-author">
<xsl:param name="autid"><xsl:value-of select="."/></xsl:param>
<xsl:for-each select="$authorlist">
<xsl:variable name="aut" select="key('author', $autid)"/>
<xsl:choose>
<xsl:when test="$aut">
<xsl:choose>
<xsl:when test="$aut/c:fullname">
<xsl:apply-templates select="$aut/c:fullname"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$aut/c:firstname"/>
<xsl:text/>
<xsl:apply-templates select="$aut/c:surname"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<font color="red"><u><xsl:value-of select="$autid"/></u></font>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template match="c:surname|c:firstname|c:initials|c:fullname">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet> auth.xsl |