RE: Congrats on the latest WD ::: http://www.w3.org/TR/2001/WD-xs lt20 -20011220/

> Unfortunately, the XSLT 1.1 WD merged two distinct requirements:
> 
>   - the definition of a standard mechanism for pointing to the
>     implementations of extension functions
>   
>   - the definition of language bindings used in the implementations of
>     extension functions
> 
> I agree wholeheartedly that the definition of language bindings should
> be carried out somewhere other than the XSLT 2.0 spec, to avoid some
> languages seeming to be 'blessed' while others are not.
> 
> However, I don't believe that this should prevent the definition of a
> standard declaration for indicating the implementation(s) of an
> extension function. 

We did this intentionally. If there is no common language binding between
(say) Saxon and Xalan, then in general a portable stylesheet is going to
need different versions of the extension function implementation depending
which processor it is using. So the stylesheet can specify

<saxon:script function="some:extension"
class="my.extension.class.SaxonWrapper"/>
<xalan:script function="some:extension"
class="my.extension.class.XalanWrapper"/>
<msxml:script namespace="some">
  function extension {
    do it!
  }
</msxml:script>

It will then pick up the implementation of the extension function suitable
for use with the XSLT processor that's running at the time.

A common <xsl:script> element to define mappings to external implementations
only makes sense if the external implementations are likely to work with any
processor. If different implementations are needed for different processors,
an implementation-dependant binding mechanism is more appropriate.

Mike Kay

Received on Friday, 18 January 2002 07:07:56 UTC