body-region 中的两个相邻表,每个表有两列(xsl-fo) [英] two adjacent tables in body-region each with two columns(xsl-fo)

查看:14
本文介绍了body-region 中的两个相邻表,每个表有两列(xsl-fo)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

xml 文档

<?xml version="1.0" encoding="ISO-8859-1" ?>
<NVELOPE>
    <PAYSTITLE>No. of Days</PAYSTITLE>
    <PAYSVALUE>8 Days</PAYSVALUE>
    <ETITLE>Basic Pay - Project</ETITLE>
    <EAMT>-45.00</EAMT>
    <ETITLE>House Rent</ETITLE>
    <EAMT>-08.00</EAMT>
    <ETITLE>Transport</ETITLE>
    <EAMT>-18.00</EAMT>
    <ETITLE>Special</ETITLE>
    <EAMT>-15.00</EAMT>
    <ETITLE>Variable Pay</ETITLE>
    <EAMT>-15.00</EAMT>
    <ETITLE>Bonus</ETITLE>
    <EAMT>-8.00</EAMT>
    <DTITLE>M D S</DTITLE>
    <DAMT>50.00</DAMT>
    <DTITLE>Fund</DTITLE>
    <DAMT>95.00</DAMT>
    <DTITLE>Tax</DTITLE>
    <DAMT>25.00</DAMT>
</NVELOPE>

我需要使用 XSLT 和 XSL-FO 的 PDF 格式的数据

I NEED THIS DATA IN PDF FORMAT USING XSLT AND XSL-FO

我希望数据并行分布在两个相邻的表中.

i want data to be parallelly distributed in both the adjacent tables.

我基本上不知道如何获得两个相邻的表,或者您可以使用具有四列的单个表但我无法正确分配数据...

i basically donno how to get two adjacent tables or u can use a single table with four columns but i cant distribute data properly...

title    amt     title     amt
title    amt     title     amt
title    amt     title     amt
title    amt     title     amt
title    amt     title     amt

这就是我想要的方式......请帮助我提前谢谢...... :)

this is the way i want.... plz help me thanks in advance... :)

推荐答案

您可以通过使用一个两列的表格来实现这一点,该表格包含您希望并排在一行中的表格.

You can accomplish this by using a two column table that contains the tables you would like side-by-side in a single row.

<fo:table>
    <fo:table-column column-number="1"/>
    <fo:table-column column-number="2"/>
    <fo:table-body>
        <fo:table-row>
            <fo:table-cell>
                <fo:block>
                    <TABLE 1 HERE>
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
        <fo:table-row>
            <fo:table-cell>
                <fo:block>
                    <TABLE 2 HERE>
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </fo:table-body>

表格就位后,您可以使用 xsl:if + position() 来限制填充子表格的数据.

With the tables in place you can use xsl:if + position() to limit the data that populates the sub-tables.

这篇关于body-region 中的两个相邻表,每个表有两列(xsl-fo)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