DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32289>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32289 Summary: Batik FragmentExtractorTransformer fragment id clash Product: Cocoon 2 Version: 2.1.5 Platform: PC OS/Version: Windows XP Status: NEW Severity: major Priority: P2 Component: blocks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The fragment id generated by the FragmentExtractorTransformer is not unique for each fragment extracted. The fragment id is generated by the following code: this.requestURI = ObjectModelHelper.getRequest(objectModel).getSitemapURI(); String id = Long.toHexString((hashCode()^HashUtil.hash(requestURI)) + fragmentID); where fragmentId is an integer that starts at 0 and is incremented by one for each fragment extracted in the current response. I have an application where a jpeg image is embedded in xml as base64 data. I use FragmentExtractorTransformer to extract the base64 data and replace it with a url based on the fragment id. Another pipeline handles the image request from the browser by connecting a fragmentExtractorGenerator with a base64 serializer. The problem is that the same image (usually the first one requested) is returned for all requests. The problem occurs because the request for the page containing the image displays a different image depending on the request parameters passed. As fragmentExtractorTransformer only uses the SitemapURI as the basis of the hash key, it produces the same hash key for every image. This causes different images to be stored under the same id. Its anyone's guess which image is returned by the following request for the image. The solution is that the fragment id hash should include the request parameters as well as the uri to generate unique ids. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
