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

Re: An easy problem

Subject: Re: An easy problem
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 30 Jul 2002 15:53:09 +0200
name following sibling
And the style sheet i am using is

 <xsl:template match="form">
        <do type="accept" label="submit">
         <go href="@action" method="@method">

use Attribute Value Templates (AVT) here


          <xsl:choose>
           <xsl:when test="input[@type='checkbox']">

when test not necessary, for-each is enough


            <xsl:for-each select="input[@type='checkbox']">
             <postfield name="@name" value="$@name">

AVT again


            </xsl:for-each>
           </xsl:when>
           <xsl:when test="input[@type='radio']>
            <postfield name=@name" value="$@name">

AVT again + some sort of grouping


           </xsl:when>
           </xsl:choose>
          </go>
        </do>
       <xsl:apply-templates select="*"/>

really applying again templates on all child elements??


</xsl:template>


<xsl:template match="form">
<do type="accept" label="submit">
<go href="{@action}" method="{@method}">
<xsl:for-each select="input[@type='checkbox']">
<postfield name="{@name}" value="${@name}"/>
</xsl:for-each>
<xsl:for-each select="input[@type='radio'][not(@name = following-sibling::input/@name)]">
<postfield name="{@name}" value="${$name}"/>
</xsl:for-each>
</go>
</do>
</xsl:template>


Regards,

Joerg


--


System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@xxxxxxxxx
www.virbus.de


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread
  • An easy problem
    • alex ek - Sat, 27 Jul 2002 10:55:14 -0400 (EDT)
      • Thomas Bayer - Sat, 27 Jul 2002 11:43:52 -0400 (EDT)
      • Joerg Heinicke - Tue, 30 Jul 2002 09:52:03 -0400 (EDT) <=

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.