Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 23rd, 2005, 02:46 AM
Authorized User
 
Join Date: Jun 2005
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez
Default using xsl:value-of as a value of an input-text

Hey guys,
just wanna know if what I am doing is possible with XSLT.
I want to create an<input type="text"> element and using the xslt value as value of the input-text.

Here's my non-working code snippet

<xsl:template match="title">
<input type="text" value=<xsl:value-of select="."/>></input>
</xsl:template>

How do I do it the right way?


Aldwin
__________________
\"Dont you ever give up!\"
 
Old June 23rd, 2005, 02:53 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

<input value="{.}"/>

It's called an attribute value template.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old June 23rd, 2005, 02:57 AM
Authorized User
 
Join Date: Jun 2005
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez
Default

Thanks,I got the fix already.

Here's what I did
<input type="text"><xsl:attribute name="value">
                        <xsl:value-of select="." />
                </xsl:attribute></input>

Thanks anyway!



Aldwin
 
Old June 23rd, 2005, 03:02 AM
Authorized User
 
Join Date: Jun 2005
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez
Default

Hey Michael,
I got my fix first before I saw your's.
I like your fix better.Saves me a from doing a bunch of stuffs.
Thank you very much!



Aldwin





Similar Threads
Thread Thread Starter Forum Replies Last Post
asp3.0 input text field naeem_ul_hussan Classic ASP Professional 5 July 31st, 2007 08:11 AM
combining a form input name with xsl position() ? joeprice XSLT 1 February 23rd, 2006 09:54 AM
Focus on a text input field fizzerchris Classic ASP Basics 0 December 16th, 2005 09:20 PM
PHP formatting input text shahchi1 Pro PHP 2 June 9th, 2004 04:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.