Hi!

I want to trace a transformation and need the info if a template node is visited. But it seems, that at this nodes there won't be an traceevent!?

My code is:

  class DebugTraceListener implements TraceListener {
    public void open() {}
    public void close() {}
    public void enter(InstructionInfo instruction, XPathContext context) {
      String name, sourcePath=null, scriptPath=null;
      int infotype = instruction.getConstructType();
      if(infotype < 1024)
        name = StandardNames.getDisplayName(infotype);
      else
        name = null;
      if(name!=null) {
        /* get the xpath of the script command */
        if(instruction instanceof StyleElement) {
          StyleElement styleElement = (StyleElement) instruction;
          scriptPath = Navigator.getPath(styleElement);
        }
        /* get the xpath of the source node */
        Item item = context.getContextItem();
        if(item instanceof NodeInfo) {
          NodeInfo nodeInfo = (NodeInfo) item;
          sourcePath = Navigator.getPath(nodeInfo);
        }
        System.out.println(scriptPath+" : "+sourcePath);
      }
    }
    public void leave(InstructionInfo instruction) {}
    public void startCurrentItem(Item item) {}
    public void endCurrentItem(Item currentItem) {}
  }

My Output is:

/xsl:stylesheet/xsl:template[1]/root[1]/xsl:for-each[1] : /
/xsl:stylesheet/xsl:template[1]/root[1]/xsl:for-each[1]/data[1]/xsl:value-of[1] : /Bestellung/Waren[1]
/xsl:stylesheet/xsl:template[1]/root[1]/xsl:apply-templates[1] : /
/xsl:stylesheet/xsl:template[2]/Book[1]/xsl:value-of[1] : /Bestellung/Waren[1]/Buch[1]
/xsl:stylesheet/xsl:template[2]/Book[1]/xsl:value-of[1] : /Bestellung/Waren[1]/Buch[2]

In the script are e.g. the template node with a '/' match, that I want to see before the for-each is visited..

Do I need to add something to the factory? A feature?
-- 
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