This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Input tags-more detail, not an html query honest!
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Input tags-more detail, not an html query honest!
- From: "Ben Robb" <b dot robb at cscape dot com>
- Date: Tue, 19 Jun 2001 09:56:33 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Ah - you need to use an Attribute Value Template (avt) - denoted by
"curly brackets" {} to populate the value of an attribute with XML data:
<INPUT type='checkbox' name='frmabook' value="{EMAIL}" checked='true'/>
If you want to be more verbose, build up the element in stages, using
<xsl:attribute> to allow you to use other XSL calls:
<INPUT type='checkbox' name='frmabook' checked='true'>
<xsl:attribute name="value"><xsl:value-of
select="EMAIL"/></xsl:attribute>
</INPUT>
This will add an attribute to the result tree fragment as a child of the
INPUT element.
Ben
> -----Original Message-----
> From: david@beaumont.as [mailto:david@beaumont.as]
> Sent: 19 June 2001 09:54
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] Input tags-more detail, not an html query honest!
>
>
> Okay, everyone seems to think I am having an HTML problem but
> it isn;t, I just
> phrased the question badly, here is a smaple of code:
> <xsl:for-each select="ABOOK/ANAME">
> <tr>
> <td><xsl:value-of select="REALNAME"/></td>
> <td><xsl:value-of select="EMAIL"/></td>
> <td><xsl:value-of select="NICKNAME"/></td>
>
> <td>
> <INPUT type='checkbox' name='frmabook' value="?????" checked='true'/>
> </td>
> </tr>
> </xsl:for-each>
>
> I need the value of the input to be the same as the xml email value.
> How do I do this?
>
>
>
>
>
> On Mon, 18 Jun 2001 21:42:22 +0100 "Michael Kay"
> <mhkay@iclway.co.uk> wrote:
> >> I am quite new to style sheets and I need to know how to use
> >> input tags. I have
> >> an xsl file which creates a table of xml elements with a
> >> checkbox next to each.
> >> I need the value of the checkbox tag to change with the
> >> different values of the
> >> elements.
> >
> >Do you know what HTML you want to generate?
> >
> >If so, give a sample of the XML source and the corresponding
> HTML output,
> >and someone will probably suggest a way of getting from one
> to the other.
> >
> >If not, you're asking on the wrong list: you need HTML
> advice, not XSLT
> >advice.
> >
> >Mike Kay
> >Software AG
> >
> >
> > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>
> --
> Get your firstname@lastname email for FREE at
> http://Nameplanet.com/?su
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list