This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: calling vb functions in xsl
- To: "Mark J. Reeves" <mark dot reeves at circle dot com>
- Subject: Re: calling vb functions in xsl
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Thu, 9 Nov 2000 10:08:39 +0000
- CC: "Xsl-List" <xsl-list at mulberrytech dot com>
- Organization: Jeni Tennison Consulting Ltd
- References: <PIEILEDDJLJCELJEFJEJIEPDCBAA.mark.reeves@circle.com>
- Reply-To: xsl-list at mulberrytech dot com
Mark,
> 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.
When you set your variable:
> <xsl:variable name="currentLanguage" select="/page/language" />
You are actually setting it to a node: the language element that's a
child of the page document element. So the value that you pass into
the VBScript function is a node, whereas it's expecting a string,
which is why you get the problem.
Instead, either change the select expression of the variable to give
it a string value:
<xsl:variable name="currentLanguage"
select="string(/page/language)" />
or make sure you pass a string when you call the function:
<xsl:value-of
select="ms:GetLanguageFormattedDate(string($currentLanguage))" />
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list