XSLT - display child elements in a row

Reversanumrevs

New Member
I have the following XSLT code that displays movie information from a local XML file (title, actors, runtime, etc.) and Amazon API product information(product title and picture) from external amazon xml.\[code\]<xsl:variable name="moviesXML" select="document('movies.xml')"/><xsl:variable name="inputRoot" select="/"/><xsl:param name="movieID"/><xsl:template match="/"> <html> <head> <title>Movie details</title> </head> <body> <xsl:for-each select="$moviesXML/movies/movie[@movieID=$movieID]"> <xsl:value-of select="title" /> <xsl:value-of select="actors" /> ... <xsl:apply-templates select="$inputRoot/aws:ItemLookupResponse/aws:Items/aws:Item/aws:ItemAttributes/aws:Title"/> <xsl:apply-templates select="$inputRoot/aws:ItemLookupResponse/aws:Items/aws:Item/aws:MediumImage/aws:URL"/> </xsl:for-each> </body> </html></xsl:template><xsl:template match="aws:Title"> <xsl:value-of select="." /> <br/></xsl:template><xsl:template match="aws:URL"> <img src="http://stackoverflow.com/questions/15905494/{.}"/> <br/></xsl:template>\[/code\]So based on the movieID that was passed from the previous page, the code above displays all the relevant information to that specific movie.I use Amazon API to display two products for each movie (DVD and BluRay product).The problem I have is that my XSLT displays both Amazon product titles at once and then displays both pictures at once. But what I want is to displayAmazon product title + picture (DVD), and then another Amazon product title + picture (BluRay).This is the output that I get:
JzC9V5Q.jpg
And this is what I want to achieve:
Abagcsq.jpg
 
Top