[Bug 28210] New: [XSLT30] we allow calling xsl:override(), but don't say anything about referencing it and calling it elsewhere

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

            Bug ID: 28210
           Summary: [XSLT30] we allow calling xsl:override(), but don't
                    say anything about referencing it and calling it
                    elsewhere
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org

In the spec, under 3.6.3.3 Overriding Components from a Used Package, we say:

<quote>
Within an overriding stylesheet function, xsl:original() may be used to call
the overridden stylesheet function.
</quote>

And we say, about its scope:

<quote>
If the overridden component C(P) has visibility public then the using package Q
will also contain a component C′(Q) whose declaration is the same as the
declaration of C(P) and whose visibility is hidden. This component is used as
the target of a binding for the symbolic reference xsl:original described
below.
</quote>

A programmer could do the following, assuming function f:test exists in a used
package:

<xsl:use-package name="urn:test-cases">
  <xsl:override>
    <xsl:function name="f:test">
      <xsl:apply-templates select="xsl:original#0" />
    </xsl:function>
  </xsl:override>
</xsl:use-package>

<xsl:template name="xsl:initial-template">
   <xsl:value-of select="f:test()" />
</xsl:template>

<xsl:template match=".">
   <!-- calls the original function??? -->
   {.()}
</xsl:template>

This would mean that the scope of the original function, which has visibility
HIDDEN, can be overridden by making it available as a reference.

The text says nothing about this, I think, and only mentions *calling* the
function through xsl:original. Breaking the inheritance chain this way, can
make a HIDDEN component available from within an area where HIDDEN components
should not be available.

This can be considered "by design", or not, in which case it is an error, but
either way, I think we should be explicit about it and clarify it, with a Note
or otherwise.

The issue does not rise with other components, because you cannot create a
referencing item from other components the same way you can do it with
functions and function items.

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

Received on Friday, 13 March 2015 17:57:12 UTC