You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Debasish Jana <de...@anshinsoft.com> on 2006/12/07 06:33:50 UTC
HTML Rendering
Hi:
Is it possible to render to HTML from XSL:fo documents? I guess, the current
supported rendering formats are PDF, RTF, TXT, and several image variants.
Please throw some light.
Regards,
Debasish Jana
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: HTML Rendering
Posted by Warren Young <wa...@etr-usa.com>.
Debasish Jana wrote:
>
> Is it possible to render to HTML from XSL:fo documents?
I'm sure FOP doesn't do this because it isn't really necessary. A tool
like FOP is only needed for translating XSL-FO into non-textual formats.
For translating XSL data like XSL-FO to a text format, like HTML, it's
best to use XSLT.
If your XSL-FO files are being generated automatically -- for example,
you're using DocBook, so the .fo file is created by an XSLT processor --
you may simply have an option to generate .html instead. If not, then I
would suggest creating such a stylesheet.
If you're not using DocBook, you really should give it a good hard look
before trying to reinvent the wheel. There are existing, free tools to
translate DocBook to well-formatted XSL-FO and HTML, and then you can go
from XSL-FO to the non-HTML formats you need.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: HTML Rendering
Posted by Potje rode kool <ev...@gmail.com>.
Thats a good idea I think. But I also want to add some code samples in my
documentation that I want to generate with fop. In those code examples I
want
to have linenumber but I don't want to manualy add them to make it easyer to
edit them but that shoudl not to be to hard to do with some
Java code to insert them.
Going to be a fun weekend. :D
2006/12/7, Daniel Noll <da...@nuix.com>:
>
> Potje rode kool wrote:
> > One reason to want to use .fo files and generate html is for
> documentation.
> > Then you could write you documentation in .fo files and generate from
> that
> > the documentation in different formats like html, pdf, etc.
>
> Honestly if I had to go one way or the other I would prefer to write the
> .html file and generate an .fo from it. The HTML will contain semantics
> which can't be expressed in XSL-FO.
>
> Daniel
>
>
> --
> Daniel Noll
>
> Nuix Pty Ltd
> Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 0699
> Web: http://nuix.com/ Fax: +61 2 9212 6902
>
> This message is intended only for the named recipient. If you are not
> the intended recipient you are notified that disclosing, copying,
> distributing or taking any action in reliance on the contents of this
> message or attachment is strictly prohibited.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
Re: HTML Rendering
Posted by Daniel Noll <da...@nuix.com>.
Potje rode kool wrote:
> One reason to want to use .fo files and generate html is for documentation.
> Then you could write you documentation in .fo files and generate from that
> the documentation in different formats like html, pdf, etc.
Honestly if I had to go one way or the other I would prefer to write the
.html file and generate an .fo from it. The HTML will contain semantics
which can't be expressed in XSL-FO.
Daniel
--
Daniel Noll
Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 0699
Web: http://nuix.com/ Fax: +61 2 9212 6902
This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: HTML Rendering
Posted by Peter <pc...@gmail.com>.
Putting the content within formatting independent markup is obviously the
right way.
But having a single layout language that could generate both html/css and
pdf would be nice as well (and not contradictory). I understand that given
the very different nature of the output there are a tremendous amount of
issues and competing interests involved.
But the problem of converting 'something' to both html and pdf is certainly
common enough.
To a certain extent things like http://www.re.be/css2xslfo/ seem to want to
address that.
Peter
> -----Original Message-----
> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com]
> Sent: Thursday, December 07, 2006 3:45 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: HTML Rendering
>
> Potje rode kool wrote:
>
> > One reason to want to use .fo files and generate html is for
> > documentation. Then you could write you documentation in .fo files and
> > generate from that the documentation in different formats like html,
> > pdf, etc.
> >
>
> Sorry I disagree. I think it makes more sense to write your
> documentation in pure XML which is independent of presentation and then
> apply a different XSLT depending on whether you need the Print or HTML
> version.
>
> Chris
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: HTML Rendering
Posted by Chris Bowditch <bo...@hotmail.com>.
Potje rode kool wrote:
> One reason to want to use .fo files and generate html is for
> documentation. Then you could write you documentation in .fo files and
> generate from that the documentation in different formats like html,
> pdf, etc.
>
Sorry I disagree. I think it makes more sense to write your
documentation in pure XML which is independent of presentation and then
apply a different XSLT depending on whether you need the Print or HTML
version.
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: HTML Rendering
Posted by Potje rode kool <ev...@gmail.com>.
One reason to want to use .fo files and generate html is for documentation.
Then you could write you documentation in .fo files and generate from that
the documentation in different formats like html, pdf, etc.
2006/12/7, Louis.Masters@log-net.com <Lo...@log-net.com>:
>
>
> Debasish:
>
> Just use a parser (Xerces) and transformer (Xalan) to convert your XML to
> HTML. The stylesheet is actually quite simple once you get the layout
> straight. For example, here is the main template for the stylesheet we use
> to convert our reports to HTML format:
>
> <xsl:template match="report">
> <html>
> <head>
> <title>
> LOG-NET Report - <xsl:value-of
> select="reportsubtitle"/>
> </title>
> </head>
> <style>
> TD.header {font-weight: bold; color:
> black}
> TD.normal {}
> </style>
> <body>
> <font face="Tahoma,Courier,Verdana,Arial"
> size="3">
> <div align="left" style="float:left;">
> <xsl:apply-templates select="logoURL"/>
> <br clear="left"/>
> <xsl:apply-templates
> select="reportheader"/>
> <br clear="left"/>
> <xsl:apply-templates
> select="versionInfo"/>
> <br clear="left"/>
> </div>
> <div align="center">
> <br clear="left"/>
> <xsl:apply-templates
> select="reporttitle"/>
> <br clear="left"/>
> <xsl:apply-templates
> select="reportcustomer"/>
> <br clear="left"/>
> <xsl:apply-templates
> select="reportsubtitle"/>
> <br clear="left"/>
> <xsl:apply-templates
> select="reportparms"/>
> </div>
> <br />
> <br />
> <xsl:apply-templates select="details"/>
> <br />
> <br />
> <div align="center" style="float:center;">
> <xsl:apply-templates
> select="logoCopyURL"/>
> </div>
> </font>
> </body>
> </html>
> </xsl:template>
>
> Primitive, but it works great. The only issue we are haiving it with SVG
> support, but that is currently a browser issue (at least in IE6 without a
> plugin). To get around it, we either leave out the images or convert the
> SVG to a raster format on the fly and embed the link.
>
> -Lou
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> LOG-NET, Inc.
> The Logistics Network Management System
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 230 Half Mile Road
> Third Floor
> Red Bank, NJ 07701
> PH: 732-758-6800
> FAX: 732-747-7497
> http://www.LOG-NET.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> CONFIDENTIAL & PRIVILEGED
> Unless otherwise indicated or if obvious from the nature of the content,
> the information contained herein is privileged and confidential
> information/work product. The communication is intended for the use of the
> individual or entity named above. If the reader of this transmission is not
> the intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited. If
> you have received this communication in error, please notify the sender
> immediately by telephone (732-758-6800) or by electronic mail (
> postmaster@LOG-NET.com), and destroy any copies, electronic, paper or
> otherwise, which you may have of this communication. Thank you.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> "Debasish Jana" <de...@anshinsoft.com> wrote on 12/07/2006 12:33:50
> AM:
>
> > Hi:
> >
> > Is it possible to render to HTML from XSL:fo documents? I guess, the
> current
> > supported rendering formats are PDF, RTF, TXT, and several image
> variants.
> >
> > Please throw some light.
> >
> > Regards,
> >
> > Debasish Jana
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
>
Re: HTML Rendering
Posted by je...@atol.si.
As far as I know (I've never do it actually) Xalan can do that. You have
to use a proper xslt stylesheet. You can read more about it here:
http://xml.apache.org/xalan-j/
It is also possible to use browser built in processor to transform your
xml to xhtml. You can read more about it here:
http://www.w3schools.com/xsl/xsl_transformation.asp
I will also need this feature soon, so please do follow up on what you
discovered.
Jelka
"Debasish Jana" <de...@anshinsoft.com>
07.12.2006 06:33
Please respond to
fop-users@xmlgraphics.apache.org
To
<fo...@xmlgraphics.apache.org>
cc
Subject
HTML Rendering
Hi:
Is it possible to render to HTML from XSL:fo documents? I guess, the
current
supported rendering formats are PDF, RTF, TXT, and several image variants.
Please throw some light.
Regards,
Debasish Jana
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: HTML Rendering
Posted by Lo...@log-net.com.
Debasish:
Just use a parser (Xerces) and transformer (Xalan) to convert your XML to
HTML. The stylesheet is actually quite simple once you get the layout
straight. For example, here is the main template for the stylesheet we
use to convert our reports to HTML format:
<xsl:template match="report">
<html>
<head>
<title>
LOG-NET Report - <xsl:value-of
select="reportsubtitle"/>
</title>
</head>
<style>
TD.header {font-weight: bold; color:
black}
TD.normal {}
</style>
<body>
<font face="Tahoma,Courier,Verdana,Arial"
size="3">
<div align="left" style="float:left;">
<xsl:apply-templates select="logoURL"/>
<br clear="left"/>
<xsl:apply-templates
select="reportheader"/>
<br clear="left"/>
<xsl:apply-templates
select="versionInfo"/>
<br clear="left"/>
</div>
<div align="center">
<br clear="left"/>
<xsl:apply-templates
select="reporttitle"/>
<br clear="left"/>
<xsl:apply-templates
select="reportcustomer"/>
<br clear="left"/>
<xsl:apply-templates
select="reportsubtitle"/>
<br clear="left"/>
<xsl:apply-templates
select="reportparms"/>
</div>
<br />
<br />
<xsl:apply-templates select="details"/>
<br />
<br />
<div align="center" style="float:center;">
<xsl:apply-templates
select="logoCopyURL"/>
</div>
</font>
</body>
</html>
</xsl:template>
Primitive, but it works great. The only issue we are haiving it with SVG
support, but that is currently a browser issue (at least in IE6 without a
plugin). To get around it, we either leave out the images or convert the
SVG to a raster format on the fly and embed the link.
-Lou
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOG-NET, Inc.
The Logistics Network Management System
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 Half Mile Road
Third Floor
Red Bank, NJ 07701
PH: 732-758-6800
FAX: 732-747-7497
http://www.LOG-NET.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIDENTIAL & PRIVILEGED
Unless otherwise indicated or if obvious from the nature of the content,
the information contained herein is privileged and confidential
information/work product. The communication is intended for the use of the
individual or entity named above. If the reader of this transmission is
not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please
notify the sender immediately by telephone (732-758-6800) or by electronic
mail (postmaster@LOG-NET.com), and destroy any copies, electronic, paper
or otherwise, which you may have of this communication. Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Debasish Jana" <de...@anshinsoft.com> wrote on 12/07/2006 12:33:50
AM:
> Hi:
>
> Is it possible to render to HTML from XSL:fo documents? I guess, the
current
> supported rendering formats are PDF, RTF, TXT, and several image
variants.
>
> Please throw some light.
>
> Regards,
>
> Debasish Jana
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>