xsl-list
[Top] [All Lists]

[xsl] Is there any XSLT debugger stepping in subexpressions of a complex XPath expression? (Was: Re: [xsl] XPath (and other W3C drafts))

2009-12-16 12:12:12
On Wed, Dec 16, 2009 at 8:07 AM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:


I'm assuming that Saxon will or has already implemented these
new features...?


Naturally ;-)

Higher-order functions are available in XQuery in Saxon 9.2, but not yet
released for XPath.

let expressions are implemented for XPath, but not yet released.

To shift to a what I consider a very important, related topic:

It has been many years since I have adopted writing complete programs
as one XPath expressions, something like this:

    <xsl:value-of select=
           "if($pNum gt 9 and not(translate($vLastDigit, '024568', '')) )
               then false()
               else
                 if($pNum le 50000000)
                   then
                     f:binSearch($vthePrimes,
                                    $pNum,
                                    1,
                                    $vcountPrimesLT50M
                                    )
                           else
                            if(f:pow2mod($pNum -1, $pNum) ne 1)
                               then false()
                               else
                                                        empty(
                                                           (2, 3, 7, 5, 11, 13, 
17, 19, 23, 29, 31, 37, 41,
                                                             (43 to 
xs:integer(round(f:sqrt($pNum, 0.1E0)))) )
                                                       [$pNum mod . = 0]
                                                               )
            "/>


Now this has been facilitated even further by providing "let
expressions" in XPath 2.1. I will never have to need to define a
separate xsl:variable whose value is a sequence -- this was not
possible without having let expressions in XPath.

However, I cannot find adequate debugger support for this style of
programming. The whole program above is treated as one single
statement and the debugger (I am using Oxygen 11 now, big thanks to
George Bina for making this happen!) and profiler treat this just as
... an expression.

My question to you is:

Does anyone know of an XSLT debugger (or should we know speak of XPath
Debugger) supporting stepping through the subexpressions of a complex
XPath expression?
Are any developers planning such support?



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play

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