Subject: Re: How to embed xsl:value-of into html tag From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 24 Aug 2000 18:56:23 +0100 |
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='<xsl:value-of >select="."/>' 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
How to embed xsl:value-of into html, Joan Shu | Thread | RE: How to embed xsl:value-of into , Evan Lenz |
Re: Show - hide with xslt?, Andrea Penna | Date | Re: internationalization / localiza, Mike Brown |
Month |