loop i loop No. 2
Jeg har tidligere fået et rigtig godt svar på at få resultatet:1111;Surviving Christmas;12;Mike Mitchell;
1111;Surviving Christmas;13;Ben Affleck;Drew Latham
1111;Surviving Christmas;46;Christina Applegate;Alicia Valco
1111;Surviving Christmas;56;James Gandolfini;Tom Valco
2222;Dubie Film;644;Karoline Skuespil;Karolines Rolle
2222;Dubie Film;744;Jens Schauspil;Jens' Rolle
Fra XML'en:
<?xml version="1.0" encoding="ISO-8859-1"?>
<films>
<film>
<id>1111</id>
<title>Surviving Christmas</title>
<synopsis><![CDATA[Drew Latham, har ikke nogen familie, så i de ensomme juledage, overtaler en stakkels uvidende familie til at forestille HANS familie. Det skulle de aldrig have gjort]]></synopsis>
<directors>
<person>
<personid>12</personid>
<name>Mike Mitchell</name>
<role></role>
</person>
</directors>
<actors>
<person>
<personid>13</personid>
<name>Ben Affleck</name>
<role>Drew Latham</role>
</person>
<person>
<personid>46</personid>
<name>Christina Applegate</name>
<role>Alicia Valco</role>
</person>
<person>
<personid>56</personid>
<name>James Gandolfini</name>
<role>Tom Valco</role>
</person>
</actors>
<producers>
<person>
<personid>1451</personid>
<name>Betty Thomas</name>
<role></role>
</person>
<person>
<personid>1452</personid>
<name>Jenno Topping</name>
<role></role>
</person>
</producers>
<genre>Komedie</genre>
<originaltitle>Surviving Christmas</originaltitle>
<productionyear>2004</productionyear>
<cinemadate>2004-12-10</cinemadate>
<image1>billede4556.jpg</image1>
</film>
<film>
<id>2222</id>
<title>Dubie Film</title>
<synopsis><![CDATA[Dubie]]></synopsis>
<directors>
<person>
<personid>944</personid>
<name>Joe Instrukt</name>
<role></role>
</person>
</directors>
<actors>
<person>
<personid>644</personid>
<name>Karoline Skuespil</name>
<role>Karolines Rolle</role>
</person>
<person>
<personid>744</personid>
<name>Jens Schauspil</name>
<role>Jens' Rolle</role>
</person>
</actors>
<producers>
<person>
<personid>1244</personid>
<name>Ususla Ursus</name>
<role></role>
</person>
</producers>
<genre>Drama</genre>
<originaltitle>Dubie originalfilm</originaltitle>
<productionyear>2004</productionyear>
<cinemadate>2004-04-04</cinemadate>
<image1>billede4444.jpg</image1>
</film>
</films>
Via dette XLS:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="films/film"/>
</xsl:template>
<xsl:template match="film">
<xsl:apply-templates select="actors/person">
<xsl:with-param name="id" select="id"/>
<xsl:with-param name="title" select="title"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="person">
<xsl:param name="id"/>
<xsl:param name="title"/>
<xsl:value-of select="$id"/>;<xsl:value-of select="$title"/>;<xsl:value-of select="personid"/>;<xsl:value-of select="name"/>;<xsl:value-of select="role"/><xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
Jeg har også brug for at kunne vise resultatet på liste med hver film-id unik pr. række:
1111;Surviving Christmas;12;Mike Mitchell;13;Ben Affleck;Drew Latham;46;Christina Applegate;Alicia Valco;56;James Gandolfini;Tom Valco
2222;Dubie Film;644;Karoline Skuespil;Karolines Rolle;744;Jens Schauspil;Jens' Rolle
Hvordan gøres det?