<message-text>null<P toUpdate="1"><STRONG>Note</STRONG>:</P> <P>This is a test note.&nbsp; It links to <A href="http://www.kopent.com/vyzo">http://www.kopent.com/vyzo</A> ;</P> <P>&nbsp;</P> </message-text>
As expected. You'll have to do some reparsing. Because a lot of people subscribed to the bad idea of putting marked up text into DB strings and similar unfitting containers, you'll find some hints in the list archive.
Once you managed to get the text into proper XML, simply define templates for P, STRONG and A which re-serialize the elemen and add the desired representation:
<xsl:template match="P"> <P><xsl:apply-templates/></P> </xsl:template match="P">
<xsl:template match="STRONG">
<STRONG><fo:wrapper text-weigth="bold">
<xsl:apply-templates/>
</fo:wrapper></P>
</xsl:template match="P">etc. If you have more elements like P which don't require processing beyond serializing, you can generalize the template (your homework).
Alternatively, get Saxon 7, install it as your XSLT processor (could be as easy as removing the Xalan jar and adding the Saxon jar to WEB-INF/lib), then do use Saxon's extension function for parsing text as XML, roughly like <xsl:template match="message-text"> <xsl:apply-templates select="saxon:parse(.)" mode="embedded"/> </xsl:templates> Look up the exact function name and related issues in the Saxon docs. Not that this will bail out on non-well formed XML, for example on the in your sample, you probably have to double escape ampersands in the XSP. Use the templates sketched out above, but add mode="embedded" to all templates and apply-templates.
I still wonder why so many people have such a difficult time describing
their problems so that others can actually understand it. Why didn't you
mention that you insert a string with marked up text ("tags" in your
language) in your XSP, even after explicitly asked?J.Pietschmann
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
