|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Applying a template on values in attributes ?
> I have an html element as follows:
>
> <input type="hidden" value="{TotalAdultFare}" />
>
> I want to apply a template to TotalAdultFare.
>
> If I do this by <xsl:attribute
> name="value"><xsl:call-template></xsl:call-template</xsl:attribute>
> then the problem is that the output is as follows:
>
> <input type="hidden" value="1000"></input>
>
> I want to avoid this somehow.. any ideas ?
Firstly "applying templates" usually means xsl:apply-templates, not
xsl:call-template, and you apply templates to a node, not to a value.
Secondly, xsl:call-template always has a name="xxx" attribute.
Thirdly, the value you get in your attribute is set by the template that you
call (or apply). If you don't want the value 1000 in there and want
something different, then change your template so it sets a different value.
Michael Kay
http://www.saxonica.com/
|
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








