xsl-list
[Top] [All Lists]

Re: [xsl] help with recursive function

2008-05-06 11:39:47
found what I think is the issue. I've actually not defined what the delimiter
is. all I've done is check a string for a delimiter and not the first occurance
of a delimiter and a specific delimiter.

Marijan (Mario) Madunic

Quoting Mario Madunic <hajduk(_at_)imag(_dot_)net>:

Andrew,

analyze-string would be a better solution but I will not be maintaining the
spellingBee.xml file and want this to be easy and simple for the production
team. Right now off the top of my head I don't see how to combine
analyze-string
with spellingBee.xml.

Marijan (Mario) Madunic

Quoting Andrew Welch <andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com>:

2008/5/6 Mario Madunic <hajduk(_at_)imag(_dot_)net>:
Thanks Andrew for that, the error message now tells me which line in the
 function is causing the problem. Still perplexed but now have a focus.
 Thanks
 Mario

 line in question now


 <xsl:value-of select="f:f_UpperLowerCaseFix($l_StringAfterDelimiter)"
/>


I would probably do some old school xsl:message output to see what
value was being returned:

<xsl:message select="f:f_UpperLowerCaseFix($l_StringAfterDelimiter)"/>
<xsl:value-of select="f:f_UpperLowerCaseFix($l_StringAfterDelimiter)" />

The key to recursive functions is it should always be obvious when the
recursion stops - your function is large and unwieldy so maybe
concentrate on refining it a little, or reducing it to a postable
example (and I really dislike the $p_ notation)

You might find separating it out into steps each using analyze-string
is the better approach.


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
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>
--~--





--~------------------------------------------------------------------
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>
--~--





--~------------------------------------------------------------------
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>
--~--