xsl-list
[Top] [All Lists]

Re: [xsl] Condition Based Count of Sections

2007-04-18 01:40:57
Thanks for your effords!!!
I want a count for all <chapter><sect1><sect2><sect3> with their level but a rule should be devised that will prevent empty section/chapter being generated. For example, the following XML would generate <section> for the <chapter> as they have no content. This is something we need to avoid when the XSLT is devised, perhaps by combining lower content into an empty section. In the example below, this would mean that <sect1> would become content of the <chapter>.
<chapter>
< ti>.. </ti>
<sect1>
<p>...</p>
</sect1>
<sect1>
<p>..</p>
</sect1>

In another words count muse be 2 not 3 because <chapter> does not have data

thanks for your effords again!!!
JSR




At 10:00 AM 4/18/2007 +0200, you wrote:
Hi again J. S. Rawat,

Looking at your required output again, it seems that you do not want
to distinguish between sect elements containing child p elements and
not containing them, but only whether the sect1 element is the first
of that given chapter.

You should the remove the [p]'s from your match condition.

Regards,
Ragulf Pickaxe :-)

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--