xsl-list
[Top] [All Lists]

RE: newbie question

2002-09-24 14:30:50
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="{(_at_)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



<Prev in Thread] Current Thread [Next in Thread>