1 17 18 19 20 package org.apache.fop.datatypes; 21 22 25 public class URISpecification { 26 27 33 public static String getURL(String href) { 34 41 href = href.trim(); 42 if (href.startsWith("url(") && (href.indexOf(")") != -1)) { 43 href = href.substring(4, href.indexOf(")")).trim(); 44 if (href.startsWith("'") && href.endsWith("'")) { 45 href = href.substring(1, href.length() - 1); 46 } else if (href.startsWith("\"") && href.endsWith("\"")) { 47 href = href.substring(1, href.length() - 1); 48 } 49 } else { 50 } 52 return href; 53 } 54 55 56 } 57 | Popular Tags |