|
Subject: Re: [xsl] Is there any XSLT debugger stepping in subexpressions of a complex XPath expression? (Was: Re: [xsl] XPath (and other W3C drafts)) From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Wed, 16 Dec 2009 12:43:23 -0800 |
> I'm slightly surprised that oXygen is able to distinguish whether the
source
> code used XSLT or XPath constructs, since Saxon compiles them into the same
> thing underneath. The compiled code for
>
> <xsl:variable name="x" select="doc('abc.xml')"/>
> <xsl:choose>
> B <xsl:when test="$x//y">
> B B <xsl:value-of select="$x//z"/>
> B </xsl:when>
> B <xsl:otherwise>42</xsl:otherwise>
> </xsl:choose>
>
> is effectively identical to the compiled code for
>
> <xsl:value-of select="let $x:= doc('abc.xml') return if ($x//y) then $x//z
> else '42'"/>
>
> Regards,
>
> Michael Kay
I tried to debug with the Oxygen XSLT debugger this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs" version="2.0">
<xsl:template match="/">
<xsl:value-of select=
"for $x in .
return
if ($x//y)
then $x//z
else '42'"
/>
</xsl:template>
</xsl:stylesheet>
And it was not possible to set a breakpoint on any of the lines of the
XPath expression, nor to step through the subexpressions.
Does Saxon really provide enough data via its debugging API to support
such debugging?
--
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Is there any XSLT debugge, Michael Kay | Thread | RE: [xsl] Is there any XSLT debugge, Michael Kay |
| Re: [xsl] Is there any XSLT debugge, G. Ken Holman | Date | Re: [xsl] Is there any XSLT debugge, Dimitre Novatchev |
| Month |