Hans van der Meer
% failure of negative number comparison.
\startxmlsetups demo:numberfail
\xmlsetsetup{#1}{root|node}{demo:numberfail:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:numberfail}
\startxmlsetups demo:numberfail:root
@atta >= 1:\crlf
\xmlfilter{#1}{/[number(@atta) >= 1]/command(demo:numberfail:node)}
\blank
@atta >= -1:\crlf
\xmlfilter{#1}{/[number(@atta) >= -1]/command(demo:numberfail:node)}
\xmlfilter{#1}{/[number(@atta) >= number(-1)]/command(demo:numberfail:node)}
\stopxmlsetups
\startxmlsetups demo:numberfail:node
node: attribute atta = \xmlatt{#1}{atta}\crlf
\stopxmlsetups
\startbuffer[numberfail]
<root>
<node atta="2"/>
<node atta="3"/>
</root>
\stopbuffer
\starttext
\xmlprocessbuffer{demo}{numberfail}{}
the error from \type{\xmlfilter{#1}{/[number(@atta) >= -1]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= -1 => expr.number((ll.at and
ll.at['atta'])) >= expr.child(ll,'-')1
\stoptyping
the error from \type{\xmlfilter{#1}{/[number(@atta) >= number(-1)]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= number(-1) => expr.number((ll.at and
ll.at['atta'])) >= expr.number(expr.child(ll,'-')1)
\stoptyping
\stoptext