On Apr 21, 2008, at 11:45, javijava wrote:

Hi


I'm interested in use this usefull tool , i need to translate HTML from my database to output files ,like PDF ... I want to know if i can put .FO files in the database with the typical head tags of .fo files and... the body
 with HTML embedded tags directly.  is this possible?

Not directly. If your source document still contains XHTML elements, those can be transformed to FO by means of XSLT.

For example:

If you have:

<b>text in bold</b>

This should be transformed into something like

<fo:wrapper font-weight="bold">text in bold</fo:wrapper>

via an XSL template like:

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

before FOP can do anything with it.

You can still store it in your database as HTML and transform the tag/ element upon retrieval, but it's important to keep in mind that FOP does not deal with HTML directly as input.

There are some stylesheets available to convert generic XHTML to XSL- FO. Just google around for 'HTML FO' and you'll get the idea.


HTH!

Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to