• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

recursion and apply-templates

 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
In each of the examples I have checked of recursion, it is acomplished using call templates.
In no case, apply templates can be used?
like if I wish the same template to be called ater I do some processing on the first tag encountered and then the next one by just apply templates of following-sibling?
Any example will be helpful.
Thanks in advance
Tina
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tina Desai:
In each of the examples I have checked of recursion, it is acomplished using call templates.
In no case, apply templates can be used?
like if I wish the same template to be called ater I do some processing on the first tag encountered and then the next one by just apply templates of following-sibling?
Any example will be helpful.


Why not? After you process the first child, just do
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Call it before you close the </xsl:template> of the first child.
 
reply
    Bookmark Topic Watch Topic
  • New Topic