#NEWLINE# def startElementNS( self , name , qname , attrs ) : #NEWLINE# #INDENT# ( namespace , localname ) = name #NEWLINE# lowernamespace = str ( ( namespace or '' ) ) . lower ( ) #NEWLINE# if ( lowernamespace . find ( 'backend.userland.com/rss' ) != ( - 1 ) ) : #NEWLINE# #INDENT# namespace = 'http://backend.userland.com/rss' #NEWLINE# lowernamespace = namespace #NEWLINE# #UNINDENT# if ( qname and ( qname . find ( ':' ) > 0 ) ) : #NEWLINE# #INDENT# givenprefix = qname . split ( ':' ) [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# givenprefix = None #NEWLINE# #UNINDENT# prefix = self . _matchnamespaces . get ( lowernamespace , givenprefix ) #NEWLINE# if ( givenprefix and ( ( prefix == None ) or ( ( prefix == '' ) and ( lowernamespace == '' ) ) ) and ( givenprefix not in self . namespacesInUse ) ) : #NEWLINE# #INDENT# raise UndeclaredNamespace ( ( "'%s' is not associated with a namespace" % givenprefix ) ) #NEWLINE# #UNINDENT# localname = str ( localname ) . lower ( ) #NEWLINE# ( attrsD , self . decls ) = ( self . decls , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( ( localname == 'math' ) and ( namespace == 'http://www.w3.org/1998/Math/MathML' ) ) : #NEWLINE# #INDENT# attrsD [ 'xmlns' ] = namespace #NEWLINE# #UNINDENT# if ( ( localname == 'svg' ) and ( namespace == 'http://www.w3.org/2000/svg' ) ) : #NEWLINE# #INDENT# attrsD [ 'xmlns' ] = namespace #NEWLINE# #UNINDENT# if prefix : #NEWLINE# #INDENT# localname = ( ( prefix . lower ( ) + ':' ) + localname ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( namespace and ( not qname ) ) : #NEWLINE# #INDENT# for ( name , value ) in self . namespacesInUse . items ( ) : #NEWLINE# #INDENT# if ( name and ( value == namespace ) ) : #NEWLINE# #INDENT# localname = ( ( name + ':' ) + localname ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# for ( ( namespace , attrlocalname ) , attrvalue ) in attrs . items ( ) : #NEWLINE# #INDENT# lowernamespace = ( namespace or '' ) . lower ( ) #NEWLINE# prefix = self . _matchnamespaces . get ( lowernamespace , '' ) #NEWLINE# if prefix : #NEWLINE# #INDENT# attrlocalname = ( ( prefix + ':' ) + attrlocalname ) #NEWLINE# #UNINDENT# attrsD [ str ( attrlocalname ) . lower ( ) ] = attrvalue #NEWLINE# #UNINDENT# for qname in attrs . getQNames ( ) : #NEWLINE# #INDENT# attrsD [ str ( qname ) . lower ( ) ] = attrs . getValueByQName ( qname ) #NEWLINE# #UNINDENT# localname = str ( localname ) . lower ( ) #NEWLINE# self . unknown_starttag ( localname , list ( attrsD . items ( ) ) )