#40 Too many nested apply templates

closed
nobody
None
5
2012-10-08
2005-12-14
geoffhopkins
No

Error will become apparent when running XSLT with XML
source... if one line is removed the
program works ok... Can't provide the true source for
confidentiality reasons,,, the true source is actually
7000 lines between point A and B.



Application Software
Requirements
Service Function
Requirements
R[
]









[') and klzzwxh:0052substring(.,string-length(.),1)=$REQ_STOP">klzzwxh:0053 klzzwxh:0042klzzwxh:0054 klzzwxh:0043klzzwxh:0055 klzzwxh:0044klzzwxh:0056 klzzwxh:0045klzzwxh:0057 klzzwxh:0046klzzwxh:0058 klzzwxh:0047klzzwxh:0059 klzzwxh:0048klzzwxh:0060 klzzwxh:0049klzzwxh:0061 klzzwxh:0050klzzwxh:0062 klzzwxh:0051klzzwxh:0063 <xsl:apply-templates select="following-klzzwxh:0064sibling::text[1]"/>





Discussion

  • Logged In: NO

    Thanks. Although this example runs to completion, it's clear
    in the debugger that it's comsuming stack space - which
    means the tail recursion optimization isn't kicking in for
    this stylesheet for some reason; there should be enough here
    to find out why.

    Michael Kay

     
  • Logged In: NO

    I think I've fixed this: tail call optimization for
    apply-templates was only working for one level of calls,
    whereas in this example there is a tail-recursive template
    that invokes another tail-recursive template.

    Michael Kay

     
  • Michael Kay
    Michael Kay
    2005-12-21

    Logged In: YES
    user_id=251681

    Unfortunately my fix has side-effects: the delayed
    evaluation of the recursively called template is happening
    after the context has been changed. So it's back to the
    drawing board. Function calls, which don't depend on the
    context, are so much easier to manage...

     


Anonymous


Cancel   Add attachments