W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2007

Re: Transforming XSL-FO

From: Jeremias Maerki <dev@jeremias-maerki.ch>
Date: Sat, 14 Apr 2007 10:21:21 +0200
To: www-xsl-fo@w3.org
Message-Id: <20070414101518.DAC9.DEV@jeremias-maerki.ch>

You cannot achieve this at any point during the XSLT stage or with
XSL-FO itself. With FOP 0.93, you can render the document to the
so-called area tree XML format (-at instead of -pdf on the command-line)
which is simply a dump of FOP's area tree to XML. That doesn't get you
x/y coordinates, though, except if you do some calculations. If you're
working with FOP 0.20.5 you can output SVG but there you have a similar
problem. You won't know exactly where an element will be located before
you actually paint it and take all circumstancial coordinate system
transformations into account. For FOP 0.93 SVG output hasn't been
restored, yet.

I don't think there's an easy way to do what you want to do. Maybe you
should state what the overall use case is, because you're already
talking about a technical solution, but maybe there are other approaches
I can't see because I don't have enough information.


On 10.04.2007 23:11:49 surkrish79 wrote:
> Hi,
> I have a requirement where in i need to extract the structure information
> like x,y co-ordinates from XSL-FO.
> Is this possible with a single XSL style sheet or should i extend FOP to
> achieve this. Is this recommended?
> I also came across another format called SVG which can be obtained using
> apache FOP. Is this is a standard format that represents data + structure
> with x,y co-ordinates? 
> Any suggestion would be gr8.
> Thanks,
> Suresh.

Jeremias Maerki
Received on Saturday, 14 April 2007 08:20:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:04 UTC