|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Creating an input form, XML -> XSLT -> HTML
> <xsl:text disable-output-escaping="yes"> First Name: <![CDATA[<]]>input
> type="text" name="</xsl:text><xsl:value-of
> select="generate-id()"/><xsl:text>" value="</xsl:text><xsl:value-of
> select="GivenName"/><xsl:text disable-output-escaping="yes">"> </xsl:text>
NEVER use this! Why? We had it so often on this list in the last weeks.
<input type="text" name="{generate-id()}" value="{GivenName}"/> does the
same.
But I think the other solution is the better one. How would you evaluate a
input-field without knowing it's name?
So with the XML similar to this:
<input>
<type>text</type>
<name>FIRSTNAME</name>
<value>James</value>
</input>
<input>
<type>text</type>
<name>LASTNAME</name>
<value>Wolf</value>
</input>
I would use this XSL:
<xsl:template match="input">
<input type="{type}" name="{name}" value="{value}"/>
</xsl:template>
Regards,
Joerg
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
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








