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

Re: ID of HTML control must have value of XML tag

Subject: Re: ID of HTML control must have value of XML tag
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 5 Apr 2003 22:01:40 +0100
html control id and name
> i am a newbie, but i think you need to do it this way using xsl:element and 
> xsl:attribute

you only need use xsl:element xsl:attribute if teh element and attribute
names are not known in advance (ie they are constructed from the input
data)

> 
>                                  <xsl:element name="label">
>                                          <xsl:attribute 
> name="for"><xsl:value-of select="name()"/></xsl:attribute>
>                                          <xsl:value-of select="name()"/>
>                                  </xsl:element>
>                                  <xsl:element name="input">
>                                          <xsl:attribute 
> name="type">text</xsl:attribute>
>                                          <xsl:attribute 
> name="size">4</xsl:attribute>
>                                          <xsl:attribute 
> name="id"><xsl:value-of select="name()"/></xsl:attribute>
>                                          <xsl:attribute 
> name="name"><xsl:value-of select="$path"/></xsl:attribute>
>                                          <xsl:attribute 
> name="value"><xsl:value-of select="."/></xsl:attribute>
>                                  </xsl:element>
> 
> 

could more simply be written

<label for="{name()}"/><xsl:value-of select="name()"/></label>
<input type="text" size="4" id="{name()}" name="{$path}" value="{.}"/>


David


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


Current Thread

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.