Code:
<table:table table:name="sheet1" table:style-name="ta1">
<table:table-column table:style-name="co1" table:number-columns-repeated="11" table:default-cell-style-name="Default"/>
<table:table-row table:style-name="ro1" table:number-rows-repeated="13">
<table:table-cell table:number-columns-repeated="11"/>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell table:number-columns-repeated="5"/>
<table:table-cell>
<text:p>Dsf</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="5"/>
</table:table-row>
this is how the xml file looks like,
<table:table-row table:style-name="ro1" table:number-rows-repeated="13">
<table:table-cell table:number-columns-repeated="11"/>
</table:table-row>
outputs 13 empty rows with 11 columns. this is the main prob to get right in my xsl.
this is the piece of xsl that i already have, but i cant get the value of table:table-columns-repeated.
Code:
<xsl:template match="table:table-row">
<xsl:choose>
<xsl:when test="@table:number-rows-repeated">
<xsl:call-template name="emptyRows">
<xsl:with-param name="countRows" select="@table:number-rows-repeated"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<tr>
<td class="header">
Y
</td>
<xsl:apply-templates select="table:table-cell"/>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="emptyRows">
<xsl:param name="countRows"/>
<xsl:for-each select="1 to $countRows">
<tr>
<td class="header">
X
</td>
<xsl:call-template name="fillRows">
</xsl:call-template>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template name="fillRows">
<xsl:for-each select="1 to /@table:number-columns-repeated">
<td width="70">
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
</td>
</xsl:for-each>
</xsl:template>
/@table:number-columns-repeated isnt right, i need to put something here that gives me the value of that attribute.
i already tried with variables and so on.. maybe XPath but i dont know how to use it
HELP !