You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bart Molenkamp <b....@bizzdesign.nl> on 2005/10/20 15:15:32 UTC
Identifier used in FragmentExtractorTransformer
Hi all,
I have a little problem with the FragmentExtractorTransformer. This
transformer extracts XML parts (by default SVG), stores it in the
transient store and replaces the XML parts with id's.
My problem is that the id is based on the request uri (and the number of
fragments that it extracts during a single transformation). The problem
is that the contents of an XML document, and the content of the SVG
image in that document (some chart generated from a database query) is
different for each user calling that page. But the request uri is always
the same, thus the ID for each extracted fragment is also always the
same, resulting in each extracted fragment being overwritten in the
transient store.
This has some nasty side-effects, e.g. when using the browser's back
button, or even the possibility to have charts displayed from other
users.
Therefore, I think it is good to change the way that id's are generated.
I was thinking to move the current ID generating code into a protected
method, and those who want other ID generation can extend the
transformer and overwrite the method.
Is this a good idea, and if so, shall I provide a patch? Can it be
applied before the 2.1.8 release?
Thanks,
Bart.
Re: Identifier used in FragmentExtractorTransformer
Posted by Joerg Heinicke <jo...@gmx.de>.
On 20.10.2005 15:15, Bart Molenkamp wrote:
> My problem is that the id is based on the request uri (and the number of
> fragments that it extracts during a single transformation). The problem
> is that the contents of an XML document, and the content of the SVG
> image in that document (some chart generated from a database query) is
> different for each user calling that page. But the request uri is always
> the same, thus the ID for each extracted fragment is also always the
> same, resulting in each extracted fragment being overwritten in the
> transient store.
>
> This has some nasty side-effects, e.g. when using the browser's back
> button, or even the possibility to have charts displayed from other
> users.
>
> Therefore, I think it is good to change the way that id's are generated.
> I was thinking to move the current ID generating code into a protected
> method, and those who want other ID generation can extend the
> transformer and overwrite the method.
>
> Is this a good idea, and if so, shall I provide a patch? Can it be
> applied before the 2.1.8 release?
http://issues.apache.org/bugzilla/show_bug.cgi?id=28724
Jörg