URISpecification.getURL() cannot handle URIs like "url('(foo)bar')". It will extract "(foo" only. The problem can be fixed by replacing href = href.substring(4, href.indexOf(")")).trim(); with href = href.substring(4, href.lastIndexOf(")")).trim();
Fixed in FOP Trunk. See: http://svn.apache.org/viewvc?view=rev&rev=504980 Thanks for reporting and suggesting the fix!
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed