[Bug 28931] [xslt 3.0] apply-templates across packages

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

Abel Braaksma <abel.braaksma@xs4all.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abel.braaksma@xs4all.nl

--- Comment #4 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
The WG discussed this bug at the telcon of 13 August 2015 and decided:

DECISION: the XSLWG accepts the proposals in comment#1 and comment#3 of the bug
report, taking the observations here (on xsl:original and built-in template
rules) into account

The observations, in summary, were:

- the PDF in comment#1 does not mention binding of hidden components to
xsl:original or #xsl:original, these bindings should be added.

- in a mail discussion (reference unknown) Abel made the observation that it is
unclear what happens with built-in template rules: when you override a mode by
adding a template rule to xsl:override, and we say that all template rules in
the current package has higher precedence than in any used package, how does
that relate to the built-in template rules? Answer: these should *not* be
triggered before any existing template rule in any (used or using) package has
been processed.

Example (not from the minutes):

Package A:
<xsl:mode name="M" on-no-match="shallow-copy" />

<xsl:template mode="M" match="foo">
   <xsl:value-of select="." />
</xsl:template>

Package B:
<xsl:use-package name="A">
   <xsl:override>
       <xsl:template match="bar" mode="M">
           <xsl:copy>
              <xsl:apply-templates select="foo" />
           </xsl:copy>
       </xsl:template>
    </xsl:override>
</xsl:use-package>

Now: in Package B there exist, by default, the built-in template rules for any
mode that has come into existence (here mode M). Because any template rule in B
has higher priority than any template rule in A, this suggests that match="foo"
can never be hit.

One way to tackle this is, perhaps, to stipulate that any built-in template
rule only exists inside the defining package (where the xsl:mode declaration
is). That way, no built-in template rules exist inside B and the inheritance
priority issue does not rise.

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

Received on Monday, 17 August 2015 09:14:03 UTC