troubleshooting Question

Generate FAQ in xsl

Avatar of tamilgirl77
tamilgirl77 asked on
XML
3 Comments1 Solution235 ViewsLast Modified:
I have following xslt to generate a FAQ set of questions from an xml. I want the output to be:

1) General Inforamtion      
    -What is xyz compay?
   - What is your mission?

2) Shipping Information?
    -What is your return policy?


General Information:
-------------------------

What is xyz Company?
Our company was founded in 1992.............

What is your mission?
Our mission is to server your goal...................

Back to Top

Shipping Information:
-------------------------

What is your return policy?
We have 14 day return policy........................


So by clicking the question the user should be able to jump to the question. Following xslt generates the desired output. But I don't know how to incorporate the links that takes the user to the targeted quesiton once he clicks on it in the top. I am thinking using some counter variable. Any help will be much appreciated,

Thanks

FAQ.xslt:
------------
<xsl:template match="/">
            
                                          
      <xsl:for-each select="root/faqs/FAQ">
      
            <xsl:value-of select="category"/>
                  <br/>
                  <xsl:for-each select="question">
                        <xsl:value-of select="."/>
                        <br/>
                  </xsl:for-each>
                  <br/>
                  
      </xsl:for-each>
      
      <xsl:for-each select="root/faqs/FAQ">
      <xsl:value-of select="category"/>
            <br/>
                  <xsl:for-each select="question">
                        <xsl:value-of select="text()"/>
                        <br/>
                              <xsl:value-of select="answer"/>
                        <br/>
                  </xsl:for-each>
                  <br/>
      
      </xsl:for-each>


</xsl:template>
ASKER CERTIFIED SOLUTION
Gertone (Geert Bormans)
Information Architect
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros