|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Input tags-more detail, not an html query honest!
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@xxxxxxxxxxx [mailto:david@xxxxxxxxxxx]
> Sent: 19 June 2001 09:54
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: 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@xxxxxxxxxxxx> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








