[Bug 23343] New: XTDE0045 does not take xsl:mode into account

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23343

            Bug ID: 23343
           Summary: XTDE0045 does not take xsl:mode into account
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.online@xs4all.nl
        QA Contact: public-qt-comments@w3.org

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 24 September 2013 15:13:06 UTC