(name, groups=None, choice_name=None, is_hint=False)
return ''.join(text_id)
Builds a text node "id" parameter

        >>> XFormBuilder.get_text_id('foo')
        'foo-label'
        >>> XFormBuilder.get_text_id('foo', ['bar'])
        'bar/foo-label'
        >>> XFormBuilder.get_text_id('foo', ['bar', 'baz'])
        'bar/baz/foo-label'
        >>> XFormBuilder.get_text_id('foo', ['bar', 'baz'], 'choice1')
        'bar/baz/foo-choice1-label'
        >>> XFormBuilder.get_text_id('foo', is_hint=True)
        'foo-hint'
Builds a text node "id" parameter
Builds a text node id parameter
def get_text_id(name, groups=None, choice_name=None, is_hint=False):
        """
        Builds a text node "id" parameter

        >>> XFormBuilder.get_text_id('foo')
        'foo-label'
        >>> XFormBuilder.get_text_id('foo', ['bar'])
        'bar/foo-label'
        >>> XFormBuilder.get_text_id('foo', ['bar', 'baz'])
        'bar/baz/foo-label'
        >>> XFormBuilder.get_text_id('foo', ['bar', 'baz'], 'choice1')
        'bar/baz/foo-choice1-label'
        >>> XFormBuilder.get_text_id('foo', is_hint=True)
        'foo-hint'

        """
        text_id = []
        if groups:
            text_id.append('/'.join(groups) + '/')
        text_id.append(name)
        if choice_name is not None:
            text_id.append('-{}'.format(choice_name))
        text_id.append('-hint' if is_hint else '-label')
        return ''.join(text_id)
def get_text_id ( name , groups = None , choice_name = None , is_hint = False ) : text_id = [ ] if groups : text_id . append ( '/' . join ( groups ) + '/' ) text_id . append ( name ) if choice_name is not None : text_id . append ( '-{}' . format ( choice_name ) ) text_id . append ( '-hint' if is_hint else '-label' ) return '' . join ( text_id )