I'll start with the code.
<xsl:template match="//review">
<xsl:for-each select="app">
<div class="container">
<div class = "jumbotron">
<div class="content">
<p>
<h2>
<xsl:apply-templates select="./name"/>
</h2>
</p>
<p>
<strong>Information: </strong>
<xsl:apply-templates select="./information"/>
</p>
<p>
<strong>Price:</strong>
<xsl:value-of select="./price"/>
</p>
<p>
<strong>Opinion:</strong>
<xsl:value-of select="./opinion"/>
</p>
<p>
<strong>Rating:</strong>
<xsl:value-of select="./rating"/>
</p>
<p>
<xsl:element name="a">
<xsl:attribute name="href">InfoServlet?name=<xsl:value-of select="./name"/></xsl:attribute>
View in slideshow format.
</xsl:element>
</p>
</div>
</div>
</div>
</xsl:for-each>
<div class="jumbotron">
<div class="content">
<p>
<a class="learn-more" role="button">
Click here for project details.
</a>
</p>
<p class="first">
</p>
</div>
</div>
</xsl:template>
Now this is what that code outputs: http://ift.tt/16c9QX7
Why is the "Click here for project details", printed multiple times when outside of the loop? I want it to be that the "Click here for project details", is in it's on Jumbotron at the very end of the page. I can't see why it's getting put out multiple times, especially when outside of the loop.
No comments:
Post a Comment