This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

outputting a mixture of escaped and unescaped HTML.


Hello All,

I need to process some xml with attribute values that
may contain markup text like this:

<MEMO TEXT="Example:&lt;span
class=&apos;cs1&apos;&gt;...&lt;/span&gt;$crThis is a
new line..."/>

The original data value of the attribute comes from a
database in which CRLFs were replaced with the string
$cr.

I need to transform this into HTML that looks
something like this:

<div>Example:&lt;span
class=&apos;cs1&apos;&gt;...&lt;/span&gt;</br>This is
a new line...</div>

The problem I'm having is if I use something like:

<xsl:template match="MEMO">
  <xsl:value-of
select="foo:FormatMultiline(string(@TEXT))" 
disable-output-escaping="yes"/>
</xsl:template>

where foo:FormatMultiline() replaces $cr with </br>.

However, this results in all the escaped markup to
become "unescaped" when I want it to remain escaped
except for the <br/>.

Can anybody help?
Thanks

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]