I want to create a dynamic XSLT Variable. It should fetch the content of the first td of each row, something like this:
<tr><td>1</td><td>not Important</td></tr>
<tr><td>2</td><td>not Important</td></tr>
<tr><td>3</td><td>not Important</td></tr>
My XSL:Variable looks something like this:
<xsl:variable name="name" select="concat('out/',//td[1]/text(),'.html')"/>
I want to use the elements content (in my Case 1, 2, 3) to create new Html Files and name them accordingly:
<xsl:result-document href="{$name}">
Result: 1.html 2.html 3.html
With my current XSL:Variable Oxygen would give me that error: A sequence of more than one item is not allowed as the second argument of concat()
If you want to map each row to a result document then I suggest to write a template
<xsl:template match="tr"> <xsl:result-document href="out{td[1]}.html"> ... </xsl:result-document> </xsl:template>then make sure there is an
apply-templatesfor the parent table that makes sure thetrelementd are processed.