I'm importing XML into InDesign (with merge content mode) and using XSLT to pick specific XML elements from the XML file. Problem is that some of the text inside XML elements contain HTML entities (see the example below) which are converted as characters in Indesign and then show as HTML tags. I need to set correct character style for the text between HTML tags and remove the tags. I'm aware I can do this with GREP Find/Replace in InDesign after the XML import but is there a way I can do this already with XSLT? I'm guessing I should convert these HTML tags into XML elements so I can map character style to correct XML element in InDesign. Not sure if this is possible and how to do it. Or is there some other better way?
<TextElement>Just some random text with <b>HTML tags</b> within.</TextElement>
Text in InDesign:
Just some random text with <b>HTML tags</b> within.