xsl-list
[Top] [All Lists]

[xsl] test for child element

2006-12-20 09:22:42
Hi all:

I am having issues with testing for the first child
element in an xml.
My xml looks like this:

<root>

  <level1>
        <note><para>First note</para></note>
         <note><para>Second note</para></note>
         <note><para>third note</para></note>
     <text>Some text</text>

  </level1>

Under <level1> template I am checking to see if the
first child element is a "note" and then displaying
it. 
How do I check to see if the following elements are
also "note" elements? If they are then I want them to
be displayed int he following format:

First note
Second note
Third note

1 Some text

But when i use <xsl:if test"child::*[1][self::note]">
it checks only for the first note. How do I make it
check if there are any more notes after the first
note?

Thanks in advance for your help.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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