tags:

views:

33

answers:

1

I need to tranform a basic xml file into a FO file using xsl.

The xml looks like this :

<?xml version="1.0"?>
<column-chart-stacked-full>
    <title>Provincie Antwerpen</title>
    <x-axis-title>Gasmeters</x-axis-title>
    <y-axis-title>Verbruik</y-axis-title>
    <clusters>
        <cluster number="1">
            <bar>
                <value>210</value>
            </bar>
            <bar>
                <value>20</value>
            </bar>
        </cluster>
        <cluster number="2">
            <bar>
                <value>20</value>
            </bar>
            <bar>
                <value>30</value>
            </bar>
        </cluster>
...
A: 

What are you expecting to get out? A table? Or do you actually expect a diagram? If it is the latter, then you will be disappointed by FO, since it will not be able to produce anything like it. XSL-FO is about formatted text, not about graphics; for that you will need something else. SVG comes to mind.

If all you want is to turn the above into a table, then I suggest you target XSL-FO tables by going through DocBook. XSL-FO is pretty low-level. DocBook is much more high-level. With DocBook, you can just rely on all of the work that has been done to go from DocBook to XSL-FO, without having to worry about it yourself.

Wilfred Springer