RE: how to write such xquery?

Xavier Franc <[email protected]>
Newsgroups gmane.comp.web.query-languages
Message-ID <[email protected]>


Michael Kay wrote:

>I tried, and found it surprisingly hard. Much easier in XSLT. 
>

I agree: in principle, recursive functions + typeswitch can emulate
the template mechanism that exists in XSLT, but in practice it is not
as convenient, not modular and --unless the typeswitch is smartly
optimized-- probably not as efficient .

I believe it would be a great idea to introduce templates in XQuery, but
I don't even dream that the WG would envisage it before ...  let's say 
XQuery 3, in 2034...?  ;-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.