[Bug 27340] [xslt 3.0] Named components (section 3.6.3)

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

--- Comment #2 from Michael Kay <mike@saxonica.com> ---
Further response:

I should add that we could have decided to allow keys to be final, so they can
be referenced in a using package, but not overridden. But I think keys should
probably be regarded as an implementation detail. A package should expose the
functionality of keys using a public function such as

<xsl:function name="get-customer-with-id" as="element(customer)"
visibility="public">
  <xsl:param name="customer-doc" as="document-node(element(customers))"/>
  <xsl:param name="id" as="xs:string"/>
  <xsl:sequence select="key('cust-id-key', $id, $customer-doc)"/>
</xsl:function>

so that the decision to implement this using keys, or maps, or by relying on
the optimizer, becomes an implementation decision that can easily be changed.

Michael Kay

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

Received on Monday, 17 November 2014 09:19:55 UTC