[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] select descendant problem


Subject: [xsl] select descendant problem
From: Mati Hadi <matilda.kapro@xxxxxxxx>
Date: Fri, 10 Oct 2008 18:00:25 +0000 (GMT)

Hi Mailinglist,

I have an xml file like this:
<wrapper class=bmenub>
     <title>menu1</title>
     <section>
         <title>Indoor climate</title>
         <table> some table here</table>
         <section>
             <title> under menus</title>
             <paragraph>some text here</paragraph>
         </section>
         <wrapper class=bmenub>
             <title>menu1.1</title>
             <section>
                 <title>Temperatur</title>
                 <paragraph>some text here</paragraph>
             </section>
             <wrapper class=bmenub>
                 <title>menu1.1.1</title>
                  <section>
                      <title>Heat</title>
                      <paragraph>some text here</paragraph>
                  </section>
                  <wrapper class=bmenub>
                       <title>menu1.1.1.1</title>
                        <section>
                           <title>Heat2</title>
                            <paragraph>some text here</paragraph>
                        </section>
                  </wrapper>
             </wrapper>
         </wrapper>
     </section>
</wrapper>

I want to select all the children of the wrapper, except the children
wrappers. I mean I want to select i.e from the first wrapper just title,
section,section/title, section/table and section/section,but not the child
wrapper, and from the child wrapper, I want to select all its children except
the child wrapper, and so on.
I tried to write :
<xsl: for-each select=bwrapper[@class=bmenub]>
<xsl:apply-templates
select=*[not(descendant::wrapper[wrapper=bmenueb])]/>
</xsl:for-each>
But this dos not work. Any ideas please

Thank you in advance
Matilda



      __________________________________________________________
GC%r det
lC%ngsamt? Skaffa dig en snabbare bredbandsuppkoppling. 
SC6k och jC$mfC6r
priser hos Kelkoo.
http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325


Current Thread
Keywords
xml