Subject: calling vb functions in xsl From: "Mark J. Reeves" <mark.reeves@xxxxxxxxxx> Date: Wed, 8 Nov 2000 15:22:54 -0500 |
Hi, 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="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:ms="urn:circle-ms-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)" /> </xsl:template> <msxsl:script xmlns:msxsl="urn:schemas-microsoft-com:xslt" language="VBScript" implements-prefix="ms"> <![CDATA[ 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. Thanks! Mark Mark J. Reeves // Engineer mark.reeves@xxxxxxxxxx 617.585.3137 420 Boylston St., 6th Floor Boston, MA 02116 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Preserving output formatting af, Mike Brown | Thread | Re: calling vb functions in xsl, Jeni Tennison |
RE: numbering - counting - grouping, "Sellmer-Brüls, Barb | Date | Changing XML Case using XSL/DOM - M, ciaran byrne |
Month |