This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: An easy problem


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@virbus.de
www.virbus.de


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]