#NEWLINE# @ property #NEWLINE# def local_nspfxs( self ) : #NEWLINE# #INDENT# "\n        The namespace prefixes local to this element, both on the tagname and\n        all of its attributes. An empty string (``''``) is used to represent\n        the default namespace for an element tag having no prefix.\n        " #NEWLINE# def nspfx( name , is_element = False ) : #NEWLINE# #INDENT# idx = name . find ( ':' ) #NEWLINE# if ( idx == ( - 1 ) ) : #NEWLINE# #INDENT# return ( '' if is_element else None ) #NEWLINE# #UNINDENT# return name [ : idx ] #NEWLINE# #UNINDENT# nspfxs = [ nspfx ( self . _tagname , True ) ] #NEWLINE# for ( name , val ) in nspfx . _attrs : #NEWLINE# #INDENT# pfx = nspfx ( name ) #NEWLINE# if ( ( pfx is None ) or ( pfx in nspfxs ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# nspfxs . append ( pfx ) #NEWLINE# #UNINDENT# return nspfxs