Altova Mailing List Archives

Re: [xsl] How to count elements on a page

From: Mete Kural <metekural@--------->
Date: 12/1/2002 7:41:00 PM
Thank you for your response Mr. Pietschmann.

Somebody made this suggestion if RenderX's XEP is used
as the XSL formatter. Do you think this is practical:

"the only reasonable way to do it is to generate .xep 
(using com.renderx.xep.gen.backends.H4XEP producer, or

-at|-format at
at XSLDriver's command prompt) and then postprocess 
rx:pinpoint is a useful tool for implementing the 

Thank you,

--- "J.Pietschmann" <j3322ptm@xxxxxxxx> wrote:
> Mete Kural wrote:
> > For example, I have a page with dictionary
> entries. I
> > want to have a footnote on the right bottom corner
> > that shows how many dictionary entries there is on
> > that specific page. For every page, there will be
> a
> > footnote telling the count of dictionary entries
> on
> > the page. How do I count the number of certain
> > elements - for instance <dictionary-entry>
> elements -
> > on a "page" and print the total count for that
> page as
> > a footnote on the page?
> Short answer: you can't. Once the content gets into
> the
> pagination process, there are no longer
> dictionary-entry
> elements available for counting.
> Longer answer: If you like challenges, try any of
> the
> following:
> - Implement pagination at the XSLT level. Whether
> this
>    is workable depends on details of your problem,
> it has
>    been done for dictionaries before.
> - Implement extension elements for marking the
> dictionary
>    entries and for counting the marks and print the
> result.
>    Details depend heavily on the XSLFO processor you
> are
>    using (for example, whether is supports
> extensiona at all).
> - Check whether creative use of SVG graphics in FO
> markers
>    or absolute positioned blocks solves your
> problem. The
>    graphics may overlap, and by carefully placing
> dots
>    and windows, the result could be the number you
> require.
>    Similar tricks had been used in various toys and
> puzzles.
> J.Pietschmann
>  XSL-List info and archive: 

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.