Hi all,

Beginner question!

I have a directory containing some 1000 xml documents,
each of which describes a car. I use the xpathdirectory
generator to extract some elements about each car. The
directory is then displayed to the user in a series of
columns with one row per car or file. I have column headers
which allow the  output to be reordered as per the content
of a particular column.

I suspect that the directory is being reparsed for each 
different sortby value. It takes ages. I would like to
be able to cache the output from the directory parsing
irrespective of different values of sortby. How do I do it?

Also I intend to do a lot of this type of thing. How do I
arrange for my caches to be saved to disk?

<map:pipeline type="caching">
   <map:match type="regexp" pattern="cars(.?sortby=(\w+))?">
      <map:generate type="xpathdirectory" src="{fergus:release}/cars">
         <map:parameter name="depth" value="2"/>
         <map:parameter name="exclude" value=".DS_Store"/>
         <map:parameter name="xpath" value="/car/colour|/car/model|/car/year"/>
         </map:generate>
      <map:transform type="xslt" src="xslt/carsummary1.xslt">
         <map:parameter name="sortby" value="{2}"/>
         <map:parameter name="sortprefix" value="sortby"/>
         <map:parameter name="sortorder" value="sortorder"/>
         </map:transform>
      <map:serialize type="html"/>
      </map:match>
   </map:pipeline>

Regards Fergus.
-- 

===============================================================
Fergus McMenemie               Email:[EMAIL PROTECTED]
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to