Download Altova StyleVision 2016 Basic Edition

Transcript
SPS File: Content
Tables
135
The HTML code fragment for the XML table shown in the illustration above looks like this:
<table border="1" width="40%">
<tbody>
<tr>
<td>Name</td>
<td>Phone</td>
</tr>
<tr>
<td>John Merrimack</td>
<td>6517890</td>
</tr>
<tr>
<td>Joe Concord</td>
<td>6402387</td>
</tr>
</tbody>
</table>
The original XML document might look like this:
<phonelist border="1" width="40%">
<items>
<person>
<data>Name</data>
<data>Phone</data>
</person>
<person>
<data>John Merrimack</data>
<data>6517890</data>
</person>
<person>
<data>Joe Concord</data>
<data>6402387</data>
</person>
</items>
</phonelist>
Note that element names in the XML document do not need to have table semantics; the table
structure, however, must correspond to the HTML or CALS table model. Also note the following:
Note that only one XML element can correspond to the HTML column element <td/>.
A CALS/HTML table can be inserted at any location in the XML document where,
according to the schema, the element corresponding to the table element is allowed.
In Authentic View, data is entered directly into table cells. This data is stored as the
content of the corresponding CALS/HTML table element.
The formatting properties of a CALS/HTML table could come from the XML document, or
they could be specified in the SPS design.
Summary for the designer
From the document designer's perspective, the following points should be noted:
The structure of an SPS table is defined in the SPS. The structure of a CALS/HTML
table on the other hand is specified in the schema and must follow that of the CALS/
HTML table model; the element names in the schema may, however, be different than
those in the CALS or HTML table models.
Colspans and rowspans in SPS tables are specified in the SPS. But in CALS/HTML
tables, colspans and rowspans are specified in the XML instance document.
Table formatting of SPS tables is specified in the SPS. The formatting of CALS/HTML
© 2015 Altova GmbH
Altova StyleVision 2016 Basic Edition