[xslt] Segmentation faults returning variable value from exslt functions II

Title: Segmentation faults returning variable value from exslt functions II

I have another example of segmentation faults when returning values from exslt functions.  Again, I can't give you a minimal test stylesheet (durn it), but this one has a slightly different configuration and the solution may be of interest.

The function itself is a pretty straightforward substitute for the non-existent fn:lower-case() xpath function:

    <func:function name="wpn:lowercase">
        <xsl:param name="str" />
        <func:result select="translate($str,$upper_alphabet,$lower_alphabet)" />

In this case I was not able to modify the function itself so as to get rid of the segmentation fault.  Nothing worked.

The original place where the segfault was happening was the line:

    <xsl:variable name="lower" select="wpn:lowercase(string(.))" />

The following modification removed the segfault:

    <xsl:variable name="lower">
        <xsl:value-of select="wpn:lowercase(string(.))" />

Interesting, neh?

I have done some cursory code inspection.  All that bought me was the knowledge that cursory code inspection was insufficient.  Duh.

I can duplicate this with xsltproc and our entire body of templates.  I would take a whack at debugging through at this point if I knew how to get started with the debugger with libxml/libxslt.  For example, are there debugging parameters to make?  Is there a web page giving hints on this?

Marc M. Adkins

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]