This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: 4xslt + docbook.xsl = "maximum recursion"
At 20:08 06/11/2001 +1100, Rich Churcher wrote:
I hope this is an appropriate place
to post this question. If not,
please let me know.
The trouble is, I'm too inexperienced to know if it's 4Suite, the
DocBook stylesheets or my own bumbling that's caused the problem
(of
course, I suspect that last option :o) I've converted our
newsgroup's
FAQ to DocBook XML, to the point where it now validates happily and
seems to be well-formed. However, when I attempt to use XSLT to
convert
to HTML, 4xslt works away for about half an hour, then dies with
"maximum recursion depth exceeded." No output file is
written:
AFAIK 4xslt is written with Python.
In Python, there is a recursion limit which can be changed via two
functions of the sys module:
setrecursionlimit(limit)
Set the maximum depth of the Python interpreter stack to limit.
This limit prevents infinite recursion from causing an overflow of the C
stack and crashing Python.
The highest possible limit is platform-dependent. A user may need to set
the limit higher when she has a program that requires deep recursion and
a platform that supports a higher limit. This should be done with care,
because a too-high limit can lead to a crash.
getrecursionlimit()
Return the current value of the recursion limit, the maximum depth of the
Python interpreter stack. This limit prevents infinite recursion from
causing an overflow of the C stack and crashing Python. It can be set by
setrecursionlimit().
Inserting
import
sys
sys.setrecursionlimit
(sys.getrecursionlimit()*2)
At begin of main script can help.
You can contact 4xslt authors too
(http://4suite.org/),
they may add a command line option to change this recursion limit when
calling the tool.
Note: I copy this email to
4suite@lists.fourthought.com.
--
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email : laurent.pointal@lure.u-psud.fr ou
laurent.pointal@laposte.net