views:

25

answers:

0

I'm trying to use classes in XSL (the 'msxsl:script' tag). But I get the 'Syntax error' message when debugging the file. Here's a simple code that I'm using:

function Test1(str)
{
    this.str = str;
}

Test1.prototype.getStr = function()
{
    return this.str;
}

function test()
{
    var newTest1 = new Test1("some string");
    return (newTest1.getStr());
}

If I insert the code to a aspx file and call the test function, everything works fine, without any error messages. Is it possible to use classes in XSL?