[PATCH] XQueryGenerator parameters must be sorted for caching

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] XQueryGenerator parameters must be sorted for caching

Jean-Baptiste Quenot-2
Hello,

There is a problem in the caching algorithm of XQueryGenerator,
specifically in getKey():  when changing the order of sitemap
parameters in the pipeline, a different key is returned by
getKey().

For example these two pipelines would be cached in two different
objects, ie they are cached separately instead of being identified
as the same cached object:

<map:generate type="xquery" src="myxquery.xq">
  <map:parameter name="a" value="1"/>
  <map:parameter name="b" value="2"/>
</map:generate>

<map:generate type="xquery" src="myxquery.xq">
  <map:parameter name="b" value="2"/>
  <map:parameter name="a" value="1"/>
</map:generate>

Please find attached a patch that addresses that issue.

Thanks in advance,
--
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

20051006-xquerygen (1K) Download Attachment