java - Escaped HTML in XML node via XSLT into XSL-FO -


i have document has generated pdf. use xalan , apache fop processing xml xslt xsl-fo.

in xml tree there node this:

<root>     <formula>         <text>3+10*10^-6*l</text>         <html>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;3 &middot; + 10 &middot; 10&lt;sup&gt;-6&lt;/sup&gt; ยท &lt;i&gt;l&lt;/i&gt;&lt;/html&gt;</html>     </formula>      </root> 

how can not proper html (by using disable-output-escaping="yes") node-set (exsl:node-set?) can process later on? mean, want xsl-fo representation of html formula in order integrate pdf output.

something like

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

there may solution using saxon:parse(). however, cannot switch xalan-j.

is there solution in scenario?

you can write 1 stylesheet process xalan does

<xsl:template match="html">   <xsl:value-of select="." disable-output-escaping="yes"/> </xsl:template> 

which creates serialized result document xhtml markup.

a second stylesheet process result document of first stylesheet e.g.

<xsl:template match="xhtml:html" xmlns:xhtml="http://www.w3.org/1999/xhtml">   <xsl:apply-templates/> </xsl:template> 

but can't within 1 stylesheet result tree fragment doe (disable-output-escaping) serialization feature , if work result tree fragments converted node set of exsl:node-set or similar within 1 stylesheet there no serialization happening.

looking closer, snippet seems contain references undeclared entities &middot; think sample not parse xml @ need fix first xslt processing.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -