Subject: [xsl] simple question From: Laurence Mossuz <mossuz@xxxxxxxxxxxxx> Date: Tue, 11 Mar 2003 11:49:05 +0100 |
hello everybody, my xml file is like this <test> <toto> <titi>ti1</titi> <tata>ta1</tata> </toto> <toto> <titi>ti2</titi> </toto> <toto> <tata>ta3</titi> </toto> <toto/> </test> and a part of my xsl file is like this <xsl:for-each select="toto"> <tr> <td> <xsl:choose> <xsl:when test="string(titi)"> <xsl:value-of select="titi"/> </xsl:when> <xsl:otherwise> <input name="titi{position()}" type="text"/> </xsl:otherwise> </xsl:choose> </td> <td> <xsl:choose> <xsl:when test="string(tata)"> <xsl:value-of select="tata"/> </xsl:when> <xsl:otherwise> <input name="tata{position()}" type="text"/> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:for-each> i just want to be sure that tata{position()} is equal to the position of the node tata in the xml document because when i do : <xsl:value-of select="tata{position()}"/> i get the value of the tata node of the corresponding position. Besides, if i want to write <input name="test/toto/titi+titi{position()}" type=text"}, is it correct? In fact i would like to add the position of titi in the string test/toto/titi many thanks for your help! Miss Laurence Mossuz -- Laurence MOSSUZ LAPP Service Informatique Chemin de Bellevue BP 110 74941 Annecy-Le-Vieux CEDEX Tel : 04 50 09 17 31 _ Fax : 04 50 27 94 95 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Removing unwanted tag con, Ross Ken | Thread | RE: [xsl] Re: A proposal:xsl:result, Dimitre Novatchev |
Re: [xsl] A proposal:xsl:result-doc, Jeni Tennison | Date | RE: [xsl] Re: A proposal:xsl:result, Michael Kay |
Month |