469,292 Members | 1,310 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,292 developers. It's quick & easy.

XML FO and PDF's?

Hi there everyone,

Am I right in thinking that you have to use XML:FO in order to make PDF
files out of xml files? If this is the case then can someone explain why you
have to use this other technology instead of just using XSL.

For making HTML pages, I just use XSL, after all, it has been touted as the
solution to all our presentation woes. But if this is the case, why then
does pdf require this other technology, and what exactly does it do?

I havent been able to get a useful answer to this simple question yet.

I'm really hoping someone can help

Many thanks
Kind Regards

Simon
Jul 20 '05 #1
8 10889
Simon Harvey wrote:
Am I right in thinking that you have to use XML:FO in order to make PDF
files out of xml files? If this is the case then can someone explain why you
have to use this other technology instead of just using XSL.

For making HTML pages, I just use XSL, after all, it has been touted as the
solution to all our presentation woes. But if this is the case, why then
does pdf require this other technology, and what exactly does it do?

Yes, pdf is a horse of another color. It's not SGML-based format (like XML and
HTML).

--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Jul 20 '05 #2
Hi Oleg,

Could you or anyone else elaborate on that a bit more. I thought that xsl
was the technology needed to do conversions. Why can it do html but not pdf.
How does FO relate to xsl?

Thanks

Simon
Jul 20 '05 #3
Simon Harvey wrote:
Could you or anyone else elaborate on that a bit more. I thought that xsl
was the technology needed to do conversions. Why can it do html but not pdf.
How does FO relate to xsl?


First of all let's make a difference between XSL and XSLT. As per W3C
recommendations, XSL = XSL Transformations (XSLT) + XSL-FO vocabulary.
XSLT is XML transformation language, with predefined XML, HTML and text output
formats. HTML case is simple - due to ubiquitous web browsers it's just simple
XML to HTML transformation, XML -> transformation -> HTML.
But because pdf is binary non-markup-based data format it's unfeasible to
generate pdf with XSLT (may be only simplest pdf documents). That's by design,
recall XSLT is *XML* transformation language.
So, they have created XSL-FO (another descendant of DSSSL, which was (and it
is) actually XPath+XSLT+XSL-FO all in one). The idea of XSL is to allow to
produce high-quality document presentation (usually printed one) by expressing
presentation semantics in XSL-FO and then formatting XSL-FO to actual
device-specific presentation, see [1]. So there is one more player in this
scenario - XSL-FO formatter, which formats (and sometimes renders) XSL-FO.
Usual scenario is XML -> transformation -> XSL-FO -> formatter -> pdf. But
that's not only scenario. Having GUI-based formatter like AntennaHouse XSL
formatter it can be XML -> transformation -> XSL-FO -> screen. Otherwise it's
possible to XML -> transformation -> XSL-FO -> formatter -> printer. Another
interesting new approach could be
XML -> transformation -> XSL-FO -> transformation -> WordML document (for
Microsoft Word 2003).

[1] http://www.w3.org/TR/xsl/slice1.html...n-and-Overview
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Jul 20 '05 #4
Han
Let me shorten Oleg's nice explanation.

You can use XSLT to transform XML into HTML. By the same token, you can use
XSLT to transform XML into XSL-FO. XSL-FO and HTML are same in that both are
final output, not intermediate transformation technology.

Temporarily XSL-FO document can be formatted to be viewed/printed as PDF,
EPS, and non-major browser. More than that in the future. Even sound is one
of the important standards of XSL-FO.

--
Please send me lots of spams. I'm testing my message rule blocking spams.
"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:O0**************@TK2MSFTNGP10.phx.gbl...
Simon Harvey wrote:
Could you or anyone else elaborate on that a bit more. I thought that xsl was the technology needed to do conversions. Why can it do html but not pdf. How does FO relate to xsl?
First of all let's make a difference between XSL and XSLT. As per W3C
recommendations, XSL = XSL Transformations (XSLT) + XSL-FO vocabulary.
XSLT is XML transformation language, with predefined XML, HTML and text

output formats. HTML case is simple - due to ubiquitous web browsers it's just simple XML to HTML transformation, XML -> transformation -> HTML.
But because pdf is binary non-markup-based data format it's unfeasible to
generate pdf with XSLT (may be only simplest pdf documents). That's by design, recall XSLT is *XML* transformation language.
So, they have created XSL-FO (another descendant of DSSSL, which was (and it is) actually XPath+XSLT+XSL-FO all in one). The idea of XSL is to allow to
produce high-quality document presentation (usually printed one) by expressing presentation semantics in XSL-FO and then formatting XSL-FO to actual
device-specific presentation, see [1]. So there is one more player in this
scenario - XSL-FO formatter, which formats (and sometimes renders) XSL-FO.
Usual scenario is XML -> transformation -> XSL-FO -> formatter -> pdf. But
that's not only scenario. Having GUI-based formatter like AntennaHouse XSL
formatter it can be XML -> transformation -> XSL-FO -> screen. Otherwise it's possible to XML -> transformation -> XSL-FO -> formatter -> printer. Another interesting new approach could be
XML -> transformation -> XSL-FO -> transformation -> WordML document (for
Microsoft Word 2003).

[1] http://www.w3.org/TR/xsl/slice1.html...n-and-Overview --
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Jul 20 '05 #5
Thanks guys, especially Oleg for taking the time to explain that. Thats just
what I needed so thanks again.

One thing I'm not sure about. Is the need for FO in addition to xsl based in
the fact that PDF's are a binary format and html (or more accurately, xhtml)
are markup technologies like xml. Indeed xhtml is actually valid xml which
is of course the point. Would it be as simple as XSL - markup, FO - binary?
or is that an over simplification.

Are there FO's that can be used to create other doc types?

Thanks again guys

Simon
Jul 20 '05 #6
Oleg Tkachenko <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message news:<O0**************@TK2MSFTNGP10.phx.gbl>...
Simon Harvey wrote:
Could you or anyone else elaborate on that a bit more. I thought that xsl
was the technology needed to do conversions. Why can it do html but not pdf.
How does FO relate to xsl?


First of all let's make a difference between XSL and XSLT. As per W3C
recommendations, XSL = XSL Transformations (XSLT) + XSL-FO vocabulary.
XSLT is XML transformation language, with predefined XML, HTML and text output
formats. HTML case is simple - due to ubiquitous web browsers it's just simple
XML to HTML transformation, XML -> transformation -> HTML.
But because pdf is binary non-markup-based data format it's unfeasible to
generate pdf with XSLT (may be only simplest pdf documents). That's by design,
recall XSLT is *XML* transformation language.
So, they have created XSL-FO (another descendant of DSSSL, which was (and it
is) actually XPath+XSLT+XSL-FO all in one). The idea of XSL is to allow to
produce high-quality document presentation (usually printed one) by expressing
presentation semantics in XSL-FO and then formatting XSL-FO to actual
device-specific presentation, see [1]. So there is one more player in this
scenario - XSL-FO formatter, which formats (and sometimes renders) XSL-FO.
Usual scenario is XML -> transformation -> XSL-FO -> formatter -> pdf. But
that's not only scenario. Having GUI-based formatter like AntennaHouse XSL
formatter it can be XML -> transformation -> XSL-FO -> screen. Otherwise it's
possible to XML -> transformation -> XSL-FO -> formatter -> printer. Another
interesting new approach could be
XML -> transformation -> XSL-FO -> transformation -> WordML document (for
Microsoft Word 2003).

[1] http://www.w3.org/TR/xsl/slice1.html...n-and-Overview


"Another interesting new approach could be XML -> transformation ->
XSL-FO -> transformation -> WordML document (for Microsoft Word
2003)."

That would be just what I need! Do you have any information regarding
this kind of procedure (is it even feasible?) Any links/resources
regarding this you could point me towards would be greatly
appreciated!

Eliza Zadura
Trainee-Developer
Jul 20 '05 #7
Eliza Zadura wrote:
"Another interesting new approach could be XML -> transformation ->
XSL-FO -> transformation -> WordML document (for Microsoft Word
2003)."

That would be just what I need! Do you have any information regarding
this kind of procedure (is it even feasible?) Any links/resources
regarding this you could point me towards would be greatly
appreciated!


I'm still investigating this approach aka learning WordML schema.
Well, resources... XSL-FO is well documented, and WordML - you can download
Word 2003 CDK to get WordML XML Schema. Additionally MSFT guys has posted
WordML2HTML stylesheet [1] some time ago, it can be useful also.
btw, what's your use case?

[1]
http://www.microsoft.com/downloads/d...displaylang=en
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Jul 20 '05 #8
You may want to have a look at a live demo of XSL-FO => PDF in action,
in this case the XSL-FO being created programmatically through the
eXtc XML technology (www.mgateway.com)

For the demo : www.mgateway.com/pdfsvg.htm

The idea here is to demonstrate the role of XSL-FO/PDF for creating
precisely laid out documents within web applications - precise page
layout for printing (eg labels, official forms, invoices) is not
practical via the browser.

Rob

On Sun, 27 Jul 2003 19:10:56 +0100, "Simon Harvey"
<sh856531@microsofts_free_emal_service.com> wrote:
Thanks guys, especially Oleg for taking the time to explain that. Thats just
what I needed so thanks again.

One thing I'm not sure about. Is the need for FO in addition to xsl based in
the fact that PDF's are a binary format and html (or more accurately, xhtml)
are markup technologies like xml. Indeed xhtml is actually valid xml which
is of course the point. Would it be as simple as XSL - markup, FO - binary?
or is that an over simplification.

Are there FO's that can be used to create other doc types?

Thanks again guys

Simon


---
Rob Tweed
M/Gateway Developments Ltd

Global DOMination with eXtc : http://www.mgateway.tzo.com
---
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Paul Kuebler | last post: by
5 posts views Thread by Ray Booysen | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.