I am inheriting support for an app that has XSLT in it, and I have not yet had any XSLT experience or training. I'm trying to do "a quick fix" and have been fumbling around. I've been introduced to the XSLT document but understand very little of the constructs and language.
I need to insert a new line character into the output of our XSLT, which is another XML document. I've tried inserting it via the code below but it's not working. I just changed it to add the '\n' character (I'm a Java developer), the larger structure with the variable and 'value-of's were already there.
I did some searching for this and found one site that suggested doing
Code:
<xsl:text>#xa;</xsl:text>
to output a newline character, but I don't know how to integrate that into the 'xsl:value-of' code below, which appears to be used to build a the comments variable.
What they're doing is dumping a bunch of excess data into this 'Comments' field, which is displayed in a <textArea> at some point, and they want it formatted better, with new lines for each new data field that was dumped into this Comments area. I know it sounds stupid; there are many kludgy, stupid requirements about this project it's driving me crazy.
Code:
<xsl:variable name="CommentsVar">
<xsl:value-of select="'Reported by the agent..'"/>
<xsl:value-of select="'\n'"/>
I'd appreciate any help. Thanks