Hallo,
ich möchte eine Bücherliste in XML per XSL ausgeben und dabei sortieren. So sieht die Liste in etwa aus:
<buchbestand>
<buch>
<titel>Titel 2</titel>
<autor>Autor 2</autor>
</buch>
<buch>
<titel>Titel 1</titel>
<autor>Autor 1</autor>
</buch>
<buch>
<titel>Titel 3</titel>
<autor>Autor 1</autor>
</buch>
</buchbestand>
Es gibt also zu jedem Buch einen Titel und einen Autor. Ich möchte diese Liste nun sortiert nach Autor und Titel ausgeben.
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="buchbestand"/>
</fo:flow>
<xsl:template match="buchbestand">
<xsl:apply-templates select="autor">
<xsl:apply-templates select="titel">
</xsl:template>
Wie binde ich nun xsl:sort so ein, dass nach Autor und nach Titel sortiert wird?
Servus
Bernd