6.4. 表格,表格嵌套,表格单元格合并

例 6.8. 表格:table


<table xml:id="tbl.usb_class"><title>USB Class表</title>
    <tgroup cols="3">
        <colspec colnum="1" colname="col1" colwidth="1*" />
        <colspec colnum="2" colname="col2" colwidth="1*" />
        <colspec colnum="3" colname="col3" colwidth="4*" />
        
        <thead>
            <row><entry>Base Class</entry><entry>Descriptor Usage</entry><entry>Description</entry></row>
        </thead>
        
        <tbody>
            <row><entry>00h</entry><entry>Device </entry><entry>Use class information in the Interface Descriptors</entry></row>
            <row><entry>01h</entry><entry>Interface</entry><entry>Audio</entry></row>
            <row><entry>02h</entry><entry>Both</entry><entry>Communications and CDC Control</entry></row>
            <row><entry>03h</entry><entry>Interface</entry><entry>HID (Human Interface Device)</entry></row>
            <row><entry>05h</entry><entry>Interface</entry><entry>Physical</entry></row>
            <row><entry>06h</entry><entry>Interface</entry><entry>Image</entry></row>
            <row><entry>07h</entry><entry>Interface</entry><entry>Printer</entry></row>
            <row><entry>08h</entry><entry>Interface</entry><entry>Mass Storage</entry></row>
            <row><entry>09h</entry><entry>Device</entry><entry>Hub</entry></row>
            <row><entry>0Ah</entry><entry>Interface</entry><entry>CDC-Data</entry></row>
            <row><entry>0Bh</entry><entry>Interface</entry><entry>Smart Card</entry></row>
            <row><entry>0Dh</entry><entry>Interface</entry><entry>Content Security</entry></row>
            <row><entry>0Eh</entry><entry>Interface</entry><entry>Video</entry></row>
            <row><entry>0Fh</entry><entry>Interface</entry><entry>Personal Healthcare</entry></row>
            <row><entry>DCh</entry><entry>Both</entry><entry>Diagnostic Device</entry></row>
            <row><entry>E0h</entry><entry>Interface</entry><entry>Wireless Controller</entry></row>
            <row><entry>EFh</entry><entry>Both</entry><entry>Miscellaneous</entry></row>
            <row><entry>FEh</entry><entry>Interface</entry><entry>Application Specific</entry></row>
            <row><entry>FFh</entry><entry>Both</entry><entry>Vendor Specific</entry></row>
        </tbody>
    </tgroup>
</table>

            

例 6.9. 带嵌套(embedded)表格:informaltable


<table id="tbl.mpeg_xing_header_format" align="left"><title>XING 头的格式及含义</title>
    <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="2*"/>
        <colspec colnum="2" colname="col2" colwidth="2*"/>
        <colspec colnum="3" colname="col3" colwidth="8*"/>
        <colspec colnum="4" colname="col4" colwidth="3*"/>
        <thead>
            <row><entry>位置(字节)</entry><entry>长度(字节)</entry><entry>含义</entry><entry>示例</entry></row>
        </thead>
        <tbody>
            <row><entry>0</entry><entry>4</entry><entry>4个ASCII字符的VBR头 ID,要么是Xing,要么是Info,无NULL结尾(普通字符串都以NULL,即\0结尾)</entry><entry>'Xing'</entry></row>
            <row><entry>4</entry><entry>4</entry>
                <entry><para>存放一个标志,用于表示接下来存在哪些域/字段,各字段逻辑或的结果:
                    <informaltable>
                        <tgroup cols="2" >
                            <colspec colnum="1" colwidth="1*" />
                            <colspec colnum="2" colwidth="2*" />
                            <tbody>
                                <row><entry>0x0001</entry><entry>存在总帧数(Frames)字段</entry></row>
                                <row><entry>0x0002</entry><entry>存在文件大小(Bytes)字段</entry></row>
                                <row><entry>0x0004</entry><entry>存在TOC字段</entry></row>
                                <row><entry>0x0008</entry><entry>存在音频质量指示字段</entry></row>
                            </tbody>
                        </tgroup>
                    </informaltable></para>
                </entry>
                <entry><para>0x0007 就表示下面存在:
                    <simplelist type='vert' columns='1'>
                        <member>总帧数</member>
                        <member>文件大小总字节数</member>
                        <member>TOC表</member>
                    </simplelist></para>
                </entry></row>
            <row><entry>8</entry><entry>4</entry><entry><emphasis>总帧数(Frames)</emphasis>,大端[可选]</entry><entry>7344</entry></row>
            <row><entry>8或12</entry><entry>4</entry><entry>文件总大小,单位字节,大端[可选]</entry><entry>45000</entry></row>
            <row><entry>8,12,16</entry><entry>100</entry><entry>TOC表,大端[可选]</entry><entry> </entry></row>
            <row><entry>8或12, 16, 108, 112 ,116</entry><entry>4</entry><entry>音频质量指示,最差0,最好100,大端[可选]</entry><entry>0</entry></row>
        </tbody>
    </tgroup>
