[xsl] listing elements & sub-elements in a seqence - skiping elemts if sub-elemts are present

Subject: [xsl] listing elements & sub-elements in a seqence - skiping elemts if sub-elemts are present
From: Karl <call14@xxxxxxxxx>
Date: Mon, 24 Jul 2006 15:20:45 +0100 (BST)
The problem is I have various <section> elemts, with some having
<subsection>'s. So, I need to create a sequence order/pagebreak at
<subsection>'s SKIPING 'section', if <subsection>'s are available
under section. Otherwise pagebreak at <section>. 

e.g.
<section/>  will become  1.Section title in list + creat pg 1
<section/>  ..
<section/>  will become list num 3.Section title & pg 3

<section>  ** [No pagebreaks/pagenums SINCE IT HAS <subsection> Pg 4
moved to subsection
 <subsection/>  So, this become 4. Subsection title (pg 4) 
 <subsection/>  
 <subsection/>  will become 6. Subsection title (pg 6)
<section>

<section/> will become 7.Section title (pg 7)

<section>
 <subsection/>   will become 8. Subsection title (pg 8)
<section>

and so on...

so, looks like if i write something like
<for-each - //section[with no subsection] | //section/subsection..>
and then using position(), will i get the correct order>. 

1) Whether the above code is correct or not, pls can forward me the
syntax code equivalent to <for-each - //section[with no subsection] |
//section/subsection..>

2) If the above is not correct, pls can you suggest some effective
solution? 

Thanks in adv.
karl


		
___________________________________________________________ 
Try the all-new Yahoo! Mail. "The New Version is radically easier to use"  The Wall Street Journal 
http://uk.docs.yahoo.com/nowyoucan.html

Current Thread