This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Formatting CDATA information
- To: "'XSL-List at lists dot mulberrytech dot com'" <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Formatting CDATA information
- From: "Chan, Tina" <Tina dot Chan at msdw dot com>
- Date: Fri, 26 Jan 2001 12:35:35 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I am using an XSL stylesheet to format and XML document into an HTML
> document. In the XML document there is a CDATA tag as follows:
>
> <failure type="junit.framework.AssertionFailedError">
> <![CDATA[
> junit.framework.AssertionFailedError
> at
> junit.framework.Assert.fail(Assert.java:143)
> at
> junit.framework.Assert.assert(Assert.java:19)
> ]]>
> </failure>
>
> Here is my XSL:
>
> <xsl:template match="failure">
> <p>FAILURE INFO:</p>
> <xsl:value-of select="."/>
> </xsl:template>
>
> The problem is that when this gets converted to HTML all of the line
> breaks in the CDATA section are lost, and it becomes one long line. Is
> there a way to format what's inside the CDATA tag to have <br> after each
> line?
>
> Thanks.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list