This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to execute the code inside XSLT exactly once.

 
Jayesh Bhapkar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How to execute the code in XSLT exactly once inside xsl:for-each ?

During transformation, I need to check for existence of some value (inside xsl:for-each), if value exists do some operation, if it doesn't I need to do some other operation but only once.
Is there any way to do the same in XSLT ?

(Using <xsl:otherwise> is not an option here since, it will repeat the operation as many times the xsl:for-each runs)

Any sort of help is highly appreciated.

Thanks,
Jayesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic