code: def _parseSelectorAttribute(self, src, selector):
          
          ctxsrc = src
          if not src.startswith('['):
              raise self.ParseError('Selector Attribute opening \'[\' not found', src, ctxsrc)
          src = src[1:].lstrip()
  
          nsPrefix, src = self._getMatchResult(self.re_namespace_selector, src)
          attrName, src = self._getIdent(src)
  
          src = src.lstrip()
  
          if attrName is None:
              raise self.ParseError('Expected a selector attribute name', src, ctxsrc)
          if nsPrefix is not None:
              attrName = self.cssBuilder.resolveNamespacePrefix(nsPrefix, attrName)
  
          for op in self.AttributeOperators:
              if src.startswith(op):
                  break
          else:
              op = ''
          src = src[len(op):].lstrip()
  
          if op:
              attrValue, src = self._getIdent(src)
              if attrValue is None:
                  attrValue, src = self._getString(src)
                  if attrValue is None:
                      raise self.ParseError('Expected a selector attribute value', src, ctxsrc)
          else:
              attrValue = None
  
          if not src.startswith(']'):
              raise self.ParseError('Selector Attribute closing \']\' not found', src, ctxsrc)
          else:
              src = src[1:]
  
          if op:
              selector.addAttributeOperation(attrName, op, attrValue)
          else:
              selector.addAttribute(attrName)
          return src, selector
docs: attrib
          : '[' S* [ namespace_selector ]? IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S*
              [ IDENT | STRING ] S* ]? ']'
          ;