Unknown System Function

Here should go questions about transforming XML with XSLT and FOP.
sandeepm
Posts: 10
Joined: Tue Feb 24, 2009 1:54 pm

Unknown System Function

Post by sandeepm »

Hi,

I am using few XSL functions like 'index-of' but the Oxygen editor thrown an error of 'Unknown System Function - index-of' error.
My code snippet is as shown below:

Code: Select all


<xsl:element name="{$temp}">
<xsl:value-of select="index-of($txt, '|')"/>
</xsl:element>
I have changed the Schematron XPath Version from 1.0 to 2.0 in Options->Preferences, but no luck. Please suggest.

Many Thanks,
Sandeep Mestry
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Unknown System Function

Post by sorin_ristache »

Hello,

The function index-of is an XSLT 2.0 function. You get the error Unknown system function: index-of only if you use it in an XSLT 1.0 stylesheet. Please make sure you have the attribute version="2.0" in your stylesheet (the recommended solution) or you set an XSLT 2.0 validator for XSLT 1.0 stylesheet, for example Saxon 9 from menu Options -> Preferences -> XML -> XSLT-FO-XQuery -> XSLT -- XSLT 1.0 validate with.


Regards,
Sorin
sandeepm
Posts: 10
Joined: Tue Feb 24, 2009 1:54 pm

Re: Unknown System Function

Post by sandeepm »

Hi Sorin,

Many Thanks for your reply.

I had already set the attribute version to 2.0 in stylesheet, however I was validating it with Saxon6.5.5. I have changed this processor to Saxon-B 9.1.0.3 and it worked.

Thanks again for your help, much appreciated.

Cheers, Sandeep
Post Reply