[xsl] Problem with embeded XHTML in an XML file and transformation to XSL:FO

Subject: [xsl] Problem with embeded XHTML in an XML file and transformation to XSL:FO
From: Luuk Jansen <subscribe@xxxxxxxxxxxxxxxxx>
Date: Sat, 12 Aug 2006 11:12:22 +0100
I have a problem with the following, and breaking my head over it the
last couple of days.

I have the content element as seen below in a xml document which has to
be transformed to a PDF. That is no problem with the Apache FOP and I
have almost everything working except the view parts that use the XHTML.

How do I create a template that can transfer the XHTML code to XSL:FO
code on the fly (preserving layout etc). I tried importing the
xhtml2fo.xsl sheet into the general style sheet and then call
apply-templates inside the content element, but that doesn't work, I
guess because the tags are not correct (as in &lt;).

The resulting PDF document shows the HTML perfect (with <HTML> etc.).

I was trying to apply-templates to the code and then put it in a
variable on which the xhtml2fo.xsl template can be applied, but FOP
crashed on that try.

Does anybody have any suggestion?

Thanks a million in advance,
Regards,

Luuk

_____________

A small snip of the embedded code is (I replaced the text):

<Content Version="1.0"
type="XHTML">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p
class="MsoNormal" style="margin-top: 6pt; text-align: justify;
text-indent: 21.25pt; font-family: times new roman;"&gt;&lt;font
size="3"&gt;&lt;span style="font-size: 12pt;"&gt;

&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="margin-top: 6pt; text-align: justify;
text-indent: 21.25pt; font-family: times new roman;"&gt;&lt;font
size="3"&gt;&lt;span lang="EN-GB" style="font-size: 12pt;"&gt;bla bla
bla bla bla
&amp;#945;2-bla bla bla bla bla &amp;#945;2-bla bla bla bla
bla.&lt;/span&gt;&lt;span style="font-size:
12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;


&lt;p class="MsoNormal" style="margin-top: 6pt; text-align: justify;
text-indent: 21.25pt; font-family: times new roman;"&gt;&lt;font
size="3"&gt;&lt;span lang="EN-GB" style="font-size:
12pt;"&gt;&amp;#945;2-bla bla bla bla bla
&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size: 12pt;"&gt;&lt;font
size="3"&gt;&lt;span style="font-size: 12pt;" lang="EN-GB"&gt;receptors'
&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;span
lang="EN-GB" style="font-size: 12pt;"&gt;groups.&lt;/span&gt;&lt;span
style="font-size:
12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/body&gt;&lt;/html&gt;</Content>

__________

-- 
____________________________________

Luuk Jansen
Angelo Systems
http://www.angelosystems.com
____________________________________

Current Thread