pylib/uxml/uxpath/functions.py
def string_(ctx, seq=None):
    '''
    Yields one string, derived from the argument literal (or the first item in the argument sequence, unless empty in which case yield '') as follows:

    * If a node, yield its string-value
    * If NaN, yield 'NaN'
    * If +0 or -0, yield '0'
    * If positive infinity, yield 'Infinity'
    * If negative infinity, yield '-Infinity'
    * If an integer, no decimal point and no leading zeros
    * If a non-integer number, at least one digit before the decimal point and at least one digit after
    * If boolean, either 'true' or 'false'
    '''
    if seq is None:
        item = ctx.item
    elif hasattr(seq, 'compute'):
        item = next(seq.compute(ctx), '')
    else:
        item = seq
    yield next(to_string(item), '')
def string_(ctx, seq=None):
    '''
    Yields one string, derived from the argument literal (or the first item in the argument sequence, unless empty in which case yield '') as follows:

    * If a node, yield its string-value
    * If NaN, yield 'NaN'
    * If +0 or -0, yield '0'
    * If positive infinity, yield 'Infinity'
    * If negative infinity, yield '-Infinity'
    * If an integer, no decimal point and no leading zeros
    * If a non-integer number, at least one digit before the decimal point and at least one digit after
    * If boolean, either 'true' or 'false'
    '''
    if seq is None:
        item = ctx.item
    elif hasattr(seq, 'compute'):
        item = next(seq.compute(ctx), '')
    else:
        item = seq
    yield next(to_string(item), '')
def string_ ( ctx , seq = None ) : if seq is None : item = ctx . item elif hasattr ( seq , 'compute' ) : item = next ( seq . compute ( ctx ) , '' ) else : item = seq yield next ( to_string ( item ) , '' )
Yields one string, derived from the argument literal (or the first item in the argument sequence, unless empty in which case yield '') as follows:

    * If a node, yield its string-value
    * If NaN, yield 'NaN'
    * If +0 or -0, yield '0'
    * If positive infinity, yield 'Infinity'
    * If negative infinity, yield '-Infinity'
    * If an integer, no decimal point and no leading zeros
    * If a non-integer number, at least one digit before the decimal point and at least one digit after
    * If boolean, either 'true' or 'false'
Yields one string derived from the argument literal ( or the first item in the argument sequence unless empty in which case yield ) as follows :