ThomasM: gleiche tags

Beitrag lesen

Hallo C-One,

Außerdem möchte ich sie aufzählen, was bedeutet, dass ich sie mit einem Komma ausgeben möchte (author1, author 2, ...).

Ansatz:

<xsl:template match="publication">  
  <xsl:apply-templates select="author"/>  
</xsl:template>  
  
<xsl:template match="author">  
  <xsl:value-of select="."/>  
  <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>  
</xsl:template>

Grüße,
Thomas