code: private void  style(Attributes attributes) throws SVGParseException
     {
        debug("<style>");
  
        if (currentElement == null)
           throw new SVGParseException("Invalid document. Root element must be <svg>");
  
        // Check style sheet is in CSS format
        boolean  isTextCSS = true;
        String   media = "all";
  
        for (int i=0; i<attributes.getLength(); i++)
        {
           String val = attributes.getValue(i).trim();
           switch (SVGAttr.fromString(attributes.getLocalName(i)))
           {
              case type:
                 isTextCSS = val.equals(CSSParser.CSS_MIME_TYPE);
                 break;
              case media:
                 media = val;
                 break;
              default:
                 break;
           }
        }
  
        if (isTextCSS && CSSParser.mediaMatches(media, MediaType.screen)) {
           inStyleElement = true;
        } else {
           ignoring = true;
           ignoreDepth = 1;
        }
     }
docs: =========================================================================