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

Re: xsl:variable

Subject: Re: xsl:variable
From: Laurence Mossuz <mossuz@xxxxxxxxxxxxx>
Date: Mon, 10 Mar 2003 10:42:59 +0100
laurence mossuz
re,

indeed perhaps if i explain more what i would like to do, you could give
me better solution than mine :

a part of my xml file looks like that :
- <xsl:for-each select="toto">
- <tr>
  <xsl:apply-templates select="titi" />
  <xsl:apply-templates select="tata" />
  </tr>
  </xsl:for-each>

the templates for the sub elements looks like that :
<xsl:template match="titi">
- <xsl:choose>
- <xsl:when test="current()=''">
- <td>
  <input border="0" name="test/toto/titi" size="10" type="text" />
  </td>
  </xsl:when>
- <xsl:otherwise>
- <td>
  <xsl:value-of select="." />
  </td>
  </xsl:otherwise>
  </xsl:choose>
  </xsl:template>

<xsl:template match="tata">
- <xsl:choose>
- <xsl:when test="current()=''">
- <td>
  <input border="0" name="test/toto/tata" size="10" type="text" />
  </td>
  </xsl:when>
- <xsl:otherwise>
- <td>
  <xsl:value-of select="." />
  </td>
  </xsl:otherwise>
  </xsl:choose>
  </xsl:template>

the objectif is for the input tags to pass all the couples (name, value)
to a server.
The problem is the following to determine a soltiuon to create these
couples (name, value) :
if i have twice the toto element, i will have twice the titi and tata
sub elements. So,  i have to distinguish the two input tags per sub
element by their "name" attribute! like this for instance :
name="test/toto/titi1" and name="test/toto/titi2", for the titi sub
element. This was the reason why i would like to create a counter on the
toto element.

if you have an other solution, it would be fine!!!!!!!


many thanks in advance

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.