Hi group,
I was trying to find empty p or q elements in my xml (saxon 9B) with
<xsl:template match='(p|q)[count(node()) = 0]'/>
This gives me a syntax error. It seems as if the parentheses construct
is disallowed anyway. If I try the following example from Martin Kay's
XSLT bible (for xpath 2.0)
<xsl:template match='book/(chapter|appendix)' />
I get
Error at xsl:template on line 14 of
file:/autofs/srv009bh/home/ruud/leeg.xsl:
XTSE0340: XSLT Pattern syntax error at char 5 on line 14 in
{book/(chapter}:
Unexpected token in pattern, found "("
Why is that?
Do I really have to rewrite my xpath expression to
<xsl:template match='*[self::p or self::q][count(node()) = 0]'/>?
regards, Ruud
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--