I have an XML file and I'd like to convert it to a text output with XSLT.
Consider the following:
<subject> Re: XSLT Help!! </subject>
<body>Can you guys help me out???</body>
I'd like to have this in the following format in text!
Re: XSLT Help!!
Can you guys help me out???
My limited knowledge of XSLT can only output the data in a single line.
Can someone advice as to how I'd be solving the problem????
Use the <xsl:text> tag to insert additional spacing into your generated text file. For example, the following would insert a line break:
You can also consider to take a look at FOP Apache project. They have inplementation of XML formatting - FO
As said before the most easy job is to put <xsl:text>
FOP is not really required for this simple job but to generate other output formats like PDF probably FOP would help.
Can someone advice as to how I'd be solving the problem?Well, you might want to try RTFM. If that doesn't work, get a job at Burger King.