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>
<xsl:when test="$x//y">
<xsl:value-of select="$x//z"/>
</xsl:when>
<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
--~------------------------------------------------------------------
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>
--~--