[Home] [By Thread] [By Date] [Recent Entries]

  • From: Jonathan Robie <Jonathan.Robie@S...>
  • To: Evan Lenz <elenz@x...>, Michael Rys <mrys@m...>
  • Date: Sat, 24 Feb 2001 11:29:08 -0500

At 06:39 PM 2/23/2001 -0800, Evan Lenz wrote:

>FUNCTION applyTemplates(NODE $n) RETURNS LIST(NODE)
>{
>     IF name($n) = 'heading'
>     THEN
>       <title>
>         $n/text()
>       </title>
>     ELSE IF name($n) = 'chapter'
>     THEN
>       <section>
>         applyTemplates($n/node())
>       </section>
>     ELSE IF self::text()
>       $e
>     ELSE
>       applyTemplates($n/node())
>}
>applyTemplates(/)


Yes, this could be done. However, realize that an XSLT processor is 
optimized for template processing, and an XQuery processor will not be. I 
am not aware of existing systems that are well optimized for both - do you 
know of any?

I would like to avoid pushing XQuery too far out on the "future research" 
edge. I want it to be efficiently implementable as soon as possible.

Jonathan



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member