xsl-list
[Top] [All Lists]

call-template from href NO SERVER INVOLVED ???

2003-11-17 15:25:41
HELP!  This brick wall is too big and I'm running out
of time.  I've included my .xsl file below.  The first
template displays the names of the worksheet as
hyperlinks.  

I need to link to the second template to display the
worksheet and my href doesn't appear to be working.  

Right now all of the worksheets are in one xml file. 
There is no server involved.  Everything is happening
on the client.  Do I need an XSLT source such as Saxon
or MSXML? 

Thank you so much,
Patricia

**************************************************

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:xlink="http://www.w3.org/1999/xlink";
xmlns:xptr="http://www.w3.org/TR/xptr";>
        <xsl:variable
name="file">T1_CKHSJ7_50k-120(_at_)51(_dot_)6_A_bstr-tweaked(_dot_)xsl</xsl:variable>
        <xsl:output method="html"/>
        <xsl:template match="/">
                <h2>
                        <xsl:value-of select="$file"/>
                </h2>
                <TABLE BORDER="1" CELLPADDING="5">
                        <THEAD>
                                <TH>Worksheet Name</TH>
                        </THEAD>
                        <xsl:for-each select="ss:*/ss:Worksheet">
                                <TR ALIGN="CENTER">
                                        <TD>
                                                <xsl:apply-templates 
select="Worksheet"/>
                                                <a>
                                                        <xsl:attribute 
name="href">
                                                        <xsl:call-template 
name="worksheetdata">
                                                                <xsl:with-param 
name="sheetname"
select="@ss:Name"/>
                                                 </xsl:call-template>
                                                 </xsl:attribute>
                                                 <xsl:value-of 
select="@ss:Name"/>
                                                </a>
                                        </TD>
                                </TR>
                        </xsl:for-each>
                </TABLE>
        </xsl:template>
        
        <xsl:template name="worksheetdata">
                <xsl:param name="sheetname"/>
                <html>
                <body>
                <center>
                <table border="2" width="100%">
                <xsl:for-each select="ss:*/ss:Worksheet">
                        <xsl:if test="@ss:Name=string($sheetname)">
                        <h1>This is a test</h1>
                                <xsl:for-each select="ss:Table/ss:Row">
                                <tr>
                                        <xsl:for-each select="ss:Cell">
                                        <td>
                                        <xsl:value-of
select="ss:Data"/><xsl:text></xsl:text>
                                        </td>
                                        </xsl:for-each>
                                </tr>
                                </xsl:for-each>
                        </xsl:if>
                </xsl:for-each>
                </table>
                </center>
                </body>
                </html>
        </xsl:template>

</xsl:stylesheet>


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>