The message means what it says: you cannot use the following-sibling axis in a pattern, except within a predicate, where you can use any XPath expression you like.
Try to put it the other way around, perhaps
Michael Kay

-----Original Message-----
From: [] On Behalf Of Gil Tayar
Sent: 15 September 2003 03:29
To: ''
Subject: [saxon] following-sibling compile error

Given this stylesheet (which is far longer but was minimized for your convenience):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  <xsl:template match="/html/body/a[@name='key']/following-sibling::table[1]">
      <xsl:apply-templates select="node()|@*"/>
I get the following message:
SAXON 7.5.1 from Michael Kay
Java version 1.4.1_03
Error at xsl:template on line 5 of file:/C:/Customers/nintendo/build/xform/all/010-cutting.xsl:
  Error in expression {/html/body/a[@name='key']/following-sibling::table[1]}: Axis in pattern must
be child or attribute
Transformation failed: Failed to compile stylesheet. 1 error detected.
Am I doing something wrong?