Monday 24 November 2008

I hate XSLT xsl:for-each!!!

I've spent almost an hour trying to find out what's wrong with this xslt file. All I needed was to display list of items each at new line. I've tried simple newlines, concatenated newline with "." in body of "value", added empty xsl:text elements with newline inside, tried 
, tried 
 - nothing worked!!! And these methods worked fine outside the xsl:for-each element, but inside it... Arghhhh! I tried to use xml:space="preserve" - It helped neither.

After all I started adding '\n' to each item I wanted to be at new line. Yes, it's not view-decoupled but it works and I know there will be no need to change xslt in way this change will break produced result.

P.S. I hate XSLT!!!!

No comments: