xsl-list
[Top] [All Lists]

Re: call-template from href NO SERVER INVOLVED ???

2003-11-17 16:30:21
My humble attempt to help...

You need to define a template match="Worksheet"/>  right in the same xsl
file.  I don't see one there.
You don't "link" to it. And your subsequent href certain has nothing to do
with linking to it.
that href would simply be the name of an attribute in the generated xml or
html.

hope this helps.


----- Original Message -----
From: "Patricia LaRue" <pdlarue(_at_)yahoo(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Monday, November 17, 2003 5:25 PM
Subject: [xsl] call-template from href NO SERVER INVOLVED ???


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



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



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