works with Saxonb 8 and Xalan 2.6.0, whereas
<xsl:with-param name="number"
select="(preceding::footnote)/(preceding::endnote)" />
works with Saxon but gives the following error in Xalan:
This syntax is legal in XPath 2.0 but not in XPath 1.0.
Michael Kay