This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: RDDL as a delivery vehicle for XSLT extensions?
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>, Michael Kay <mhkay at iclway dot co dot uk>
- Subject: RE: [xsl] RDDL as a delivery vehicle for XSLT extensions?
- From: "Kaganovich, Yevgeniy (Eugene)" <ykaganovich at netfish dot com>
- Date: Fri, 2 Mar 2001 00:41:12 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
: <xbind:module
: name="a-language-independent-uri-that-refers-to-functionality">
: <xbind:function name="format">
: <xbind:param name="date" type="string" />
: <xbind:param name="format" type="string" />
: <xbind:return type="string" />
: <xbind:comment>
: This function formats a date in ISO 8601
: according to the format string.
: </xbind:comment>
: <xbind:implementation
: language="java"
: package="java:com.example.datestuff.DateRoutines#format"
: />
: <xbind:implementation language="javascript">
: ...
: </xbind>
: </xbind:function>
: </xbind:module>
:
: <exsl:script implements-prefix="date"
: xbind="a-language-independent-uri-that-refers-to-functionality" />
This looks very cool. I would suggest that it's better to group by
languages rather than by functions: if I'm using a java-based processor, I'm
not particularly interested in how the perl binding looks, but I would like
to be able to distribute my implementation separately from the module
description.
<!-- can be made available on date-formatting-module-ns URI, e.g via RDDL
-->
<xbind:module name="date-formatting-module-uri">
<xbind:function name="format>
<xbind:param name="date" type="string" />
<xbind:param name="format" type="string" />
<xbind:return type="string" />
<xbind:comment>
This function formats a date in ISO 8601
according to the format string.
</xbind:comment>
</xbind:module>
</xbind:package>
<!-- comes with com.example.datestuff package (may or may not be
downloadable from the same namespace uri)
-->
<xbind:bindings xbind="date-formatting-module-uri" laguage="java">
<xbind:implementation name="format">
<class src="java:com.example.datestuff.DateRoutines"/>
</xbind:implementation>
</xbind:implementations>
Here, I assume that anything inside xbind:implementation is specific to the
language for which binding is defined. I'm a little unclear about namespace
usage in attributes, but it seems cleaner to store Java-specific information
as values inside xbind:implementation, rather than its attributes.
BTW, If it were Javascript binding, xbind:implementation may contain [a node
with] actual Javascript code, not just external reference. Is that correct?
- Eugene
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list