Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tablehead breaks rowspan with colspan #300

Closed
Demosteneus opened this issue Jan 12, 2021 · 0 comments
Closed

Tablehead breaks rowspan with colspan #300

Demosteneus opened this issue Jan 12, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@Demosteneus
Copy link
Contributor

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.

@pgundlach pgundlach self-assigned this Jan 12, 2021
@pgundlach pgundlach added the Bug label Jan 12, 2021
@pgundlach pgundlach modified the milestones: Version 4.4, 4.3.2 Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants