This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: speedy XSLT processor for win


On Tue, 30 Jul 2002, Gabor Hojtsy wrote:

> > I'll bet you are chunking out a lot of files.  If so, then
> > you are probably I/O bound.
> 
> Yep, the number of chunks are above three thousand. The sum size
> of the source XML files is 10Mb...

It could be that the number of chunks is slowing it down more the the
total size of the chunks.  There is a fair amount of processing done to
create the header and footer navigation for each chunk.  Plus the chunking
process has to determine the destination filename for each cross
reference.

The stylesheet below isn't very practical but will show how much time is
saved by skipping much of the chunk related processing.  It cut the time
in half on some books I tried.

----
Adrian Daley
Technical Specialist
Publication Services
Silicon Graphics

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
		version="1.0">

<!-- change as needed -->
<xsl:import href="xslt/docbook-xsl/html/chunk.xsl"/>

<xsl:param name="chunk.section.depth" select="1"/>

<xsl:template name="html.head"/>
<xsl:template name="user.header.navigation"/>
<xsl:template name="header.navigation"/>
<xsl:template name="user.header.content"/>
<xsl:template name="user.footer.content"/>
<xsl:template name="footer.navigation"/>
<xsl:template name="user.footer.navigation"/>

<xsl:template match="*" mode="chunk-filename">
  <xsl:value-of select="generate-id(.)"/>
  <xsl:text>.html</xsl:text>
</xsl:template>

</xsl:stylesheet>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]