XML FO and PDF's?

S

Simon Harvey

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
 
O

Oleg Tkachenko

Simon said:
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).
 
S

Simon Harvey

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
 
O

Oleg Tkachenko

Simon said:
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#section-N629-Introduction-and-Overview
 
H

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 said:
Simon said:
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#section-N629-Introduction-and-Overview
 
S

Simon Harvey

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
 
E

Eliza Zadura

Oleg Tkachenko said:
Simon said:
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#section-N629-Introduction-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
 
O

Oleg Tkachenko

Eliza said:
"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/...63-8e19-4054-b599-70371b6cc2b4&displaylang=en
 
R

Rob Tweed

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

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
---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top