From: Evgeny G. <gaz...@gm...> - 2010-11-24 10:35:13
|
2010/11/24 Joe Wicentowski <jo...@gm...> > Hi Dmitriy, > > >> > (to complete this case eXist > >> > will need a way to create zip file, some sort of behavior-link) > >> > >> Could you expand on what you mean by behavior-link? > > > > That is your hidden case :-) if you did update extracted data, you > > didn't update the zip file, so next time you download it you getting old > > data. The idea is on request like /some/ooo/document URLRewrite will zip > > it back to you. > > If I hypothetically had such a requirement to serve up a docx based on > the latest content of the unzipped docx file, URLRewrite can handle > this decision, so I don't see how triggers are related? The > controller.xql can look to see if the unzipped contents of the docx > file were modified, and if so, it can serve up the zipped version with > compression:zip() and util:serialize-binary(). Or I could create a > trigger to re-zip after each modification to the contents of the docx > file. > > Yes, the URLRewrite can "handle this decision" but don't must. Task of controller handle the URL, find the urlrewriterule rule, then CACHE one and perform. In next time for same URL controller is not perform the the XQuery, get result from cache. Why not use one collection as temporary storage for input docs and Scheduler as manager of this collection. You can also use triggers to manage the scheduled tasks. In this case you will have persistent queue for input docs. -- Evgeny |