// But avoid resolving external graphics to absolute file references
if ( r == null || r.getType() == Type.UNDEFINED ){
throw new IOException( "No such resource: " + s.getFilename());
}
// Force use of unmodified URI, avoiding absolute file references
ResourceLocator locator = new ResourceLocator(){
public URL locateResource(String spec) {
return null;
}
};
StyleHandler handler = Styles.handler(s.getFormat());