This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: calling vb functions in xsl


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]