From: Wolfgang M. <wol...@ex...> - 2010-04-09 20:30:38
|
> I dont think that doing basic document to document conversion in > XQuery makes any sense, XSLT is easier to develop this in and more > intuitive. I think this is a misunderstanding. A simple document to document transformation can sometimes be even more intuitive in XQuery ;-) All you need to learn is typeswitch plus a few function calls. I'm using this more and more in my own code (for example, see http://exist.svn.sourceforge.net/viewvc/exist/trunk/eXist/webapp/biblio/jquery.xql?revision=11607&view=markup). Done in the right way, the control flow in an XQuery can be easier to understand and maintain than the template matching mechanism of XSLT. Don't misunderstand me. I like XSLT. I use a pretty large XSLT to generate multi-volume, 1000 pages PDFs from a set of TEI documents stored in eXist. The processing only takes a few minutes, despite the thousands of small queries it sends to eXist, e.g. to assemble bibliographies and SVG graphics. However, this also shows the limitations of XSLT: it becomes quite tricky once you need to integrate data from many sources. Native XSLT support in eXist would overcome this limit. It's on the way, but there's still a lot of work left to be done. Anyway, my main argument for using more XQuery for the website is that you want to keep the examples as simple as possible and reduce the number of standards new users have to learn. Wolfgang |