Re: [xsl] Condition Based Count of Sections

Subject: Re: [xsl] Condition Based Count of Sections
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 13 Apr 2007 11:38:10 +0200
J. S. Rawat wrote:
Hi:
This seems a very complex condition as per my understanding because I am new in this field. I want a "count" and "level" attribute (as shown in the output file) of <chapter>, <sect1> , <sect2> and <sect3> on the following basis:
1. <sect> or <chapter> which does have paragraph should be skiped because no section should be empty.
2. For counting perpose <chapter>, <sect1> , <sect2> and <sect3> should be treated as same level.
3. Depth of "level" attribute should be measure by its parent tag.


INPUT
<chapter>


OUTPUT <chapter count="1" level="1.1">


Can you please elaborate with:
1. Your current XSLT stylesheet based on your input and what it does wrong (i.e., what is the difference with your preferred output)
2. The XSLT version and the processor + version you are using (Saxon, browser-based, Gestalt etc)


Cheers,
-- Abel

Current Thread