[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

simple question

Subject: simple question
From: Laurence Mossuz <mossuz@xxxxxxxxxxxxx>
Date: Tue, 11 Mar 2003 11:49:05 +0100
toto titi
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.