Add a linebreak in an HTML table via XSL

Unfids

New Member
I transform an XML file to HTML via XSL. In my html-table I have a column where I need to break the cell's content to a new line for each entry in one of my xml element-tags. I'm not sure how to set up the xml-file for this.Here's the output I was thinking of for my html-file:\[code\]<info>line1<br/>line2<br/>line3<br/>line4</info>\[/code\]and what doesn't work for me on the xsl-part:\[code\] <td> <xsl:for-each select="info"> <xsl:value-of select="." /> <br/> </xsl:for-each> </td>\[/code\]I've tried wrapping the lines in the xml with \[code\]<ul>\[/code\] and \[code\]<li>\[/code\] but that didn't work. I think it's the xsl-part where I have the error. If I put a \[code\]<br/>\[/code\] after the value-of statement it will output everything and then add the \[code\]<br/>\[/code\] but of course I want the \[code\]<br/>\[/code\] for each entry.I hope you can tell me of a way how to set this up correctly.Thanks a lot!
 
Back
Top