[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
vb functions
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.