[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] finding the position of the parent element XSLT 1.0
Hi all I have XML input structured like this: <KMCust_survey> <question> <q>For which purpose do you use the Engineering Intranet site?</q> <answer></answer> </question> <question> <q>How often are you using the following:</q> <answer> </answer> </question> <question> <q>How satisfy are you with the overall functionality of the following:</q> <answer> </answer> </question> </KMCust_survey> And a stylesheet that looks like this: <xsl:template match="question"> <table width="100%" cellpadding="3px" bgcolor="#c1e8e6" cellspacing="1"> <xsl:call-template name="gencols"/> <xsl:apply-templates></xsl:apply-templates> </table> </xsl:template> <xsl:template match="q"> <xsl:variable name="colspan"> <!--some code here that works--> </xsl:variable> <thead align="left"> <tr> <th colspan="{$colspan}" class="qt"> <b> <xsl:value-of select="?????"/> <!--need to know what to put here--> <xsl:text>. </xsl:text> <xsl:value-of select="."/> </b> </th> </tr> </thead> <xsl:apply-templates/> </xsl:template> I need it each question to be numbered 1. Question 1 2. Question 2 etc. How do I find out the position of the 'question' element from template for the 'q' element? I hope some one can understand my problem :) TIA Nadia
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|