[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Condition Based Count of Sections
Subject: Re: Condition Based Count of Sections
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 13 Apr 2007 12:14:18 +0200
|
J. S. Rawat wrote:
Below is output of your effort
<chapter count="1" level="1">
<ti>Chapter title</ti>
<p>PC DATA IS HERE</p>
<p>PC DATA IS HERE</p>
<sect1 count="2" level="1.2">
<ti>SECT1: SECTION TITLE</ti>
<sect2 count="2" level="1.1.1">
<ti>SECT2: SECTION TITLE</ti>
<p>Paragraph 1: PC DATA IS HERE</p>
<p>Paragraph 2: PC DATA IS HERE</p>
</sect2>
...
It is towards the direction but
1. <sect2> should not count because its parent <sect1> does not have
any <p>
??
You could do something like:
<xsl:if test="not(self::sect2 and parent::sect1/p)" >
...
around your xsl:attribute statements.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|