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

RE: newbie question

Subject: RE: newbie question
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Tue, 24 Sep 2002 22:58:40 +0100
birds eagles
>         but I do not understand. why are the contents of the
> <english_name>,
>         <german_name> and <prey> printed and why is value="" ??
> 
> The first part to this is the concept of "built in template rules"

Actually this is because there is an <xsl:value-of /> on the <eagles>
element - the built in templates will only get fired through an
apply-templates.

When you do a value-of on an element you get the text of all of its
child nodes concatinated together.  Im not sure what you were intending
here so I wont second guess - if you post what you would like the result
of the transform to look like that would be helpful.

cheers
andrew

> -----Original Message-----
> From: Dion Houston [mailto:dionh@xxxxxxxxxxxxxxxxxxxxx]
> Sent: 24 September 2002 22:31
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  newbie question
> 
> 
> Hi Markus:
> 
> Welcome to the brave new world of XSLT :)
> 
> 	<xsl:for-each select="/birds/eagles">
> 
> This is actually iterating through each eagles element that is a child
> of the birds element. You probably want: "/birds/eagles/species"
> 		  
> 		<input type="text" name="bla" value="{comment}"/>
> 
> Even if you were sitting on the right node, though, this 
> attribute value
> template (AVT) will get the text content of a child comment _element_
> not attribute.  You probably want value="{@comment}"
> 
> 
>         but I do not understand. why are the contents of the
> <english_name>,
>         <german_name> and <prey> printed and why is value="" ??
> 
> The first part to this is the concept of "built in template rules"
> (please look up in your favorite reference).  The default 
> rule for text
> elements is to display them, you'll probably want to add:
> 
> <xsl:template match="text()"/>
> 
> Which will turn that off. 
> 
> HTH!
> 
> Dion
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/2002
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/2002
 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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.