XSL Help - variable and node-set problem
Posted: Wed May 21, 2008 8:51 am
Please see the code below:
The problem I am having is that when I use the '<xsl:value-of select = "msxsl:node-set...' statement I see a list of the returned values requested. However when I use the '<xsl:for-each select="msxsl:node-set...' statement I get absolutley nothing. I have spent many an hour trying SO MANY different solutions and am completely stuck!!
If anyone could provide any insight as to what I need to do to get this working I would be forever in your debt!
Cheers,
Freshbru
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:output method="html"/>
<xsl:param name="appNumber"/>
<xsl:param name="orgApp"/>
<xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
<xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable>
<xsl:template match="/">
...
...
<!-- Search Criteria -->
<xsl:variable name="searchCriteria">
<xsl:choose>
<xsl:when test="string-length($appNumber) > 0">
<name>
<xsl:value-of select="Applications/Application[ApplicationNumber = $appNumber]"/>
</name>
</xsl:when>
<xsl:when test="string-length($orgApp) > 0">
<name>
<xsl:value-of select="Applications/Application[OrganisationApplicant[contains(translate(., $upper, $lower), $orgApp)]]"/>
</name>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:value-of select = "msxsl:node-set($searchCriteria)/name"/>
<xsl:for-each select="msxsl:node-set($searchCriteria)/name">
...
...
</xsl:for-each>
...
...
</xsl:template>

If anyone could provide any insight as to what I need to do to get this working I would be forever in your debt!
Cheers,
Freshbru