xsl-list
[Top] [All Lists]

RE: [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:39:03

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', '')) )

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?

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
http://www.saxonica.com/
http://twitter.com/michaelhkay 


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