This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Large Text to Output without escape characters
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Large Text to Output without escape characters
- From: "Carlos Fragoso Mariscal" <cfragoso at terra dot es>
- Date: Thu, 6 Sep 2001 03:26:33 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi to everyone,
Firstly, thnx to all of those who answered my
previous question.
Now, I have another problem and I think I know
the solution but I don't know how to implement it.
I want to output a large text, specifically an
e-mail body, in an XML file like this:
<mail>
<from>From</from>
<to>To</to>
<subject>subject</subject>
<textBody>
Here goes a Java instruction to output
the e-mail body. So here goes the body
of the message as it is, with any
character, included those who are
reserved to XML (&,@,etc).
</textBody>
</mail>
So, I have read so many mail threads about
the & substitution to &, and I think
that's clear.
But, what happens when you've got an xml
file with a large text without escape
characters?!? Which is the best solution
to output that text?
I thought to put a CDATA on the textBody like this
<textBody>
<![CDATA[ ]]>
</textBody>
and then when the xsl:template that matches
textBody do a
<xsl:text><xsl:value of select='.'></xsl:text>
If I output the value between xsl:text then I should
have the output text escaped.
The problem is that the xsl:value of does'nt work,
what Xpath expression do i need?
Thank you in advance,
sorry about the length of the topic.
-----------------------------------
Carles Fragoso i Mariscal
Supercomputing Center of Catalonia
Communications & Operations Dept.
<cfragoso@cesca.es> +34932056464
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list