hi
i'm using xsl today, and i wanted to add additional support given in xsl-fo, by adding xmlns:fo="
http://www.w3.org/1999/XSL/Format" under <xsl:stylesheet wasn't enough, because <fo> tags are being ignored.
I'm opening the output (htm) in internet explorer and don't see the xsl-fo influence (no table in this example).
I only see the followng: SunMoonEarth. seems like only <xsl> tags are working for me.
What is need to be done so xsl-fo will work for me?
i took the example from of questions here:
xml:
<Employee>
<Name>Sun</Name>
<Name>Moon</Name>
<Name>Earth</Name>
</Employee>
xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:fo="
http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<fo:root xmlns:fo="
http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="29.7cm"
page-width="21cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
<fo:region-before extent="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body
">
<fo:table-and-caption>
<fo:table>
<fo:table-body>
<xsl:for-each select="Employee/Name">
<fo:table-row>
<fo:table-cell>
<fo:block> <xsl:value-of select="."/> </fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Start Free Trial