NateGlenn, this is not what @comment() embedded in the grammar. It's just that the combination of @ and comment() not specifically prohibited.
As you know, @ is an abbreviation for the attribute:: axis. Axes are built into the grammar. Node tests (e.g. node() and comment() ) are embedded in a separate part of the grammar.
@comment() must be a special case for the @comment() combination to be forbidden by grammar. You can think of other combinations that do not make much sense, except to return an empty set of nodes: parent::text() , for example.
It is more likely that sqrt(-1) or sqrt(-1) would be forbidden by C.
Larsh
source share