xsl-list
[Top] [All Lists]

Re: [xsl] WebKit transformToDocument() failing with large XML

2011-09-07 11:55:02
That was the solution, well done.

I ended up using the XPath matching as you suggested and it worked brilliantly. It not only worked around the WebKit bug, but also improved performance dramatically.

Thanks again,
Dustin


On 09/06/2011 03:44 PM, 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(_dot_)Jenkins(_at_)nrc-cnrc(_dot_)gc(_dot_)ca>  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?
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--


Dustin N. Jenkins | Tel/Tél: 250.363.3101 | 
Dustin(_dot_)Jenkins(_at_)nrc-cnrc(_dot_)gc(_dot_)ca

facsimile/télécopieur: (250) 363-0045

National Research Council Canada | 5071 West Saanich Rd, Victoria BC. V9E 2E7

Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria (C.-B) V9E 2E7

Government of Canada | Gouvernement du Canada


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>