</table>

            

例 6.10. 待单元格合并的表格:namest,nameend,morerows


        <table xml:id="tbl.char_exchange_spec"><title>字符(存储)交换标准</title>
            <tgroup cols="3">
                <colspec colnum="1" colname="col1" colwidth="1*" />
                <colspec colnum="2" colname="col2" colwidth="1*" />
                <colspec colnum="3" colname="col3" colwidth="1*" />
                
                <thead align="center">
                    <row><entry namest="col1" nameend="col2" >字符编码标准</entry><entry morerows="1" valign="middle">存储(交换/传输)标准</entry></row>
                    <row><entry>包含字符</entry><entry>字符编码领域的叫法</entry></row>
                </thead>
                
                <tbody>
                    <row><entry>英文</entry>
                        <entry>
                            <simplelist type="vert" columns="1">
                                <member>ASCII</member>
                                <member>==ISO/IEC 646</member>
                            </simplelist>
                        </entry><entry>ASCII</entry></row>
                    <row><entry>欧洲多国的字符</entry><entry>ISO 8859</entry><entry></entry></row>
                    <row><entry morerows="2" valign="middle">通用(的任何)字符</entry><entry morerows="2" valign="middle">Unicode</entry><entry>UTF<co id="co.utf" linkends="co.note.utf"/>-8</entry></row>
                    <row><entry colname="col3">UTF<coref linkend="co.utf"/>-16</entry></row>
                    <row><entry colname="col3">UTF<coref linkend="co.utf"/>-32</entry></row>
                    <row><entry morerows="2" valign="middle">简体中文<co id="co.zhcn" linkends="co.note.zhcn"/></entry>
                        <entry>
                            <simplelist type="vert" columns="1">
                                <member>GB2312</member>
                                <member>==GB2312-80</member>
                                <member>==GB</member>
                                <member>==GB0<co id="co.gb0" linkends="co.note.gb0"/></member>
                            </simplelist>
                        </entry><entry morerows="2" valign="middle">EUC<co id="co.euc" linkends="co.note.euc"/>-CN</entry></row>
                    <row><entry colname="col2">GBK</entry></row>
                    <row><entry colname="col2">GB18030</entry></row>
                    <row><entry morerows="2" valign="middle">繁体中文</entry>
                        <entry morerows="2" valign="middle">
                            <simplelist type="vert" columns="1">
                                <member>BIG5</member>
                                <member>==大五码</member>
                                <member>==五大码</member>
                            </simplelist>
                        </entry><entry>CCCII</entry></row>
                    <row><entry colname="col3">CNS-11643</entry></row>
                    <row><entry colname="col3">EUC<coref linkend="co.euc"/>-TW</entry></row>
                    <row><entry morerows="3" valign="middle">日文</entry>
                        <entry morerows="2" valign="middle">
                            <simplelist type="vert" columns="1">
                                <member>JIS X 0208</member>
                                <member>== JIS C 6226和JIS X 0212</member>
                            </simplelist>
                        </entry><entry>Shift JIS</entry></row>
                    <row><entry colname="col3">ISO-2022-JP</entry></row>
                    <row><entry colname="col3">EUC<coref linkend="co.euc"/>-JP</entry></row>
                    <row><entry colname="col2">JIS X 0213</entry><entry>EUC-JISX0213</entry></row>
                    <row><entry>韩文</entry>
                        <entry>
                            <simplelist type="vert" columns="1">
                                <member>KS X 1001</member>
                                <member>== KS C 5601</member>
                            </simplelist>
                        </entry><entry>EUC<coref linkend="co.euc"/>-KR</entry></row>
                </tbody>
            </tgroup>
        </table>