Assuming you have the tab separated data in some element (e.g. data
is assumed to contain the tab separated data in below sample) and you use XSLT 3 you can use the tokenize
function first to split of the data into lines mapped to rows of the table and then to split up each row into the cell data:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all"
expand-text="yes"
version="3.0">
<xsl:template match="data">
<xsl:where-populated>
<table>
<xsl:apply-templates select="tokenize(., '\r?\n')" mode="row"/>
</table>
</xsl:where-populated>
</xsl:template>
<xsl:template match=".[. instance of xs:string]" mode="row">
<tr>
<xsl:apply-templates select="tokenize(., '\t')" mode="cell"/>
</tr>
</xsl:template>
<xsl:template match=".[. instance of xs:string]" mode="cell">
<td>{.}</td>
</xsl:template>
https://xsltfiddle.liberty-development.net/jxDjimZ