code: private static SvgPaint parsePaintSpecifier(String val)
     {
        if (val.startsWith("url("))
        {
           int  closeBracket = val.indexOf(")"); 
           if (closeBracket != -1)
           {
              String    href = val.substring(4, closeBracket).trim();
              SvgPaint  fallback = null;
  
              val = val.substring(closeBracket+1).trim();
              if (val.length() > 0)
                 fallback = parseColourSpecifer(val);
              return new PaintReference(href, fallback);
           }
           else
           {
              String    href = val.substring(4).trim();
              return new PaintReference(href, null);
           }
        }
        return parseColourSpecifer(val);
     }
docs: /*
  Parse a paint specifier such as in the fill and stroke attributes.