It seems the spec indeed allows this.
Furthermore, Saxon-JS 2 doesn't complain:
Saxon 10.1 does:
Error at xsl:template on line 14 column 35 of out.xsl:
XTSE0340 Cannot convert the expression
{homCheck(child::element(Q{}a)/(child::element(Q{}b) |
child::element(Q{}c)))} to a pattern
Errors were reported during stylesheet compilation
I haven’t tried to do any more investigation than that.
Here’s the stylesheet. The error above arises from attempting to process
itself:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="3.0">
<random xmlns="http://example.com">
<no-namespace xmlns="">
<a><b/></a>
<a><c/></a>
</no-namespace>
</random>
<xsl:template match="a / (b | c)">
<xsl:text>HERE</xsl:text>
</xsl:template>
<xsl:template match="element()">
<xsl:copy>
<xsl:apply-templates select="@*,node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Be seeing you,
norm
--
Norman Tovey-Walsh <ndw(_at_)nwalsh(_dot_)com>
https://nwalsh.com/
In the life of saints, technically so called, the spiritual facilities
are strong, but what gives the impression of extravagance proves
usually on examination to be a relative deficiency of
intellect.--William James
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
signature.asc
Description: PGP signature