Thanks for reporting it.

This is a bit of a structural problem: the XSLT Pattern parser subclasses the XPath 2.0 expression parser rather than the XPath 3.0 expression parser. The effect is that XPath 3.0 constructs are not available in XSLT patterns, even if 3.0 is enabled. We may decide not to fix this until the next development release.

I have added a test case higher-order-functions-069 to the XSLT 3.0 test suite.

Michael Kay
Saxonica

On 08/02/2013 00:59, Abel Braaksma wrote:
Whenever I try to write a template match that can match against function items, I get the following error:

Engine name: Saxon-PE 9.4.0.3
Severity: fatal
Description: The item type function() is available only when XPath 3.0 is enabled
Start location: 15:1
URL: http://www.w3.org/TR/xslt20/#err-XTSE0340

However, the stylesheet has version 3.0 and setting the xslt version on the command line or through a configuration file (I tried both), didn't help. Example to reproduce this error:

<xsl:template match="~function(*)">

Because this is a new feature of the up and coming XSLT 3.0 standard, it may very well be that it is not implemented yet, but the error seems to suggest it is available, but that I somehow need to fix the configuration to allow XPath 3.0. However, most other XPath 3.0 features work without a problem.

Cheers,
Abel

PS: see you tomorrow at Prague! :)




------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help