• 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

performance regarding template match and xsl variable

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

MY QUESTION IS IF I USE A TEMPLATE MATCH OR A XSL VARIABLE FOR A PARTICULAR JOB WHICH WILL BE FASTER

like :

<xsl:variable name="policyno">
<Policy>
<xsl:value-of select="PolicyTransaction/Policy/PolicyGeneralInfo/ExpiryDate"/>
</Policy>

</xsl:variable>
and then call the variable

as <xsl:copy-of select="$policyno" />

------>OR USE A TEMPLATE AS

<xsl:template match="PolicyTransaction/Policy/PolicyGeneralInfo/ExpiryDate">

Policy>
<xsl:value-of select="PolicyTransaction/Policy/PolicyGeneralInfo/ExpiryDate"/>
</Policy>
</xsl:template >


AND CALL THE TEMPLATE ACTUALLY THIS PARTICULAR TEMPLATE IS BEING CALLED SEVERAL TIMES SOME FEW HUNDRED TIMES

SO WILL IT BE A GOOD IDEA TO TO STORE IT IN A VARIABLE AND THEN CALL IT

OR MAKE A TEMPLATE AND CALL IT

BECAUSE XSL VARIABLE IS A STATIC ONE WHILE TEMPLATE IS LIKE A FUNCTION FOR WHICH U HAVE TO TRAVERSE EVERYTIME U CALL IT (THATS WHAT I BELIEVE)

THANKS IN ADVANCE
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try it and see.
 
Joel Salatin has signs on his property that say "Trespassers will be Impressed!" Impressive tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic