#NEWLINE# def string_join( xc , p , contextItem , args ) : #NEWLINE# #INDENT# if ( len ( args ) != 2 ) : #NEWLINE# #INDENT# raise XPathContext . FunctionNumArgs ( ) #NEWLINE# #UNINDENT# joiner = stringArg ( xc , joiner , 1 , 'xs:string' ) #NEWLINE# atomizedArgs = [ ] #NEWLINE# for x in xc . atomize ( p , args [ 0 ] ) : #NEWLINE# #INDENT# if isinstance ( x , _STR_BASE ) : #NEWLINE# #INDENT# atomizedArgs . append ( x ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise XPathContext . FunctionArgType ( 0 , 'xs:string*' ) #NEWLINE# #UNINDENT# #UNINDENT# return joiner . join ( atomizedArgs )