Skip to content

Tablehead breaks rowspan with colspan #300

Closed
@Demosteneus

Description

@Demosteneus

Hi,

As a variation of bug 279:

If we have a cell that has both rowspan and colspan and we want to print this inside a tablehead, the publishing fails.

data.xml

<table>
	<th>
		<td colspan="2" rowspan="2">H1</td>
		<td colspan="1" rowspan="1">H2</td>
		<td colspan="1" rowspan="1">H3</td>
	</th>
	<th>
		<td colspan="1" rowspan="1">H2</td>
		<td colspan="1" rowspan="1">H3</td>
	</th>
	<tr>
		<td colspan="1" rowspan="1">1</td>
		<td colspan="1" rowspan="1">2</td>
		<td colspan="1" rowspan="1">3</td>
		<td colspan="1" rowspan="1">4</td>
	</tr>
	<tr>
		<td rowspan="2" colspan="1">1</td>
		<td colspan="1" rowspan="1">2</td>
		<td colspan="1" rowspan="1">3</td>
		<td colspan="1" rowspan="1">4</td>
	</tr>
	<tr>
		<td colspan="1" rowspan="1">2</td>
		<td colspan="1" rowspan="1">3</td>
		<td colspan="1" rowspan="1">4</td>
	</tr>
</table>

layout.xml

<Layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="layoutschema-en.xsd" xmlns:sd="urn:speedata:2009/publisher/functions/en" xmlns="urn:speedata.de:2009/publisher/en" xmlns:xi="http://www.w3.org/2001/XInclude" version="4.2.0">
	<Record element="table">
		<PlaceObject>
			<Table width="170mm">
				<Columns>
					<Column width="42.5mm" align="center" />
					<Column width="42.5mm" align="center" />
					<Column width="42.5mm" align="center" />
					<Column width="42.5mm" align="center" />
				</Columns>
				<Tablehead>
				<ForAll select="th">
					<Tr>
						<ForAll select="td">
							<Td rowspan="{@rowspan}" colspan="{@colspan}" border-left="1pt" border-right="1pt" border-top="1pt" border-bottom="1pt">
								<Paragraph>
									<Value select="string(.)"/>
								</Paragraph>
							</Td>
						</ForAll>
					</Tr>
				</ForAll>
				</Tablehead>
				<ForAll select="tr">
					<Tr>
						<ForAll select="td">
							<Td rowspan="{@rowspan}" colspan="{@colspan}" border-left="1pt" border-right="1pt" border-top="1pt" border-bottom="1pt">
								<Paragraph>
									<Value select="string(.)"/>
								</Paragraph>
							</Td>
						</ForAll>
					</Tr>
				</ForAll>
			</Table>
		</PlaceObject>
	</Record>
</Layout>

If we delete the tablehead, the publishing works as expected.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions