Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 28th, 2005, 07:50 AM
Registered User
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to barsha Send a message via Yahoo to barsha
Default 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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creation of Database tables from code... TomW Visual Basic 2008 Essentials 11 February 29th, 2008 03:08 PM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM
Two HTML Tables and Two XSLT with Two XML? gman44 XSLT 1 March 1st, 2006 04:53 AM
XSLT and tables surgeon XSLT 1 July 3rd, 2005 03:36 AM
xslt looping with tables... lukemedway_uk XSLT 16 December 24th, 2003 12:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.