XSL 2.0 unparsed text and formatting
- by Maha
I want the unparsed text to be formatted for bold characters or increase font-size based on the tag the example here is for replace the searched word with bold characters
Example:
test <b> how to <b> when bold <b> when there is more <b> than one place to bold
Can you please advice what is wrong here?
<xsl:variable name="tcline" select="unparsed-text('generic_tc.txt','UTF-8')"/>
<xsl:analyze-string select="$tcline" regex="\'<b>'(.*?)\'<b>'">
<xsl:matching-substring>
<xsl:value-of select="replace($tcline,'\"<b>"(.*?)\"<b>"','<em>$1\/em/g;')"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>