[
Lists Home |
Date Index |
Thread Index
]
Are you saying that XSLT stylesheets that revolve around
<xsl:apply-templates/> are not common? If so, you must be
writing/reading/using very different stylesheets from the ones I see.
No he's saying that people do have problems grasping recursion when
writing recursive functions (or templates) but very few people have
problems understanding apply-templates as it isn't explicitly recursive
and you no more need to think in terms of recursive function calls when
using xslt as you do when reading a document with nested sections (ie
most documents)
It may be that when you see a subsection your brain recursively calls
its section processor, but that's not the way you normally consciously
think about it.
Xquery on the other hand, as it doesn't have apply-templates, forces
the user to explicitly write recursive function calls for even the most
trivial of jobs. Personally I think writing recursive calls is fairly
natural, but experience shows that many people do not. You could write
the docbook stylesheets in Xquery but they would be a mass of deeply
mutually recursive functions and I think a lot harder to maintain
than the XSLT (which probably by now isn't so easy to maintain either:-)
Not that that's a criticism of Xquery, I don't think any of you on the
WG would claim that transforming Docbook to HTML was a major design aim
of Xquery, would you?
Also it's fairly clear that beuty is in the eye of the beholder.
Earlier in this thread Mike Kay posted an XSLT and Xquery solutionm of
the same problem, when I saw that I assumed most people would take that
as a sign that XSLt is clearly better (or at least simpler) for that
particular kind of problem, however one of the few people to comment
directly on it commented how the XSLT was opaque but anyone could
understand the Xquery version.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|