Hi,

I am using XALAN C++ 1.8 & Xerces C++ 2.5 for transforming an XML document - with XSL 1.0.

My goal is to implement a date difference function where one date is passed in through my XML and the other date is the current system date.The difference between these two dates in days is returned in the resultant XML file. I have implemented this using a Javascript function inside an msxsl:script block - and when I try to run the transform process, it throws me a XalanXPathException - saying that the namespace provided by me is invalid as the function is not available at that namespace. The transform works fine if I test it in my browser, but when tried with this parser, it fails.

Can somebody please suggest a workaround/fix for this?

The error is as below :
Description [StreamTransform Error: XalanXPathException: The function 'http://mycompany.com/mynamespace:get_interval' is not available. (, line 543, column 75)] Code [0] Line [107] File [<application path>\src\XSLTransformer.cpp]