Helg Bredow wrote:
Thanks for the quick reply Chris. I have written transforms from XML to
HTML in the past so it's not the writing that is the problem. Rather
it's the duplication of effort in writing one stylesheet for HTML output
and another for PDF output. The idea is to present a list of XSL
stylesheets to the user, they select one and then select their preferred
output format. Inefficiency here is not necessary a factor for us at the
moment but a more generic solution would be preferred. Currently,
without a HTML renderer, we can use the same stylesheet to output PDF,
PCL, RTF etc. but have to write a separate stylesheet to output HTML.
I might have a look at how hard it is to write a renderer for FOP and
see if it's worth implementing one myself.
Use an XSLT instead, roughly
fo:block -> xhtml:div
fo:inline, fo:wrapper -> xhtml:span
Styling attributes can be concatenated into a XHTML style
attribute in a simplistic manner. Peocess stuff like src
first, then
<xsl:attribute name="style">
<xsl:for-each select="@*">
<xsl:value-of select="name()"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="."/>
<xsl:text>; </xsl:text>
</xsl:for-each>
</xsl:attribute>
Mapping the FO source to the HTML result document set might
become interesting, unless you use a simple (but reasonable)
approach like fo:page-sequence -> one HTML document.
There ought to be a ready-to-use transformation out there,
some googling will help.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]