xsl-list
[Top] [All Lists]

Re: [xsl] Condition Based Count of Sections

2007-04-18 03:00:57
I am sorry, I have tried reading your explanation several times now,
and I have absolutely no idea what you are saying. Remember that we as
readers have no prior involvement in your project, so many things that
are matter of fact to you are not so for the reader.

I guess that when you write "generate <Section> for the <Chapter>"
that you are talking about generating the attributes, that has been
the focus of the thread as a whole. As far as I can see, there is no
creation of elements any place.

And I don't get what you are saying about count at all.

As for chapter not having any contens, are you saying that
<chapter>
 <p>..</p>
 <sec1>
   <p>..</p>
 </sect1>
</chapter>
is possible?

What should be the output of the small example that you gave in your last mail?

A couple of examples of the size of last example, both input and
desired output, that are different, and explanation of why they differ
will go a long way to helping me know.

I might have overlooked something. Others might better understand what
you need and help you achieve this.

Regards,
Ragulf Pickaxe :-)



On 4/18/07, J. S. Rawat <jrawat(_at_)aptaracorp(_dot_)com> wrote:
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>
--~--



--~------------------------------------------------------------------
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>
--~--