[Home] [By Thread] [By Date] [Recent Entries]
Hi Anne,
At 05:27 PM 3/11/2004, you wrote: Hi, This uses an Attribute Value Template (the brackets) to tell the processor to interpret the string inside as XPath, and evaluate it. You can do exactly this but also include the substringing operations you are already doing elsewhere: <!-- THIS SUCCESSFULLY DISPLAYS THE AREA OF EVENINGPHONE --> <xsl:value-of select="substring(UPDATEADDRESS/RECEIVER/ADDRESS/EVENINGPHONE,1,3)" /> so ... <!-- INSTEAD, WHAT value WOULD GO IN HERE: --> <input type="text" name="txtHPhoneAREA" size="20" maxlength="10" value="" /> ...you would try <input type="text" name="txtHPhoneAREA" size="20" maxlength="10"
value="{substring(UPDATEADDRESS/RECEIVER/ADDRESS/EVENINGPHONE,1,3)}" />...although the code would be cleaner if you could contrive it in such a way that the EVENINGPHONE node you are after were the context node of the expression. (You could do this by emitting the result <input> node inside a template matching the EVENINGPHONE, for example.) In that case the result element in your stylesheet would look something like: <input type="text" name="txtHPhoneAREA" size="20" maxlength="10"
value="{substring(.,1,3)}" />...because the XPath '.' (short for 'self::node()') would then refer to the EVENINGPHONE itself. I hope that helps. Ask again for any clarifications. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



