regarding tables creation in xslt
Hello
I am stuck at the problem...
I am trying to create a table in word using xslt.
Consider the code snippet:
<xsl:template match="/">
<w:p>
<w:r>
<xsl:for-each select ="Entity/Properties/Property/Entities/Entity[@Type]">
<xsl:if test="not(@Type='Start')and not(@Type='End')">
<w:t><xsl:value-of select="@Type"/>#x20;Shape-</w:t>
<xsl:apply-templates/><w:p/>
<xsl:call-template name="table"/>
</xsl:if>
</xsl:for-each>
</w:r>
</w:p>
</xsl:template>
<xsl:template match="Properties/Property">
<xsl:if test="@Name='Name'">
<w:t><xsl:value-of select="."/><w:p/></w:t>
</xsl:if>
</xsl:template>
<xsl:template name="table">
<w:p>
<w:tbl>
<w:tr>
<w:tc>
<w:p>
<w:r>
<w:t>heading1</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:p>
<w:r>
<w:t>heading2</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
<w:p>
<w:tbl>
<w:p>
</xsl:template>
Now after adding the code for table template,the error is incurred.
However,if i take the code for table and copy it in another xslt sheet and run it,it is generating a table..
So,can u please help me in knowing the reason of the problem.
|