[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: newbie question

Subject: RE: newbie question
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Tue, 24 Sep 2002 16:00:03 -0600
RE:  newbie question
> 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) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.