Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6946807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:36:46+00:00 2026-05-27T13:36:46+00:00

would you please explain me the difference between <xsl:apply-template> and <xsl:call-template> and when should

  • 0

would you please explain me the difference between<xsl:apply-template> and <xsl:call-template> and when should i use <xsl:call-template> ?
thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:36:46+00:00Added an answer on May 27, 2026 at 1:36 pm

    On a very basic level, you use <xsl:apply-templates> when you want to let the processor handle nodes automatically, and you use <xsl:call-template/> when you want finer control over the processing. So if you have:

    <foo>
        <boo>World</boo>
        <bar>Hello</bar>
    </foo>
    

    And you have the following XSLT:

    <xsl:template match="foo">
        <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="bar">
        <xsl:value-of select="."/>
    </xsl:template>
    
    <xsl:template match="boo">
        <xsl:value-of select="."/>
    </xsl:template>
    

    You will get the result WorldHello. Essentially, you’ve said “handle bar and boo this way” and then you’ve let the XSLT processor handle these nodes as it comes across them. In most cases, this is how you should do things in XSLT.

    Sometimes, though, you want to do something fancier. In that case, you can create a special template that doesn’t match any particular node. For example:

    <xsl:template name="print-hello-world">
        <xsl:value-of select="concat( bar, ' ' , boo )" />
    </xsl:template>
    

    And you can then call this template while you’re processing <foo> rather than automatically processing foo‘s child nodes:

    <xsl:template match="foo">
        <xsl:call-template name="print-hello-world"/>
    </xsl:template>
    

    In this particular artificial example, you now get “Hello World” because you’ve overriden the default processing to do your own thing.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know the difference between Session.clear(); Session.Abandon(); Session.RemoveAll(); Please explain the
Could someone please explain when would I want to use delegation instead of inheritance?
Could you please explain the difference between Transfer objects and Domain objects in simple
Would someone please explain the difference? Are these the same product, and if not
can somebody please explain difference between those two declarations in the properties of the
Please explain from Linux, Windows perspectives? I am programming in C#, would these two
I would like to access a MySQL database using PHP. Can someone please explain
Can you, please, explain me the differences between the following database representatives, say, in
I am a learner of C#.Can you please explain me what is the difference
Hello can some please explain to me what are the differences between this configuration

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.