Subject: RE: 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: 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 |
- newbie question
- Markus Jais - Tue, 24 Sep 2002 17:11:38 -0400 (EDT)
- <Possible follow-ups>
- Dion Houston - Tue, 24 Sep 2002 17:29:18 -0400 (EDT)
- Andrew Welch - Tue, 24 Sep 2002 17:56:21 -0400 (EDT)
- Martinez, Brian - Tue, 24 Sep 2002 17:59:18 -0400 (EDT) <=
|
|