if(f.canRead()) try { stylesheet = f.toURL().toString(); } catch (MalformedURLException e2) { }
if(f.canRead()) stylesheet = f.toURI().toASCIIString();
	private Templates getSource(TransformerFactory factory, String stylesheet) 	throws XPathException, TransformerConfigurationException {		String base;		if(stylesheet.indexOf(':') < 0) {			File f = new File(stylesheet);			if(f.canRead())				try {					stylesheet = new URI(f.toURL().toString()).toASCIIString();				} catch (Exception e1) {				}			else {				stylesheet = context.getBaseURI() + File.separatorChar + stylesheet;				f = new File(stylesheet);				if(f.canRead())					try {						stylesheet = f.toURL().toString();					} catch (MalformedURLException e2) {					}			}		}		int p = stylesheet.lastIndexOf('/');		if(p > -1)			base = stylesheet.substring(0, p);		else			base = stylesheet;		CachedStylesheet cached = (CachedStylesheet)cache.get(stylesheet);		try {			if(cached == null) {				cached = new CachedStylesheet(factory, new URL(stylesheet), base);				cache.put(stylesheet, cached);			}			return cached.getTemplates();		} catch (MalformedURLException e) {			throw new XPathException("Malformed URL for stylesheet: " + stylesheet, e);		} catch (IOException e) {			throw new XPathException("IO error while loading stylesheet: " + stylesheet, e);		}	}