#NEWLINE# def compare( xc , p , contextItem , args ) : #NEWLINE# #INDENT# if ( len ( args ) == 3 ) : #NEWLINE# #INDENT# raise fnFunctionNotAvailable ( ) #NEWLINE# #UNINDENT# if ( len ( args ) != 2 ) : #NEWLINE# #INDENT# raise XPathContext . FunctionNumArgs ( ) #NEWLINE# #UNINDENT# comparand1 = stringArg ( xc , args , 0 , 'xs:string?' , emptyFallback = ( ) ) #NEWLINE# comparand2 = stringArg ( xc , args , 1 , 'xs:string?' , emptyFallback = ( ) ) #NEWLINE# if ( ( comparand1 == ( ) ) or ( comparand2 == ( ) ) ) : #NEWLINE# #INDENT# return ( ) #NEWLINE# #UNINDENT# if ( comparand1 == comparand2 ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# if ( comparand1 < comparand2 ) : #NEWLINE# #INDENT# return ( - 1 ) #NEWLINE# #UNINDENT# return 1