XSL - FOP Replace html tag from CDATA Node

30 Views Asked by At

While generating the xsl-fo, I'm trying to replace the html tags inside a CDATA node, but the template is not applying. I can see that if I remove the cdata from the node, then is applying fine.

How can I do to work keeping CDATA inside the node, because is necessary.

An example of the XML is:

<parentElement>
<Element1>
    <![CDATA[<strong>bold text here</strong> bla bla bla]]>
</Element1>
</parentElement>

The code in the fo is like this:

<xsl:apply-templates select="/parentElement/Element1" />

And the template for replacing the "bold" tags is:

<xsl:template match="strong">
    <fo:inline font-weight="bold">
        <xsl:apply-templates />
    </fo:inline>  
</xsl:template>

Im really stuck with this, any help wourl be appreciated. Thanks!

0

There are 0 best solutions below