Project

Profile

Help

Bug #3472

closed

Somehow notify TraceListener that an empty xsl:template is being matched

Added by Radu Coravu over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2017-10-06
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

Description

Based on this discussion:

https://www.oxygenxml.com/forum/viewtopic.php?f=2&t=14985&p=44326#p44320

Let's say I have this XML document:

<personnel>
    <person>                
        <name>
            <family>Anderson</family>
        </name>
    </person>
</personnel>

and this XSLT stylesheet:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="family"/>
    <xsl:template match="/">
        <root><xsl:apply-templates select="//family"/></root>
    </xsl:template>
</xsl:stylesheet>

and we run the transformation with the trace listener set on the transformer (as the Oxygen XSLT debugger does).

There is no event given to the trace listener about the xsl:template which matches "family" and does nothing (filters it out).

This behavior is consistent for Saxon 6 and 9.

Xalan does emmit an event for this.

How about having an extra event emitted for empty xsl:templates as they have no instructions inside?

Please register to edit this issue

Also available in: Atom PDF