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

Re: How to embed xsl:value-of into html tag

Subject: Re: How to embed xsl:value-of into html tag
From: rugowski@xxxxxxxxxx
Date: Thu, 24 Aug 2000 16:32:23 -0700
rugowski
Wendall,

I'm trying to do the exact same thing, except for 10 URL's in a row.

When I use the AVT, it won't advance past my fisrt URL, but I use a value
of select for what is displayed on the screen and that advances fine:

It displays the proper text, but all 10 point to the same URL, the first
one.

Ex:

<A HREF="/details?pn={/hitlist/patn}"><xsl:value-of select="."/></A>

XML

<hitlist>
     <patn>1</patn>
     <patn>2</patn>
......
     <patn>10</patn>
</hitlist>

thanks,

chris





Chris Rugowski
I/T Specialist
IBM Global Services, Rochester, MN
PH:  507-253-1859  T/L:  553-1859  FAX:  507-253-7994  T/L:  553-1859
IBMUSM07(RUGOWSKI)  e-mail:  rugowski@xxxxxxxxxx


Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> on 08/24/2000 10:56:23 AM

Please respond to xsl-list@xxxxxxxxxxxxxxxx

To:   xsl-list@xxxxxxxxxxxxxxxx
cc:
Subject:  Re: How to embed xsl:value-of into html tag




Hi Joan,

You want an attribute value template, like so:

<xsl:template match="productName">
  <input type="text" name="productName"
     value='{.}' size="25" maxlength="30" />
</xsl:template>

There's another way to do it with <xsl:attribute>, but this is the easy
way.

It's not a workaround either. An AVT (recognize it by the { } ) is
explicitly provided as a way of saying "inside this attribute, evaluate
this expression instead of taking it as a literal."

Have a blast,
Wendell


At 03:22 PM 8/24/00 -0700, you wrote:
>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" />


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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




 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.