Hello, I've got a question about XSLT and xsl:Template.
I've got this template set up and it returns the correct information, but when the page is viewed in Firefox the anchor tags and image tags don't appear. When the page is viewed in IE nothing appears and I get a javascript error. There are a few questions that would help me move forward with this problem.
a) Is it even possible have the results of a "template call" be passed as a parameter value thru a javascript function the way I'm trying below? Is there a better way?
b) Why don't the image and anchor tags in the template appear on the final page when viewed in Firefox?
c) What is causing the javascript "unknown error" in IE which causes the function not to execute at all?
d) Is my question not clear?
The xslt code I'm working with is below:
-------------------
<xsl:template match="/">
<xsl:for-each select="//test/edutype/typ
edetails">
<xsl:variable name="typetest" select="type" />
<p><a><xsl:attribute name="href">javascript:spa
nCopy('<xs
l:value-of
select="id" />', '<xsl:call-template name="supertest"><xsl:with
-param name="conedutype" select="$typetest" /></xsl:call-template>');<
/xsl:attri
bute><xsl:
attribute name="title"><xsl:value-of
select="title" /></xsl:attribute><xsl:val
ue-of select="title" /></a>
<br />
<span><xsl:attribute name="id"><xsl:value-of select="id" /></xsl:attribute></span><
/p>
</xsl:for-each>
</xsl:template>
<xsl:template name="supertest">
<xsl:param name="conedutype" />
<xsl:for-each select="//test/edutype/con
edu">
<xsl:choose>
<xsl:when test="@type=$conedutype">
<xsl:choose>
<xsl:when test="link!=''">
<![CDATA[<h2>]]><xsl:value
-of select="title" /><![CDATA[</h2>]]>
<img><xsl:attribute name="src">/i/spacer.gif</
xsl:attrib
ute><xsl:a
ttribute name="width">1</xsl:attrib
ute><xsl:a
ttribute name="height">5</xsl:attri
bute></img
>
<![CDATA[<p>]]><xsl:value-
of select="desc" /><![CDATA[</p>]]>
<img><xsl:attribute name="src">/i/spacer.gif</
xsl:attrib
ute><xsl:a
ttribute name="width">1</xsl:attrib
ute><xsl:a
ttribute name="height">30</xsl:attr
ibute></im
g>
<a><xsl:attribute name="href">
http://<xsl:va
lue-of select="link" /></xsl:attribute><xsl:att
ribute name="title"><xsl:value-of
select="title" /></xsl:attribute><xsl:val
ue-of select="link" /></a>
<![CDATA[<br /><br />]]>
</xsl:when>
<xsl:otherwise>
<![CDATA[<h2>]]><xsl:value
-of select="title" /><![CDATA[</h2>]]>
<img><xsl:attribute name="src">/i/spacer.gif</
xsl:attrib
ute><xsl:a
ttribute name="width">1</xsl:attrib
ute><xsl:a
ttribute name="height">5</xsl:attri
bute></img
>
<![CDATA[<p>]]><xsl:value-
of select="desc" /><![CDATA[</p>
<br />]]>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
--------------
Thank you, I'm finding this to be quite challenging.
Scott