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

Re: WebKit transformToDocument() failing with large XM

Subject: Re: WebKit transformToDocument() failing with large XML
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Wed, 07 Sep 2011 00:53:50 +0200
Re:  WebKit transformToDocument() failing with large XM
But finally weve proven my colleague wrong who always whines that Saxon is slow (and requires additional infrastructure), xsltproc is fast:

$ time xsltproc --maxdepth 5000 -o out.xml filter.xsl data.xml

real    0m28.130s
user    0m27.908s
sys     0m0.093s

$ time saxon  -o:out.xml -xsl:filter.xsl -s:data.xml
Warning: at xsl:stylesheet on line 8 column 57 of filter.xsl:
  Running an XSLT 1 stylesheet with an XSLT 2 processor

real    0m1.912s
user    0m0.046s
sys     0m0.077s



On 2011-09-07 00:44, Brandon Ibach wrote:
You don't have endless recursion, just really deep.  (As a nod to
computer science buffs, Alan Turing would tell you that it's
theoretically not reliably possible to know if you have endless
recursion or not without infinite time to try it.)  Most XSLT
processors just set a limit on recursion depth and report *potential*
endlessness.  Your file is big enough to have hit the limit.

You can seek to raise the limit (xsltproc provides the --maxdepth
option for this purpose) or, better, rewrite your stylesheet to not
use recursion for that particular task.  It looks like you're just
filtering and formatting a list of items.  Consider using XPath to do
the filtering, rather than an XSLT choose/when, and output the
delimiter based on the position() of each node in the resulting
filtered list.

-Brandon :)


On Tue, Sep 6, 2011 at 6:07 PM, Dustin N. Jenkins <Dustin.Jenkins@xxxxxxxxxxxxxx> wrote:
I have a bug with WebKit ( https://bugs.webkit.org/show_bug.cgi?id=67310)
for large XML documents (>  3MB) that are being run through one XSL file.

With both Safari 5.1, and Google Chrome 13.0.782.220 this happens.

If I run the XSL file using xsltproc, I get this error, but it still
produces something:

runtime error: file filter.xsl line 134 element param
xsltApplyXSLTTemplate: A potential infinite template recursion was detected.

I'm not sure where the endless recursion would come from.  I've posted my
XSL file, which is called filter.xsl:

<code>
...
</code>

The XML source file might be a bit large to post here, but it's attached to
the bug report from above.

Anyone else experience this?


-- Gerrit Imsieke Geschdftsf|hrer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke@xxxxxxxxx, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschdftsf|hrer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vvckler

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.