XQuery/Converting HTML tables to XSL-FO tables

< XQuery

Motivation

You have a collection of HTML tables that you want to convert to PDF.

Method

We will use an XQuery typeswitch transformation that will convert the key table elements (table,thead,tr,th,db,tbody) to the corresponding XSL-FO elements.

Sample Main Dispatcher

We will create an XQuery module with the following functions:

To transform the table the following will be used:

  let $fo-table := html-2-fo:main($html-table);

The main function of the

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.