Michael Kay schrieb:
OK, thanks, I've now fixed this for the next release.
It seems, that it is not fixed in the 8.3 release!?
 


From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Marc Pellmann
Sent: 04 February 2005 10:26
To: saxon-help@lists.sourceforge.net
Subject: Re: [saxon] no TraceListener event on xsl:variable

Hello Michael!
There are various possibilities. It might not be evaluated at all, if the value isn't needed.
It is needed, cause it is used later in a value-of.
It might be evaluated out of sequence (lazily).
It seems, that there is no trace at all.
Also, there are more events notified to the TraceListener than the StandardTraceListener reports. If you write your own TraceListener, you can act on the additional events.
I have my own Listener. I have addes the Script I used and the Code in my Listener that produces the following output:

sourcePath: /
name: xsl:template
name: xsl:value-of
name: xsl:value-of


-- cut - the methods in the listener, that produce the output --

  public void enter(InstructionInfo instruction, XPathContext context) {
    int infotype = instruction.getConstructType();
    if(infotype < 1024) {
      String name = StandardNames.getDisplayName(infotype);
      System.out.println("name: "+name);
    }
  public void startCurrentItem(Item item) {
      if(item instanceof NodeInfo) {
        NodeInfo nodeInfo = (NodeInfo) item;
        String sourcePath = Navigator.getPath(nodeInfo);
        System.out.println("sourcePath: "+sourcePath);
      }
  }

-- cut - the xslt script --

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" encoding="ISO-8859-1"/>
  <xsl:template match="/">
    <xsl:variable name="var" select="Bestellung/Lieferadresse/Name"/>
    <root>
      <xsl:value-of select="$var"/>
      <xsl:value-of select="Bestellung/Lieferadresse/Name"/>
    </root>
  </xsl:template>
</xsl:stylesheet>
-- 
Viele Grüße / best regards

Marc Pellmann
_______________________________
inubit - the integration experts
inubit AG
Lützowstraße 105-106
D-10785 Berlin
Fon: +49.30. 72 61 12-132
Fax: +49.30. 72 61 12-100
Freecall: 0800-go inubit
Web: www.inubit.com
    


-- 
Viele Grüße / best regards

Marc Pellmann
_______________________________
inubit - the integration experts
inubit AG
Lützowstraße 105-106
D-10785 Berlin
Fon: +49.30. 72 61 12-132
Fax: +49.30. 72 61 12-100
Freecall: 0800-go inubit
Web: www.inubit.com