views:

575

answers:

11

On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO.

My task was to get the script to deliver the documents and configure the CUPS print server and the Fax server, so I never had the time to get my hands dirty on XSL-FO.

I'm thinking of implementing something in the region that was made there but I'll need some templates to work with while testing.

Where can I find some good tutorials on XSL-FO, since the fop process I've mastered already?

A: 

This might not be exactly what you need, but if you just want to have some XSL-FO test templates, you can use this transformation in Word to generate XSL-FO.

The book that I used to learn is from O'Reilly (XSL-FO), because frankly there are very little resources on the subject.

Hans Doggen
Having templates is just a desired by-product of the learning process.
Gustavo Carreno
Sometimes it helps to see the results of the transformation, as it will add most properties to the FO elements. And it is easier to follow when you want to create tables. But I must admit, I write XSL-FO templates most of the time by hand.
Hans Doggen
+1  A: 

I think too that the O'Reilly book is going to be the only one, there isn't much about XSL-FO out there... Frankly I think it's a dead technology, it's just too complex for the average programmer to learn, it takes weeks - plus the good formatters out there are expensive as hell.

This is not an answer to your question, but if anyone would ask me, I'd advise against learning XSL-FO. It's a solutions searching for a problem IMO.

Roel
+2  A: 

First, before you buy a commercial engine, check out Apache FOP it is a pretty solid XSL-FO engine. I've used it extensively for "government" form generation.

If you're just getting started. W3schools is invaluable in learning XSL-FO: http://www.w3schools.com/xslfo/default.asp

If you're new to XSL, I highly recommend the list @ http://www.mulberrytech.com/xsl/xsl-list/index.html, even for just searching for common solutions to common problems.

Crad
+5  A: 

I like to refer people to this 2003 IBM developerWorks article: HTML to Formatting Objects (FO) conversion guide

I don't recommend using the provided .xsl to convert HTML to FO, but use the narrative to understand the different XSL-FO constructs and how they relate to HTML (which we all understand).

Kevin Hakanson
+1  A: 

http://www.w3.org/TR/xsl/

http://www.renderx.com/tools/xep.html has some good examples

http://my.safaribooksonline.com/0596003552

EthR
Thanks, I'll have a look at those!!
Gustavo Carreno
A: 

Personally I learn best by looking at examples. Use Google's CodeSearch.

Sugerman
+1  A: 

I think to be able to do xsl-fo well you need to get a solid grasp of several different technologies.

Firstly XSLT and XPath as you will be using these in the XSL-FO. There are some tools which allow you to visually create the xsl-fo but the ones I've seen are extremely expensive so I've tended to roll my own xslts as these end up much simpler than the generated xsl-fos.

Then you need a solid grasp of fop which it seems you already have but for anyone else if you are familiar with css most common stylings will be familiar to you but for the specific fop features it makes sense to do some research.

The best way to get into it is to take some basic examples amd play around with them. Here Apache FOP is a great open source processor which you can use for professional purposes if you know how to use it.

An editor like oxygen xml has in built fop support which makes it easy to quickly test your xsl-fo and should make it easier to learn xsl-fo but you can do the same thng from the command line and serveral other editors as well.

I'd recommend Michael Kays XSLT book as it's a great reference book for XSLT "XSLT: Programmer's Reference 2nd Edition" link

Also the FOP book by Dave Pawson is the best available XSL-FO reference book I know of although there is admittedly not much available. It's a bit out of date but it's a good reference for the core concepts and for someone starting out may make it less complex. link

His website is a greate source of tips for strange issues or improving your general understanding when it comes to xsl fo. http://www.dpawson.co.uk/xsl/index.html

Crocked
A: 

very good tutorial is here. Also http://www.w3schools.com/ can help you.

Thanks! It looks promising.
Gustavo Carreno
+2  A: 

You can also try a visual xsl-fo designer/editor. If you still want to write XSL by hand, take a look at XSL-FO tutorial from XML 1.1 Bible.

Peter Stroll
A: 

It appears to me that XSL-FO is too complicated, what alternative solutions exist out there to convert xml data into nicely designed report or brochures?

MMAMail.com
A: 

Here is also a good tutorial for newbies in XSL-FO.This document gives a quick, learn-by-example introduction to XSL Formatting Objects. http://www.renderx.com/tutorial.html

Tigran