This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currently, the error XTDE0045 is defined as follows: [ERR XTDE0045] It is a dynamic error if the invocation of the stylesheet specifies an initial mode (other than the default mode) that does not match the expanded QName in the mode attribute of any template defined in the stylesheet. However, with xsl:mode and initial="yes" (which is the default if not defined), the mode is in effect even when not specifically used on any template. An example of such use is the test mode-1405.xsl, which looks like: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"> <xsl:template match="/"><out><xsl:apply-templates/></out></xsl:template> <xsl:mode name="s" on-no-match="text-only-copy"/> </xsl:stylesheet> The result of this stylesheet should not be an error, because the mode is defined and, when set as initial mode, it comes into effect. I think the error conditions should be updated to reflect this situation.
I have fixed this omission; the error now occurs if the mode is specified in neither a mode declaration, or a template rule.