[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

slow xsltproc XInclude processing w/complex document?

Subject: slow xsltproc XInclude processing w/complex document?
From: Paul DuBois <paul@xxxxxxxxxxxx>
Date: Tue, 6 Jul 2004 14:58:42 -0500
xsltproc xinclude
I've been running some tests on a document that includes nested
Xinclude directives. The document is complex: upwards of 1500 files,
nested to a depth of up to 4 levels.  Total size of content is about 4.8MB.

For simple testing, I'm attempting only to produce a "flattened"
document that just resolves the XIincludes.  Stylesheet looks like
this:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- Identity transform, but "flatten" xincludes -->

<xsl:output method="xml" indent="yes"/>
<xsl:preserve-space elements="*"/>

<xsl:template match="xi:include" xmlns:xi="http://www.w3.org/2001/XInclude">
  <xsl:for-each select="document(@href)">
    <xsl:apply-templates/>
  </xsl:for-each>
</xsl:template>

<!-- identity transform -->

<xsl:template match="/ | node() | @* | comment() | processing-instruction()">
  <xsl:copy>
    <xsl:apply-templates select="@* | node()"/>
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>


My processing command is:


xsltproc --xinclude --novalid xinclude.xsl input.xml > output.xml

This takes about 12 minutes on my 900 MHz G3 iBook (Mac OS X), and about
4 minutes on my 2.8 GHz Pentium 4 Gentoo Linux box.

That seems pretty slow, particular given that the control condition takes
mere seconds (running the flattenedly document through a standard identity
transform with xsltproc).

I don't want to post the input here because it's so big, so this is really
just a preliminary post to ask for advice as to how I might go about
improving the XInclude-d transform: Is this a known issue with
xsltproc/XInclude?  Or is there perhaps some flag I should be using that I
am failing to use?  Something bad about my stylesheet?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.