Re: [xsl] Identifying sets of child elements that meet a certain condition

Subject: Re: [xsl] Identifying sets of child elements that meet a certain condition
From: Ronan Klyne <ronan.klyne@xxxxxxxxxxx>
Date: Mon, 11 Feb 2008 15:58:08 +0000
Mark Peters wrote:
Hi Michael,

Is this what you're suggesting?

   <xsl:template match="/">
           <topic>
                  <ul>
                       <xsl:for-each
select="/data/component[not(attributeList/attribute/@name='a')]">
                           <xsl:sort select="@name"/>
                              <li>
                                  <xsl:value-of select="@name"/>
                              </li>
                       </xsl:for-each>
                   </ul>
            </topic>
       </topic>
   </xsl:template>

I tried that, but the results included no list items.


There are two "</topic>" tags there - this is not legal XML. Which processor are you using? It really should have thrown an error rather than just producing blank output...


# r

--
Ronan Klyne
Business Collaborator Developer
Tel: +44 01189 028518
ronan.klyne@xxxxxxxxxxx
www.groupbc.com

Current Thread