OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK-APPS: (more) XSL processing time: xsl:number level="any"

Hi all,

I had to experiment with xsltproc --timing --profile as well.  We have
documents with many nodes (tables and much inline markup), of several
hundred pages in printed output with many small sections.

When turning on auto-labelling, the template producing the chapter-
(likewise appendix-) labels is extremly "expensive". Replacing the
original one with the following:

  <xsl:template match="chapter" mode="label.markup">
      <xsl:when test="@label">
        <xsl:value-of select="@label"/>
      <xsl:when test="$chapter.autolabel != 0">
          <xsl:when test="$label.from.part != 0 and ancestor::part">
            <xsl:number from="part" format="1" level="single"/>
          <xsl:when test="parent::book and count(../part) = 0">
            <xsl:number from="book" format="1" level="single"/>
            <xsl:number from="book" format="1" level="any"/>

(likewise for appendix) yields a five-times improvement in processing
speed (25 minutes -> 5 minutes) using xsltproc when not using any
"part". This is due to avoiding level="any".

The problem is that <xsl:number from="book" format="1" level="any"/>
take quite a long time. For a single footnote, e.g., it amounts to 4s
of processing time (PIII 650MHz, enaugh memory), two seconds for each
call (producing the label and the reference).

Is there any better way (keys?) for footnotes than to turn them into


Btw., similar results were obtained when using saxon, so
level="any" seems to be a hot spot independently of xsltproc.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC