
December 2nd, 2012, 02:37 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 14
Time spent in forums: 4 h 9 m 22 sec
Reputation Power: 0
|
|
Okay, thanks for the last answer. It helped me alot. Now I'm facing a new problem which probably is not very difficult to solve. The thing is that I want the table to create a new row every third column. And in the columns I want the information link,tags,date. As for now, it creates a new row after every column, which is understandable according to my code below. I have thought about just using a for-loop, but that doesn't seem like the right thing to use in XSL. I've also looked into the xsl:for-each element, but can't solve it by myself.
Here is my updated code in the XSL-file. The PHP-code is still the same as before.
Code:
<xsl:template match="image">
<tr>
<td>
<xsl:copy-of select="link/*"/><br/>
<b>Tags: </b><xsl:value-of select="tags"/><br/>
<b>Added: </b><xsl:value-of select="date"/>
</td>
</tr>
</xsl:template>
|