Docbook XSL overrules templates for adding class to td
Posted: Fri May 15, 2020 4:15 pm
Hello everyone,
I am busy transforming DocBook XML to EPUB3 and HTML.
I want to add a class to table cells (td).
The input:
This is my XSL template in the customization layer:
The expected out is:
Unfortunately, DocBook XSL ignores this rule and just places <td> in the output.
Does anyone know why this happens? Is it possible to add classes to <td>?
Thanks in advance!
Michel
I am busy transforming DocBook XML to EPUB3 and HTML.
I want to add a class to table cells (td).
The input:
Code: Select all
<td role="breedte-50">
Code: Select all
<xsl:template match="td[@role = 'breedte-50']">
<td xmlns="http://www.w3.org/1999/xhtml" class="breedte-50">
<xsl:copy-of select="@*[local-name() != 'role' and local-name() != 'class']"/>
<xsl:apply-templates/>
</td>
</xsl:template>
Code: Select all
<td class="breedte-50">
Does anyone know why this happens? Is it possible to add classes to <td>?
Thanks in advance!
Michel