#NEWLINE# def exists( xc , p , contextItem , args ) : #NEWLINE# #INDENT# if ( len ( args ) != 1 ) : #NEWLINE# #INDENT# raise XPathContext . FunctionNumArgs ( ) #NEWLINE# #UNINDENT# return ( len ( xc . flattenSequence ( args [ 0 ] ) ) > 0 )