Subject: RE: [xsl] newbie question From: "Martinez, Brian" <brian.martinez@xxxxxxxx> Date: Tue, 24 Sep 2002 16:00:03 -0600 |
> From: Markus Jais [mailto:markusjais@xxxxxxxx] > Sent: Tuesday, September 24, 2002 3:19 PM > Subject: [xsl] newbie question > > > > but I do not understand. why are the contents of the <english_name>, > <german_name> and <prey> printed and why is value="" ?? value-of returns the contents of your select expression, which is evaluated as a string. If the expression returns a node-set (as in your example), value-of ignores any children elements and their attributes and just returns the text, or nothing if the element is empty. > and that "{comment}" would access the value of the "comment" > attribute. First, you haven't defined an XSLT variable anywhere to hold the textual value of comment, i.e.: <xsl:for-each select="/birds/eagles"> <xsl:variable name="comment" select="species/@comment"/> Then you need to properly reference the variable in your markup: <input type="text" name="bla" value="{$comment}"/> <!-- note $ token --> </xsl:for-each> hth, b. | brian martinez brian.martinez@xxxxxxxx | | senior gui programmer 303.708.7248 | | trip network, inc. fax 303.790.9350 | | 6436 s. racine cir. englewood, co 80111 | | http://www.cheaptickets.com/ http://www.trip.com/ | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] newbie question, Andrew Welch | Thread | [xsl] Newbie final Tag question, Holmberg Rick-ra0119 |
RE: [xsl] newbie question, Andrew Welch | Date | Re: [xsl] XSL: query part of string, David Carlisle |
Month |