From: Joe W. <jo...@gm...> - 2010-04-09 18:34:21
|
Hi Wolfgang, Tony, Martin, Dan, Even though I learned XSLT first before XQuery, I find it much easier to maintain XQuery than XSLT stylesheets, since that's what I work in 100% of the time now. I converted a TEI-to-XHTML stylesheet from XSLT (65 templates) to XQuery (41 functions, including the master typeswitch) routine. I am now much happier than before, when I'd have to "relearn" XSLT any time I wanted to make a change. One "valid" reason to use XSLT, of course, would be if you want to use an existing stylesheet or framework out of the box. For example, the TEI Consortium maintains an incredible array of XSLT stylesheets, for TEI to XHTML, XSL-FO, docx, LaTeX, slideshows, etc.; I imagine DocBook does something similar. But if you really want to really customize your output and you are going to substantially rewrite the stylesheet anyway, I agree with Dan that there are real benefits to moving to an all-XQuery workflow. Another question that has been raised is the DocBook 4 to 5 transition. I'm not familiar with DocBook, but given the benefits of DocBook 5 and using XQuery for transformation, how disruptive would it be to do *both* at once? (1) Convert the eXist documentation to DocBook 5, and (2) convert the stylesheet from DocBook 4-oriented XSLT to DocBook 5-oriented XQuery? Another factor to consider is that I count 23 XSL files in the "stylesheets" directory. Should all of these be converted, or only "db2xhtml.xsl"? If not all 23 need to be converted, which are the key ones? Joe On Fri, Apr 9, 2010 at 2:03 PM, Wolfgang Meier <wol...@ex...> wrote: > Hi Dan, > > so you suggest to migrate our current stylesheets to XQuery? I don't > really mind since the stylesheets will need to be revised anyway, but > it should be discussed first. We should probably choose the approach > which is easier to cope with for most people. > > Personally, I sometimes prefer XSLT for simple, top-down > transformation processes, but well, we may not need to force beginners > to learn both, XSLT and XQuery at the same time. > > Wolfgang > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > |