Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doing a dynamic thing in xslt

 
Rajiv Chelsea
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I need suggestions for a XSL related problem.

I have a XML which contains employment history of users. There can be multiple records depending upon users history.
On this XML, a XSL file is applied. For each of the employment records , different styles are to be applied. Hence I am retrieving the data in <xsl:for-each>. For 1st record if <div class="class1"> is applied , for 2nd record <div class="class2"> should be applied and hence forth.. How can i dynamically do this as number of records is not known before..

Thanks in adavance
 
Paul Clapham
Sheriff
Pie
Posts: 20945
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know about the position() function?
 
Rajiv Chelsea
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope. how do we use the position() function
 
Paul Clapham
Sheriff
Pie
Posts: 20945
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, first you look it up to find out more about it. Then you ask specific questions about it if you don't see how it would help you solve that question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic