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

RE: The XSL-List Digest V3 #192

Subject: RE: The XSL-List Digest V3 #192
From: Mike Van Riper <Van@xxxxxxxxxxx>
Date: Fri, 25 Aug 2000 18:04:24 -0700
mike van riper
Joan,

I do this all the time in my transformations that are generating HTML
output. It can be done with XSLT. Typically, you would use an <xsl:element>
to generate the <input> HTML element. Using your example, it would look
something like this:

<xsl:element name="input">
   <xsl:attribute name="type">text</xsl:attribute>
   <xsl:attribute name="name">productName</xsl:attribute>
   <xsl:attribute name="value"><xsl:value-of select="."></xsl:attribute>
   <xsl:attribute name="size">25</xsl:attribute>
   <xsl:attribute name="maxlength">30</xsl:attribute>
</xsl:element>

If this doesn't make sense to you, get an XSLT reference and look at the
explanation of how the <xsl:element> tag is handled.

Hope this helps,
  Mike Van Riper
  van@xxxxxxxxxxx 

-----Original Message-----
Date: Thu, 24 Aug 2000 15:22:07 -0700
From: Joan Shu <jshu@xxxxxxxxxxx>
Subject: How to embed xsl:value-of into html tag

Hi,

I can't get this working. value of the input field will be <xsl:value-of
select="."> 
instead of the real name -- XML Bible. I guess XSLT will not transform any
XSL statement inside 
a html tag.

Any workaround will be really appreciated. Thanks,
Joan

=============xsl code=================
<xsl:template match="productName">

	<input type="text" name="productName" value='&lt;xsl:value-of
select="."/&gt;' size="25" maxlength="30" />

</xsl:template>

=============xml code================
<?xml version="1.0"?>

<productName> XML Bible </productName>

=============output==============
<input type="text" name="productName" value='<xsl:value-of select="."/>'
size ="25" maxlength="30" />

==========what I want==============
<input type="text" name="productName" value='XML Bible'  size ="25"
maxlength="30" />


 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.