W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2005

how to translate XML with XHTML-formatted element to FO

From: Magic Finger <magic.finger@gmx.de>
Date: Tue, 12 Apr 2005 20:35:09 +0200
Message-ID: <018101c53f8e$5cd07b40$c10ca8c0@Bozo>
To: <www-xsl-fo@w3.org>


how can I translate XML files (like the following), which contain
XHTML-formatted text in one element, to PDF using Apache FOP ?

  --- books.xml --->
    <AUTHOR>Walt Disney</AUTHOR>
    <TITLE>&lt;b&gt;Donald Duck - &lt;i&gt;The True Story&lt;/i&gt; 

    <AUTHOR>Matt Groening</AUTHOR>
    <TITLE>&lt;b&gt;Homer Simpson For President&lt;/b&gt;</TITLE>
  <--- books.xml ---

I mean how should an appropriate XSL stylesheet be designed best to handle
straight forward FO formatting for <AUTHOR> and <PRICE> as well as for
additional transformation of XHTML-formatted <TITLE> ?

I just need some general ideas on how I can process XML files with
sub-structured (XHTML-formatted) elements by one (or more) XSL

My problem is not to translate XHTML-formatted text to FO resp. PDF (for
this purpose I already have a working "xhtml-to-fo.xsl" stylesheet).
Rather I have no idea at the moment on how to integrate the existing
xhtml-to-fo.xsl code and templates into the main XSL stylesheet for
generating the FO output.

Currently I'm only able to translate content of <TITLE> element as plain
text to FO output, i.e. FO output for <TITLE> shows the tags <b>...</b> and
<i>...</i> as is, without applied bold and italic formatting on title text.

Any hints, tips or code fragments would be very much appreciated!

Best regards,
Received on Wednesday, 13 April 2005 00:54:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:29 UTC