xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Sancho <psancho....@gmail.com>
Subject Re: Read html content inside XML node and render this in PDF
Date Thu, 18 Sep 2014 09:39:34 GMT
Hi,

first, this is a pure XSLT related question. You should get better
answers on appropriate list (see [1]).

That said, you need to parse the text node nested in the CDATA section.

Basically, this is a 2 passes process:
 1- make a clean XML, without CDATA markup
     that can be done with:
     <xsl:value-of select="elt" disable-output-escaping="yes"/>
  2- transform the resulting XML as usual.

With Xalan, you can use the xalan:pipeDocument extension to perform
both stages in a single action (see [2]).

With Saxon, thee is the magic extension saxon:parse that makes the
whole job (see [3]).

Alternatively, XSLT processors may be extended with your own scripts,
then you can write your own to parse CDATA sections.


[1] http://www.mulberrytech.com/xsl/xsl-list/
[2] http://xml.apache.org/xalan-j/extensionslib.html#pipedocument
[3] http://www.saxonica.com/documentation9.4-demo/html/extensions/functions/parse.html

2014-09-17 10:57 GMT+02:00 sandeshchauhan <sandesh.chauhan@capgemini.com>:
> Hi,
>
> I have a XML file from which I am generating PDF. My XML file has multiple
> elements with CDATA which also contains html(list, table) contents.
>
> I would like to process these html content from CDATA and transform that as
> XSL-FO list and table. Could you please help with the approach?
>
> Sample XML file is as follows:
>
> <Contact-info>
>    sandesh@xyz.com
>    <address>
> </address>
> <phone></phone>
> </Contact-info>
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/Read-html-content-inside-XML-node-and-render-this-in-PDF-tp41223.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message