Live and learn... :-)
 
I thought this was the problem, but I couldn't find any reference to it in XPath 2. Must have not looked hard enough, I guess.
 
BTW, is there a reason for this?
 
Thanks,
Gil
-----Original Message-----
From: Michael Kay [mailto:mhk@mhk.me.uk]
Sent: Tuesday, September 16, 2003 17:56
To: saxon-help@lists.sourceforge.net
Subject: RE: [saxon] following-sibling compile error

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
 
match="/html/body/table[preceding-sibling::*[1][self::a[@name='key']]]">
 
Michael Kay
 
 

-----Original Message-----
From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Gil Tayar
Sent: 15 September 2003 03:29
To: 'saxon-help@lists.sourceforge.net'
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"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
  <xsl:template match="/html/body/a[@name='key']/following-sibling::table[1]">
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
 
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?
 
Help!
Gil