This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: An easy problem
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 30 Jul 2002 15:53:09 +0200
- Subject: Re: [xsl] An easy problem
- References: <20020727145112.25135.qmail@webmail18.rediffmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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