calling vb functions in xsl

Subject: calling vb functions in xsl
From: "Mark J. Reeves" <mark.reeves@xxxxxxxxxx>
Date: Wed, 8 Nov 2000 15:22:54 -0500

With the sample of code below, I've created a function and called it
successfully passing a string to it, as defined in Wrox's XSLT reference.
I'm using the newer "transform" namespace rather than the older one that the
1998 MS implementation used for much of my XSLT functionality, so I haven't
been able to use eval to call my function.  I'm trying to pass an XSL
variable into the VB function.  This doesn't exist in the scope of the 'ms'
namespace, however, so it hasn't worked.  Does anyone have any suggestions?

<xsl:stylesheet xmlns:xsl="";

<xsl:variable name="currentLanguage" select="/page/language" />
<!-- call the function, works when I use the string 'english' as a
paramenter, not when I attempt to use the variable -->
<xsl:template name="displayDate">
<xsl:value-of select="$currentLanguage" />
 <xsl:value-of select="ms:GetLanguageFormattedDate($currentLanguage)" />

<msxsl:script xmlns:msxsl="urn:schemas-microsoft-com:xslt"
 Function GetLanguageFormattedDate(sLang)

This syntax works fine when using a string for a parameter, but not when I
attempt to pass in the xsl variable that I'm using throughout my XSL.


Mark J. Reeves // Engineer
420 Boylston St., 6th Floor
Boston, MA 02116

 XSL-List info and archive:

Current Thread